Viewing 15 posts - 256 through 270 (of 2,893 total)
In T-SQL, you cannot refer to "a field" in a table by its "index".
However, you can use dynamic sql o build a relevant update statement using table definition details...
July 25, 2013 at 10:21 am
Another way:
SELECT S.*
FROM SAMPLE S
CROSS APPLY (SELECT MAX(dt) mxd, MIN(dt) mnd FROM (VALUES (a),(b),(c),(d)) as v(dt)) A
WHERE A.mxd != A.mnd
July 25, 2013 at 9:56 am
I've couldn't run OP code in SQL2008 as he is using 2012 function.
Now, I can see what is result of his query.
The following will produce the same:
select *
...
July 25, 2013 at 9:32 am
webrunner (7/25/2013)
July 25, 2013 at 9:07 am
ScottPletcher (7/25/2013)
Eugene Elutin (7/25/2013)
Alexander Suprun (7/24/2013)
Eugene Elutin (7/24/2013)
RAISERROR cause transaction to rollback, so your log insert is rollbacked as well as delete...
It's so untrue...
RAISERROR has nothing to do with the...
July 25, 2013 at 8:53 am
webrunner (7/25/2013)
Eugene Elutin (7/25/2013)
webrunner (7/25/2013)
ScottPletcher (7/24/2013)
webrunner (7/24/2013)
Alexander Suprun (7/24/2013)
July 25, 2013 at 8:44 am
webrunner (7/25/2013)
ScottPletcher (7/24/2013)
webrunner (7/24/2013)
Alexander Suprun (7/24/2013)
July 25, 2013 at 8:16 am
John Mitchell-245523 (7/25/2013)
SELECT CAST('' AS int)
It's just the way it works. I suppose when the DBMS or the standards were being written, somebody decided that ''...
July 25, 2013 at 8:13 am
Lowell (7/25/2013)
SELECT *,
CASE
WHEN x LIKE '%[0-9]'
THEN 1
...
July 25, 2013 at 8:11 am
Lowell (7/25/2013)
July 25, 2013 at 8:09 am
....
is my code correct ah?
...
Test it!
If it's executes wihtout error that mean your code is valid.
Check if results do match expected results. If so, your code is correct.
July 25, 2013 at 8:03 am
The same question from past!
You will see my response there too...
http://www.sqlservercentral.com/Forums/Topic1305828-391-1.aspx
July 25, 2013 at 7:59 am
Alexander Suprun (7/24/2013)
Eugene Elutin (7/24/2013)
RAISERROR cause transaction to rollback, so your log insert is rollbacked as well as delete...
It's so untrue...
RAISERROR has nothing to do with the transaction.
It's just the...
July 25, 2013 at 7:36 am
...
select *, ISNULL(CAST(SUBSTRING(x,NULLIF(PATINDEX('%-[0-9]%',x),0) + 1,1) AS INT),-1)
from tmp
July 25, 2013 at 7:19 am
Koen Verbeeck (7/25/2013)
The identity property specifies that this column is autopopulated by an integer, starting at 1 and adding 1 for each new...
July 25, 2013 at 4:05 am
Viewing 15 posts - 256 through 270 (of 2,893 total)