Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
dnorman
Starting Member
2 Posts |
Posted - 2009-12-30 : 13:25:32
|
| Hello,I am wondering if it is possible to do the following:Get a result set from one select statementeg:A001A002A003A004etcand then use them in another select statement as column nameseg:SELECT A001WATER FROM.......Any help is most appreciated. |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2009-12-30 : 13:35:14
|
Search for "dynamic sql" on this site please.Without dynamic sql it is not possible. No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-12-31 : 04:29:30
|
| www.sommarskog.se/dynamic_sql.htmlMadhivananFailing to plan is Planning to fail |
 |
|
|
Transact Charlie
Master Smack Fu Yak Hacker
3451 Posts |
Posted - 2009-12-31 : 04:31:08
|
might want to read this:http://www.sommarskog.se/dynamic_sql.htmlDAMN YOU madhivananCharlie===============================================================Msg 3903, Level 16, State 1, Line 1736The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION[ |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-12-31 : 04:49:25
|
quote: Originally posted by Transact Charlie
might want to read this:http://www.sommarskog.se/dynamic_sql.htmlDAMN YOU madhivananCharlie===============================================================Msg 3903, Level 16, State 1, Line 1736The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION[
You should be very fast MadhivananFailing to plan is Planning to fail |
 |
|
|
dnorman
Starting Member
2 Posts |
Posted - 2009-12-31 : 13:55:36
|
| Thank you very much for the help. After reading the material you guys led me too, I chose to re-design my data requirements. I appreciate the advice.Thanx |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-01-04 : 01:48:44
|
quote: Originally posted by dnorman Thank you very much for the help. After reading the material you guys led me too, I chose to re-design my data requirements. I appreciate the advice.Thanx
That's good and you are welcome MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|