[thelist] dynamic table sql question
Joshua Olson
joshua at waetech.com
Mon Apr 25 14:47:17 CDT 2005
> -----Original Message-----
> From: Brian Cummiskey
> Sent: Monday, April 25, 2005 3:26 PM
>
> Joshua Olsen Wrote:
> > It may be possible to do this in a stored procedure
> depending on your
> > database. Which database are you using?
>
> Sorry, i wasn't clear.
> I am using M$SQL 2000 (version 7 i think?)
Er, MSSQL 2000 is just that... not version 7. :-)
> Teke at union.com Wrote:
> > Union should do the trick.
>
> yes, it would- but that would still require me to manually union all
> 300+ tables. Not something i'm looking forward to doing, and human
> error can exist-- theres a good chance i could miss one by accident.
Here's one thought--create an SP that makes the UNION for you (compiled as a
string) based on the available information.
Then, execute that string using the EXECUTE keyword.
<><><><><><><><><><>
Joshua L. Olson
WAE Tech Inc.
http://www.waetech.com/
Phone: 706.210.0168
Monitor bandwidth usage on IIS6 in real-time:
http://www.waetech.com/services/iisbm/
More information about the thelist
mailing list