Viewing 15 posts - 56,986 through 57,000 (of 59,066 total)
If you have a number of these kinds of calculations to make, you may want to make a calendar table. Many different examples on SQLServerCentral... do a search. Well worth...
January 30, 2007 at 9:57 pm
You'll need one CASE per column returned... sounds long but runs very fast.
January 30, 2007 at 9:53 pm
Heh... Even in the "higher priced spread" of Oracle, you have to TRUNC(somedate) to get the date with no time (midnight, really).
January 30, 2007 at 9:50 pm
Both methods are identical in execution plan, performance, and resource usage.
January 30, 2007 at 9:38 pm
Then you have to use Rob's method... triggers are absolutely oblivious as to what the source of information is so far as table name goes.
January 30, 2007 at 9:33 pm
The "t" prefixed "indexes" are not "real" indexes... they are merely notations to the server that the table contains image or text datatypes...
January 30, 2007 at 9:22 pm
Actually... there is a way... if you look in Books OnLine, the syntax for creating a stored procedure is....
CREATE PROC [ EDURE ] procedure_name [ ; number ]
[...
January 30, 2007 at 9:17 pm
--===== Create a test table to demo the problem with...
SELECT '11AA' AS AccountID, CAST('01/01/2007' AS DATETIME) AS MyDateTime
INTO #MyHead UNION ALL
SELECT '11AA','01/02/2007' UNION ALL
SELECT '11AA','01/03/2007' UNION ALL
SELECT...
January 30, 2007 at 9:10 pm
Not after a couple of days... unless you have a really good audit log.
January 30, 2007 at 8:57 pm
's'ok... great minds think alike... I went a little nuts with the derived table thingy, though ![]()
January 30, 2007 at 8:52 pm
Of course, if you used any one of a thousand or so set based solutions for this problem, you wouldn't have to worry about what a cursor does or doesn't...
January 30, 2007 at 8:41 pm
01/01/1900 was also a Monday... kind of convenient, too, because the decimal equivelent for that date is "0".
January 30, 2007 at 8:24 pm
Be a bit leary of queries that have an inequality in the WHERE clause especially when a self-join is also present as it may form a "triangular join" which is a...
January 30, 2007 at 8:12 pm
You say you specifically want to use BCP... try BULK INSERT instead... lot's simpler than trying to get around the command shell thing.
Also, you can still use command shell as...
January 30, 2007 at 7:24 pm
Hat's off to the "remaining partner"... well done, Mr. Jones!
January 30, 2007 at 7:18 pm
Viewing 15 posts - 56,986 through 57,000 (of 59,066 total)