Viewing 15 posts - 4,036 through 4,050 (of 7,483 total)
Jeff Moden (10/12/2012)
Mahesh Bote (10/12/2012)
I have one Stored Procedure which frequently gets executed. Though it is a straight forward Stored Procedure with one select statement and one delete statement,...
Tom
October 16, 2012 at 1:51 pm
Luis Cazares (10/16/2012)
Tom
October 16, 2012 at 1:38 pm
Cadavre (10/16/2012)
Lowell (10/16/2012)
Tom
October 16, 2012 at 12:21 pm
Marios Philippopoulos (10/16/2012)
Perry Whittle (10/16/2012)
Marios Philippopoulos (10/16/2012)
I will probably not do that, as it seems a bit too much voodoo to me... 🙂
Whats voodoo about creating a table, inserting...
Tom
October 16, 2012 at 11:14 am
mister.magoo (10/15/2012)
Jan Van der Eecken (10/15/2012)
Nice one, Tom! But does the TRY_CONVERT() make the query non-sargeable? Guess it would?
Yes it does...
Type conversion in expression (TRY_CAST([test].[field1] AS smallint)) may affect ...
Tom
October 15, 2012 at 10:45 am
L' Eomot Inversé (10/14/2012)
I think it would be improved by LTRIM
SELECT * FROM Test WHERE RIGHT('0000'+LTRIM(field_one),5) BETWEEN '00001' AND '00009'
That's still not going to work - a string like...
Tom
October 15, 2012 at 8:28 am
CELKO (10/14/2012)
WITH Year_Pairs...
Tom
October 14, 2012 at 2:13 pm
Fun question.
I wonder how many people will fail to notice that although you've got everything ready to create the index you haven't actually done so, so the view is not...
Tom
October 14, 2012 at 11:06 am
ChrisM@home (10/14/2012)
Tom
October 14, 2012 at 10:13 am
The whole computer industry has been badly damaged by patents granted on pure mathematics in the USA, which have severely damaged the development of secure encryption. The Onion story...
Tom
October 14, 2012 at 9:45 am
It strikes me that maybe everyone who has answered so far has been trying to return the records not wanted, rather than the records wanted. So perhaps something like
select...
Tom
October 14, 2012 at 9:11 am
ChrisM@home (10/14/2012)
....SELECT * FROM Test WHERE RIGHT('0000'+field_one,5) BETWEEN '00001' AND '00009'
This only works if there are no leading spaces. Leading zeroes are OK, and string comparison ignores trailing...
Tom
October 14, 2012 at 8:57 am
ChrisM@home (10/14/2012)
Jeff Moden (10/12/2012)
Cadavre (10/12/2012)
If you insist on doing it in the database layer, it can be achieved like this:
Check again. OP's desired output doesn't actually have a comma...
Tom
October 14, 2012 at 7:50 am
Viewing 15 posts - 4,036 through 4,050 (of 7,483 total)