Viewing 15 posts - 4,681 through 4,695 (of 7,191 total)
Kwisatz78 (2/29/2012)
The code isn't just one big update, it is several wrapped in a single transaction.
If it's all one transaction, batching it will have no effect. The transaction will...
February 29, 2012 at 8:02 am
Ananda
Just as a matter of interest, why are you wrapping a SELECT statement in an explicit transaction?
John
February 28, 2012 at 1:46 am
It's best to let your presentation layer handle things like this. If you have to do it in the database layer, you can use FOR XML to concatenate the...
February 27, 2012 at 8:58 am
It's worth having a look in the default trace next time it fails to see whether the activity is recorded in there. Another thing that's worth doing is piping...
February 20, 2012 at 3:53 am
I've just tried your script, and it looks like I was wrong about not being able to use a variable in your BACKUP statement, so ignore that comment. I...
February 20, 2012 at 3:12 am
You can't use a parameter for the database name in a BACKUP statement. You need to use dynamic SQL instead, or find some other way of building your SQL...
February 20, 2012 at 2:57 am
Leave it as it is, otherwise it'll only grow again, wasting system resources and causing fragmentation. If there's been a one-off event that has caused the log to grow...
February 17, 2012 at 5:18 am
Hugo
I was about to make precisely that point. Paul is quite right, since the question asks how to get the proc to do an index seek. But it...
February 17, 2012 at 5:13 am
Dwain's method is more efficient, since it doesn't involve string conversions. Granted, it doesn't give you the AM/PM, but do you really need that?
If you want proof, run this...
February 17, 2012 at 4:17 am
kiran.rajenimbalkar (2/17/2012)
February 17, 2012 at 3:40 am
varchar does not mean varchar(max) - it means varchar(30) when CONVERTing.
http://msdn.microsoft.com/en-us/library/ms176089.aspx
The 103 date format means dd/mm/yyyy, so that explains the result of the first statement. The second one returns...
February 17, 2012 at 3:33 am
dwain.c (2/17/2012)
February 17, 2012 at 3:17 am
dwain.c (2/17/2012)
Maybe grasshopper wants both fields in the join because a PART_ID can have more than one CODE?
Maybe, but that doesn't show up in the sample data he posted.
You're way...
February 17, 2012 at 2:57 am
Oops - wrong thread! Don't know how that happened.
John
February 17, 2012 at 2:27 am
I understand what you're trying to do, although I don't know what you meant with that partial code about the join. However, please, please don't do it like this....
February 17, 2012 at 2:26 am
Viewing 15 posts - 4,681 through 4,695 (of 7,191 total)