Viewing 15 posts - 4,546 through 4,560 (of 7,185 total)
Can you temporarily comment out the INSERT part of the script to see what you are trying to insert? You could be attempting to insert more than one row...
April 24, 2012 at 7:57 am
Please will you post your INSERT statement and the error message.
Thanks
John
April 24, 2012 at 7:33 am
dwain.c (4/24/2012)
I hope you realize I wasn't really trying to poke fun at your arguments.
Of course I do. A good debate is a good debate, and if we can...
April 24, 2012 at 6:54 am
dwain.c (4/23/2012)
I wouldn't say calculating the 'of x' part of the ranking is messy at all.
All that casting from int to to varchar looks messy to me - that's all...
April 24, 2012 at 1:56 am
Are you saying you just want to add "of x" to the Rank column, where x is the row count for the city in question? Do you want to...
April 23, 2012 at 8:26 am
Backups can be set to expire - this is when the backup set can be overwritten with a new one. The maintenance cleanup task is different - it deletes...
April 23, 2012 at 7:59 am
When you say you've had no luck, do you mean you got an error message, or did you get the wrong results? What did you try? Here's a...
April 23, 2012 at 6:45 am
Try this: http://www.sommarskog.se/dynamic_sql.html
John
April 23, 2012 at 6:14 am
http://msdn.microsoft.com/en-us/library/ms188001.aspx
If you want more detailed help, post the code and post the error messages.
John
April 23, 2012 at 4:28 am
Sandesh
Sounds like you're asking us to do all the work for you without telling us what you've already tried.
You have two options. You could import all data into a...
April 23, 2012 at 4:27 am
Build your query string dynamically, then execute it with sp_executesql. If you use an output parameter, you can get the result back to the scope of the calling batch.
John
April 23, 2012 at 3:49 am
I'd guess it's because it's evaluating all 65000 rows in the WHERE clause - that's about 10000 years with a freq of 2, which is beyond the range of datetime....
April 20, 2012 at 10:07 am
Rolf
Yes, looks OK. My Numbers table starts with 1, so you could try adding WHERE Number > 0, but to be honest I can't see how that would make...
April 20, 2012 at 8:38 am
The only thing I can think of is that there's some anomaly in your Numbers table. What does this return?
select MIN(number), MAX(number), COUNT(number)
FROM Utility.numbers where number <= 96
John
April 20, 2012 at 6:57 am
Does this help, or is there something in particular you don't understand about sp_send_dbmail?
John
April 20, 2012 at 6:20 am
Viewing 15 posts - 4,546 through 4,560 (of 7,185 total)