Viewing 15 posts - 436 through 450 (of 1,439 total)
Jeff Moden (11/27/2012)
CELKO (11/27/2012)
I should have posted this in the previous posting. Hugo makes all the arguments.http://sqlblog.com/blogs/hugo_kornelis/archive/2008/03/09/lets-deprecate-update-from.aspx
I've seen all of his arguments and appreciate them but they still boil...
November 30, 2012 at 7:19 am
Try this
Select event_id, event_ts, DATEADD(minute,(1+DATEDIFF(minute, 0, event_ts)/5)*5, 0) AS time_stamp_group
From cte_time
November 30, 2012 at 6:28 am
Looks like a typo
CROSS APPLY T.CommentsData.nodes('/comments_data/Row/id/from') AS S(N)
should be
CROSS APPLY T.CommentsData.nodes('/comments_data/Row/from') AS S(N)
November 29, 2012 at 7:35 am
You can do this in a single statement using MERGE
MERGE fk_test AS target
USING (SELECT 5) AS source(eno)
ON (source.eno IN (target.eno,target.fno))
WHEN MATCHED AND source.eno = target.eno THEN
DELETE
WHEN MATCHED AND source.eno =...
November 29, 2012 at 4:00 am
Assuming you have a column SeqNum to order the rows by, you can do this
UPDATE t1
SET Admit_Date = ca.Admit_Date,
Disch_Date = ca.Disch_Date,
...
November 28, 2012 at 9:13 am
Try this
SELECT x.r.value('(Contact/ContactID/text())[1]','VARCHAR(40)') AS ContactID,
x.r.value('(Contact/Name/text())[1]','VARCHAR(200)') AS Name
FROM @Xml.nodes('/Response/Invoices/Invoice') AS x(r)
November 28, 2012 at 5:20 am
pierrebas (11/23/2012)
Thanks "Ten Centuries", that's exactly what I was looking for, a clean solution!!!
You're welcome. Thanks for the feedback.
November 23, 2012 at 12:46 pm
WITH CTE1 AS (
SELECT [ProfileId],
x.r.value('.','INT') AS id
FROM [Profile]
CROSS APPLY RelationshipTypeIDs.nodes('RelationshipTypeIDs/id') AS x(r)),
CTE2 AS (
SELECT x.r.value('.','INT') AS id
FROM @RelationshipTypeIDs.nodes('RelationshipTypeIDs/id') AS x(r)
)
SELECT DISTINCT c1.[ProfileId]
FROM CTE1...
November 23, 2012 at 12:34 pm
CELKO (11/23/2012)
...Why use needless dialect that is about to be deprecated?
About to be deprecated? Have you got a link for that?
If your talking about this connect issue, it's already...
November 23, 2012 at 12:10 pm
dwain.c (11/21/2012)
PRINT 'Dwain.C COLLATE + CROSS APPLY'
SET STATISTICS TIME ON
SELECT @Email=RIGHT(
STUFF(a.email
...
November 21, 2012 at 6:40 am
Modded version of Dwains, much quicker
PRINT 'Dwain.C COLLATE'
SET STATISTICS TIME ON
SELECT @Email=RIGHT(
STUFF(email
,CHARINDEX('@', email COLLATE Latin1_General_BIN2)
...
November 21, 2012 at 1:28 am
Jeff Moden (11/19/2012)
That was also pretty quick. Have you been using such a thing? If so, what's your take on performance here (And, yes, I still do the...
November 19, 2012 at 7:09 am
Jeff Moden (11/19/2012)
Eugene Elutin (11/19/2012)
Jeff Moden (11/17/2012)
Raymond van Laake (11/16/2012)
Regular expressions may be the fastest in another language but they're not necessarily the fastest in T-SQL because of the bit...
November 19, 2012 at 5:55 am
Something like this?
SELECT DB_NAME(database_id) AS DatabaseName,
SUM(CASE WHEN type=0 THEN size ELSE 0 END) AS MdfSize,
SUM(CASE WHEN...
November 15, 2012 at 10:03 am
Viewing 15 posts - 436 through 450 (of 1,439 total)