Viewing 15 posts - 4,561 through 4,575 (of 5,393 total)
Dang, you're right! Damn cut 'n paste!
Glad I could help.
-- Gianluca Sartori
March 5, 2010 at 12:56 am
Ok, let's start from the table definition script: can you post it please?
You may want to read the article linked in my signature, you would find it useful.
-- Gianluca Sartori
March 4, 2010 at 9:56 am
Then change it to OFF. The identity column is there to be computed at the time you insert into the table. If you set IDENTITY_INSERT ON you allow inserts on...
-- Gianluca Sartori
March 4, 2010 at 9:38 am
Your syntax is a bit wrong. Try this instead.
Update [databasename1].[dbo].[tablename]
SET [columnname] = B.[columnname]
FROM [databasename1].[dbo].[tablename].[columnname] AS A
INNER JOIN [databasename2].[dbo].[tablename].[columnname] AS B
ON A.PrimaryKey = B.PrimaryKey
-- Gianluca Sartori
March 4, 2010 at 9:26 am
Is IDENTITY_INSERT set to ON for that table while inserting?
Can you please provide the table script?
-- Gianluca Sartori
March 4, 2010 at 9:23 am
I'm not certified, but I'm plannig to get some cert. It doesn't prove anything, but it's a minimum requirement for some jobs.
Last week I was officially nominated DBA in my...
-- Gianluca Sartori
March 3, 2010 at 8:08 am
You can convert it to joins this way:
SELECT B.Id, MinDrawTime = C.DrawTime, MaxDrawTime = D.DrawTime
FROM (
SELECT B.ID, MinRid = MIN(B.Rid), MaxRid = MAX(B.Rid)
FROM @TEMP AS B
GROUP BY B.Id
) AS B
LEFT...
-- Gianluca Sartori
March 1, 2010 at 4:16 am
RBarryYoung (2/23/2010)
Itzik Ben-Gan, "Calculating Concurrent Sessions, Part 3" (SQL Server Magazine, March 2010)
-- Gianluca Sartori
February 24, 2010 at 1:05 am
Go with OLEDB, forget about JDBC.
I'm using Hit Software OLEDB driver, quite expensive but works well.
-- Gianluca Sartori
February 23, 2010 at 9:53 am
Alvin Ramard (2/23/2010)
CirquedeSQLeil (2/23/2010)
Lynn Pettis (2/23/2010)
On a count down to 12,000 posts on The Thread!Only 14 more posts
You mean 13, right?
Don't mess the countdown please, counting posts in a thread...
-- Gianluca Sartori
February 23, 2010 at 9:09 am
Just the time part? OK, take the fractional part only:
DECLARE @test-2 TABLE (
dtColumn datetime
)
INSERT INTO @test-2 VALUES (GETDATE() + RAND())
INSERT INTO @test-2...
-- Gianluca Sartori
February 23, 2010 at 6:11 am
Convert the date column to FLOAT, then back to DATETIME:
DECLARE @test-2 TABLE (
dtColumn datetime
)
INSERT INTO @test-2 VALUES (GETDATE() + RAND())
INSERT INTO @test-2 VALUES (GETDATE() + RAND())
INSERT INTO @test-2 VALUES (GETDATE()...
-- Gianluca Sartori
February 23, 2010 at 2:07 am
RBarryYoung (2/22/2010)
-- Gianluca Sartori
February 23, 2010 at 1:12 am
In my humble opinion, this doesn't belong to SQL.
You'd better do it in some other kind of language / technology.
Not that I'm saying it can't be done, it's just that...
-- Gianluca Sartori
February 22, 2010 at 5:20 am
max(seq) over (partition by street)
returns the maximum sequence number in each street group.
In case of ties between different streets, you order by street.
Inside each street group, you want the...
-- Gianluca Sartori
February 22, 2010 at 3:16 am
Viewing 15 posts - 4,561 through 4,575 (of 5,393 total)