Viewing 15 posts - 1,126 through 1,140 (of 3,544 total)
You must supply the (PrimaryKey) column list as well ie
SET IDENTITY_INSERT BackupDatabase..TableA ON
DELETE
FROM PrimaryDatabase..TableA
OUTPUT Deleted.PrimaryKey
INTO BackupDatabase..TableA (PrimaryKey)
WHERE 1=1
SET IDENTITY_INSERT BackupDatabase..TableA OFF
Far away is close at hand in the images of elsewhere.
Anon.
April 7, 2011 at 7:04 am
The only time I use my own incrementing instead of IDENTITY is when the business demands no gaps (ie caused by failed inserts with IDENTITY)
Far away is close at hand in the images of elsewhere.
Anon.
April 7, 2011 at 6:35 am
When you state 'for some items' are you using 41 (stock) for all items or did you substitute each item's stock for the literal 41.
Far away is close at hand in the images of elsewhere.
Anon.
April 7, 2011 at 5:42 am
Dave Ballantyne (4/6/2011)
Any other threadzian going to be at sqlbits ?
Yarp, Saturday.
Far away is close at hand in the images of elsewhere.
Anon.
April 7, 2011 at 1:54 am
WITH a ([Item Code],A,B,C,D) AS (
SELECT [Item Code],
SUM(CASE WHEN DaysDiff BETWEEN 0 AND 30 THEN [Trx Qty] ELSE 0 END) AS [A],
SUM(CASE WHEN DaysDiff BETWEEN 31 AND 60 THEN...
Far away is close at hand in the images of elsewhere.
Anon.
April 6, 2011 at 10:16 am
Do you have multiple rows per ID?
Otherwise the Salary column in the sort is irrelevant.
Far away is close at hand in the images of elsewhere.
Anon.
April 6, 2011 at 6:01 am
Grant Fritchey (4/6/2011)
Our Starblazers
Thunderbirds Are Go
Hey, Hey, we're The Monkeys
I'll add two:
Jonny Quest
Space Ghost
How about
Fleegle, Bingo , Drooper and Snork 😀
Far away is close at hand in the images of elsewhere.
Anon.
April 6, 2011 at 5:16 am
CirquedeSQLeil (4/5/2011)
Steve Jones - SSC Editor (4/5/2011)
GSquared (4/5/2011)
Far away is close at hand in the images of elsewhere.
Anon.
April 5, 2011 at 9:33 am
Stefan Krzywicki (4/5/2011)
David Burrows (4/5/2011)
Stefan Krzywicki (4/5/2011)
...What are you doing, standing around on people's lawns?Nah, bet he plays Knock-down Ginger :w00t:
I have no idea what that means.
http://en.wikipedia.org/wiki/Knock,_Knock,_Ginger
Far away is close at hand in the images of elsewhere.
Anon.
April 5, 2011 at 9:16 am
Stefan Krzywicki (4/5/2011)
...What are you doing, standing around on people's lawns?
Nah, bet he plays Knock-down Ginger :w00t:
Far away is close at hand in the images of elsewhere.
Anon.
April 5, 2011 at 8:34 am
WayneS (4/4/2011)
... in return please do not pick on my next question coming up I think on April 12th or 13th
Deal! (But you have to not moan or groan about...
Far away is close at hand in the images of elsewhere.
Anon.
April 5, 2011 at 2:09 am
I corrected my posted code for type 6.
You have a problem with your query, your end times are not accurate enough ie
you should be using 14:29:59.997 not 14:29:00.000
it would be...
Far away is close at hand in the images of elsewhere.
Anon.
April 4, 2011 at 11:05 am
I think it is the data you posted.
The file has 534 rows whereas the total of your counts comes to 773.
Far away is close at hand in the images of elsewhere.
Anon.
April 4, 2011 at 10:30 am
Ah OK now I see, my bad, got the Shift numbers wrong.
Your change was close but CASE statements check in the order the WHEN is specified, so the test for...
Far away is close at hand in the images of elsewhere.
Anon.
April 1, 2011 at 8:19 am
First, you changed the CASE statement for Shift Why? This would be why the results do not match.
Second I may have missed a bit of logic in one of your...
Far away is close at hand in the images of elsewhere.
Anon.
April 1, 2011 at 7:48 am
Viewing 15 posts - 1,126 through 1,140 (of 3,544 total)