Viewing 15 posts - 1,411 through 1,425 (of 2,007 total)
I don't know about "better", but generally when I'm comparing two algorithms that should produce the same result-set I'd do something like this: -
SELECT MIN(name) AS TableName, --all columns here
FROM...
November 4, 2011 at 7:42 am
rahu21 (11/4/2011)
SELECT ISNULL((SELECT TOP 1 RowNumber as FirstUnusedID
FROM (SELECT ROW_NUMBER() OVER(ORDER BY ID )
AS RowNumber,ID FROM #testEnvironment2)T
WHERE RowNumber <> ID
ORDER BY 1),(ISNULL((SELECT MAX(ID)...
November 4, 2011 at 4:58 am
John Mitchell-245523 (11/4/2011)
November 4, 2011 at 3:04 am
foxjazzG (11/3/2011)
Not in my databases.
The same could be said by many Oracle DBAs.
November 4, 2011 at 2:30 am
ankita.patel01 81294 (11/3/2011)
this is fine. thank you for all your help lynn and Cadavre!
Test all three solutions against your own data, but ColdCoffee's CROSS APPLY is looking unbeatable on my...
November 4, 2011 at 2:27 am
ankita.patel01 81294 (11/3/2011)
I didnt realize the data was doing this until i saw it. Maybe this will help you.
CREATE TABLE #Account ([Account#] BIGINT, RepCode CHAR(4))
INSERT INTO #Account
SELECT 12345678, 'XX01'
CREATE TABLE...
November 3, 2011 at 10:45 am
ankita.patel01 81294 (11/3/2011)
Thanks for helping with this request. What you have is almost exactly what i want. However, what i found that a lot of the accounts have last...
November 3, 2011 at 8:55 am
TheSQLGuru (11/3/2011)
1) I LOVE the Celko bashing response! MUCH better than the simple "go away Joe" I was gonna post. 🙂
Really wasn't my intention to appear to be bashing...
November 3, 2011 at 8:06 am
Hello and welcome to SSC!
It seems that your DDL script has become detached from your post, or perhaps you were unaware of the benefits of providing one.
When you have time,...
November 3, 2011 at 7:44 am
Customer service operator for 6 months before getting fired for having no tact (have improved greatly since then, I was 17).
Bar work (ranging from Bar associate, Bar supervisor, Door supervisor...
November 3, 2011 at 5:02 am
SELECT ((59459 / 1368003) * 100), --this is 0
((59459 / 1368003.0) * 100) --this is 4.346408500
If you need further prodding, supply DDL please.
November 3, 2011 at 4:31 am
Teemo (11/3/2011)
SELECT nkey,
(SELECT msg + '|'
FROM #tmpdata r2
WHERE r2.nkey = r1.nkey
ORDER BY msg
FOR XML PATH('')) AS fmsg
FROM #tmpdata r1
GROUP BY nkey
but my problem is that...
November 3, 2011 at 2:39 am
Thanks guys. The post was more to show future Google searchers the power of the tally table (which I learnt from Jeff's posts and articles :-)) than to correct CELKO....
November 2, 2011 at 3:43 am
Is your trigger attempting to insert into the identity column?
Please post the DDL for the tables involved and the triggers.
November 2, 2011 at 3:39 am
Thomas.s (10/31/2011)
hi,thanks for ur help..but i dont want query in sql i want only ssis package mapping in sql server 2008
That's why I said set it as the dataflow source.
November 1, 2011 at 2:39 am
Viewing 15 posts - 1,411 through 1,425 (of 2,007 total)