You are here: Re: STORED PROCEDURE - passing table name as a parameter « MsSQL Server « IT news, forums, messages
Re: STORED PROCEDURE - passing table name as a parameter

Posted by Steve Jorgensen on 11/30/05 03:37

On Wed, 30 Nov 2005 00:26:33 GMT, Steve <sjc4914@yahoo.com> wrote:

>This is a "commercial" database solution purchased to record and report
>environmental data. I don't like the design for all the reasons already
>posted, and more. Though I had nothing to do with the selection,
>unfortunately, I am charged with completing a task, so like it or not, it
>is on my plate.

Sorry - didn't mean to insult your intelligence. It helps to add a disclaimer
about not having control of the design, so people will know to answer what you
ask, not the red flag you can't do anything about.

>Terry Kreft's idea looks workable, but not optimum. It would seem like there
>would be a way to get around pasting strings together and then executing
>the string. I was wondering if there was a way to use a subquery to return
>a table reference. It is a rather obtuse way of getting there, and I
>haven't investigated it yet. Any alternate solutions anyone can think of?

A subquery won't help because that's just another query that returns data from
the objects it was written to return data from (and no others). Basically, to
do what you need to do, you have to use some kind if Dynamic SQL which is
another name for "pasting strings together and then executing the string".

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация