Viewing 15 posts - 58,411 through 58,425 (of 59,070 total)
If you just want duration and not actual CPU seconds used, then something like this works...
--===== Declare a couple of variables to measure duration
DECLARE @StartTime DATETIME
DECLARE @EndTime DATETIME
February 10, 2006 at 11:48 pm
Hi Tushar,
Look up "cross-tab reports" in Books Online... it has a great example of how to do a "Cross Tab" which some call a "Pivot". If you want true pivots,...
February 10, 2006 at 11:39 pm
Absolutely... and that, in fact, your suggestion would definitely be the best way to solve the problem, but someone wanted me to demo using DATEDIFF as both a filter and...
February 6, 2006 at 6:09 am
Yep, true enough... I've made the same recommendation to others, myself. It's a great example of why you need a primary key, though...
-------------------------------------------------------------------------------------------------------------------------------
|--Compute Scalar(DEFINE: ([Expr1004]=datename(month,...
February 4, 2006 at 9:05 am
John,
I didn't take the time to convert some of my old code to your specific example but the following code is a good example of a "dynamic crosstab". Since the...
February 3, 2006 at 8:26 pm
You could also embed the OSQL command in a Batch file that could provide instant gratification as to the outcome...
February 3, 2006 at 8:15 pm
Sure, Dennis... having a bit of a lack of sleep going on myself, here's an example using the Northwind database...
USE NorthWind
DECLARE @Year CHAR(4)
SET @Year...
February 3, 2006 at 8:11 pm
Concur... doesn't sound like the Developer ever heard of the IDENTITY property of a column. Using the IDENTITY property does have some other uses, as well... think of it as...
February 3, 2006 at 5:52 pm
I just gotta remember to read the last page
... Serqiy already made a similar suggestion. Guess a concurrence never hurts though...
February 2, 2006 at 6:52 pm
This will successfully convert characters in the DD/MM/YYYY format into a DateTime datatype without much fanfare...
CONVERT(DATETIME, yourstringdate, 103)
Here's an example you can try...
DECLARE @ddmmyyyyString CHAR(10)
SET...
February 2, 2006 at 6:48 pm
I dunno... 6 bytes, 4 bytes, 8 bytes... for me, I'd still be tempted to use DateTime just because of all the things you can do with DateTime functions without...
February 2, 2006 at 6:39 pm
I agree... BCP is a great tool especially when you learn how to use the format files. You could also try a simple OSQL call using the SELECT of your...
February 2, 2006 at 6:23 pm
Viewing 15 posts - 58,411 through 58,425 (of 59,070 total)