Viewing 15 posts - 4,351 through 4,365 (of 10,144 total)
jerome.morris (7/18/2013)
hmmm still no result even tho I no there is data in there for the time period
Post your query, Jerome.
July 18, 2013 at 5:04 am
-- step-by-step workings: calculate 7am of monday last week and 7am of monday this week
SELECT *
FROM (SELECT DTToday = GETDATE()) d
CROSS APPLY (SELECT NoOfDaysSinceMonday = DATEDIFF(DD,0,DTToday)%7) x1
CROSS APPLY (SELECT...
July 18, 2013 at 3:42 am
Split from this thread.
July 18, 2013 at 1:53 am
kapil_kk (7/18/2013)
If you specify alias with TOP in delete it will always gives you an error:e.g.
DELETE TOP (2)
FROM tbl1 t
Your syntax is incorrect:
DELETE TOP (2) t
FROM tbl1 t
delete top(1000)...
July 18, 2013 at 1:08 am
The Dixie Flatline (7/17/2013)
opc.three (7/17/2013)
L' Eomot Inversé (7/17/2013)
Revenant (7/17/2013)
The Dixie Flatline (7/17/2013)
bcsims 90437 (7/17/2013)
JAZZ Master (7/17/2013)
SQLRNNR (7/17/2013)
petrifiedputrefied
purified
perforated
penetrated
defenestrated
immolated
disintegrated
disinterred
July 18, 2013 at 12:52 am
If all you are looking for is matching keys between the two queries, then this should work:
SELECT
ClaimId,
LineNum,
EncounterLineNum,
EncounterType,
InternalICN
FROM IntEncTracking.EncounterList el
WHERE e1.bypassflag = 1
INTERSECT
SELECT
ClaimId,
LineNum,
EncounterLineNum,...
July 17, 2013 at 9:18 am
riya_dave (7/17/2013)
total i have 60 millions rows from there i need to insert 30 millions to some another table.once it is insert i need to delete it from original table
You...
July 17, 2013 at 8:38 am
Thanks for the feedback Joe. I'm in Hampshire for this gig, perhaps 50 miles west and south a bit from London, and it's about 30oC. Absolutely awesome!
July 17, 2013 at 8:37 am
Try this, Joe:
SELECT
ASSESSMENT_DATA,
start.pos,
[end].pos,
SUBSTRING(ASSESSMENT_DATA,start.pos,[end].pos-start.pos) as ss
FROM USER_DEFINED_DATA
CROSS APPLY (SELECT pos = LEN('@@T_700_ = ') + CHARINDEX('@@T_700_ = ',ASSESSMENT_DATA,1)) start
CROSS APPLY (SELECT pos = 1+CHARINDEX('"@@T_301',assessment_data,start.pos)) [end]
WHERE ASSESSMENT_MONIKER = '09D27E579F9344A1BBD442E70CA1241F'...
July 17, 2013 at 8:17 am
It looks ok to me, Joe. Have you tried it yet?
You might benefit from filtering out rows where the column is empty.
July 17, 2013 at 8:03 am
GilaMonster (7/17/2013)
ChrisM@Work (7/17/2013)
Really? What type of join is shown for Query 1 and Query 2?
NOT IN and NOT EXISTS do perform identically with identical execution plans if the columns...
July 17, 2013 at 7:59 am
daniness (7/17/2013)
July 17, 2013 at 7:51 am
sqlnes (7/17/2013)
July 17, 2013 at 7:48 am
Ah, ok.
DROP TABLE #SAMPLE
CREATE TABLE #SAMPLE (MyString VARCHAR(200))
INSERT INTO #SAMPLE (MyString)
SELECT '...@@T_700_ = "v2012.08.10.1_1.7"@@T_301_ = "...' UNION ALL
SELECT '...@@T_700_ = "Client Name here"@@T_301_ = "03/22/2013"@@T_069_ = "1"......... thru @@T_850...'
SELECT...
July 17, 2013 at 7:43 am
daniness (7/17/2013)
What I'm trying to get from this query are records that are in common to both subqueries. This would tell me which records are responsible for the duplicate error...
July 17, 2013 at 7:33 am
Viewing 15 posts - 4,351 through 4,365 (of 10,144 total)