Viewing 15 posts - 61 through 75 (of 311 total)
If you want/have to do it in a Derived Column you can use the following expressions:
Weight: RIGHT("000" + (DT_STR,3,1250)Weight,3)
Order: SUBSTRING((DT_STR,9,1250)Order + "000000000",1,9)
Code: RIGHT("00" + (DT_STR,3,1250)Code,2)
Peter
November 14, 2011 at 8:25 am
GilaMonster (11/14/2011)
Dev (11/14/2011)
It's not a run-time error, try-catch can't catch it.
Well, it should.
No it shouldn't.
Actually, it can, although in an indirect way:
CREATE PROCEDURE dbo.Test1 AS
BEGIN TRY
...
November 14, 2011 at 7:18 am
GilaMonster (11/12/2011)
Peter Brinkhaus (11/12/2011)
November 12, 2011 at 2:24 pm
I'm probably not using the correct terminology, but let's give it a shot. To summarize, procedure Test1 contains a compile-time error (unknown table), while procedure Test2 contains a runtime-error (division...
November 12, 2011 at 1:29 pm
SQL Kiwi (11/12/2011)
By the way, turning off is_read_committed_snapshot_on = 1 would require ALTER DATABASE Test SET READ_COMMITTED_SNAPSHOT OFF. The sys.databases column for snapshot isolation (SI) would be snapshot_isolation_state_desc.
Sorry for...
November 12, 2011 at 11:54 am
SQL Kiwi (11/12/2011)
Peter Brinkhaus (11/12/2011)
November 12, 2011 at 11:37 am
SQL Kiwi (11/12/2011)
November 12, 2011 at 11:02 am
Now that's a nice little trick to remember, Paul. Very impressive improvement. As a side note, I just run the script on both SQL 2005 and 2008 and noticed that...
November 12, 2011 at 10:11 am
drew.allen (11/11/2011)
November 11, 2011 at 1:40 pm
drew.allen (11/11/2011)
Peter Brinkhaus (11/11/2011)
drew.allen (11/11/2011)
Peter Brinkhaus (11/11/2011)
No need for a string splitter. Also Cadavre's solution can be simply modified to leave out the false positives:
Your solution is not SARGable. ...
November 11, 2011 at 12:54 pm
drew.allen (11/11/2011)
Peter Brinkhaus (11/11/2011)
No need for a string splitter. Also Cadavre's solution can be simply modified to leave out the false positives:
Your solution is not SARGable. If you care...
November 11, 2011 at 10:59 am
Lowell (11/11/2011)
redesign, or split the...
November 11, 2011 at 10:17 am
Dev (11/11/2011)
Peter Brinkhaus (11/11/2011)
SELECT
*
FROM
(
SELECT '2|4|6' -- '3|24|4'
) SampleTable(ID)
WHERE
'|' + ID + '|'...
November 11, 2011 at 10:14 am
Agreed with Dev, but you can do it with a LIKE:
SELECT
*
FROM
(
SELECT '2|4|6'
) SampleTable(ID)
WHERE
'|' + ID + '|' LIKE '%|2|%'
November 11, 2011 at 10:03 am
As an alternative
SELECT
DATEDIFF(S, 0, CAST('1900-01-01T' + LEFT('00:00:00', 8 - LEN(AnyTime)) + AnyTime AS DATETIME))
FROM
(
SELECT '1' UNION ALL -- 1 second
SELECT '15' UNION ALL --...
November 4, 2011 at 3:31 am
Viewing 15 posts - 61 through 75 (of 311 total)