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 |
|
aawan
Starting Member
24 Posts |
Posted - 2005-08-30 : 12:37:14
|
| I was wondering if someone could help me with a problem.I'm attempting to do the followingdeclare @lastOrder int, @stateName varchar(2), @qryString varchar(255)set @qryString = 'select @lastOrder = max(orderID) from CustomerOrders_'+@stateName+''The error I get is that '@lastOrder' has not been declared.But as you can see in the code above, it has been declared. What am I doing wrong?Thanks,Ali |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
aawan
Starting Member
24 Posts |
Posted - 2005-08-30 : 13:21:48
|
| Thanks Tara,Whenever I have a question on this forum, you always seem to have the right answer, immediately.I must say, you truly are the Almighty SQL Goddess :)Thanks a bunch!Ali |
 |
|
|
|
|
|