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 |
|
pizzazzz
Yak Posting Veteran
55 Posts |
Posted - 2010-07-27 : 19:51:39
|
| I am trying to create a table in my stored procedure based on a value from a CURSOR - when I query user info i want to create and populate a table and use users lastname as a variable to create the name of the table.my CURSOR has 2 distinct fields it returns - @email_address and @lastname.i want to create a table = to @lastname.then i use the @email_address in my where clause to create a dataset of all records and fields of a user and INSERT into the table I just created, named @lastname.HOWEVER, it is complaining about using @lastname in the CREATE TABLE.isn't this possible??? any suggestions I can get would be extremely helpful.thanks, |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
pizzazzz
Yak Posting Veteran
55 Posts |
Posted - 2010-07-28 : 12:08:11
|
| i was trying to get away from normalizing, but that too is a simplier way.I'll read the dynamic name process. If anything this bit of knowledge will come in handy in other projects.thank you very much Tara, the "Almightly SQL Goddess" |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|
|