Viewing 15 posts - 541 through 555 (of 2,038 total)
You can use a CTE to create a partitioned row number and update this CTE.
DECLARE @T TABLE (Bldg INT, Job VARCHAR(20));
INSERT INTO @T
...
June 24, 2009 at 5:56 am
Using a a Tally table to create this range of items is just simple. If you don't know what a Tally table is, please search this site. You will find...
June 24, 2009 at 5:07 am
I think ROW_NUMBER is the wrong function in this case. Try RANK or DENSE_RANK:
SELECT DISTINCT
DENSE_RANK() OVER (ORDER BY fldCID),
fldCID
FROM @Test
June 24, 2009 at 5:01 am
the_spoofer (6/24/2009)
The update returns an error on the first lineIncorrect syntax near the keyword 'as'.
Oups... didn't read your statement correct. This should work:
UPDATE a
SET a.BatchID = b.Id
FROM Audit as a...
June 24, 2009 at 4:51 am
Hi
the_spoofer (6/24/2009)
Now I want to remove these columns from table one and just reference to the ID in table2 that contains these properties.
I don't understand the relation between this sentence...
June 24, 2009 at 4:31 am
Hi
Thanks for the sample data. 🙂
Try this:
UPDATE st SET
st.Code = ISNULL(r1.Code, r2.Code)
FROM #SpecailtyTeam st
JOIN #REF...
June 24, 2009 at 4:23 am
A hint for future projects and implementations...
Don't create dynamic SQL statements containing values in your font end. This enables SQL injection and causes problems as your current. Use parameterized statements...
June 24, 2009 at 4:12 am
Paul White (6/23/2009)
Florian Reischl (6/23/2009)
June 23, 2009 at 3:45 pm
GilaMonster (6/23/2009)
Florian Reischl (6/23/2009)
@roy: You just have to come to Germany.
How far are you from Berlin? There's a very, very, very, very small chance that I may be in that...
June 23, 2009 at 3:41 pm
Paul White (6/23/2009)
Florian Reischl (6/23/2009)
@paul-2: Probably looks better in IE or Firefox 😉
Oh - ha ha ha 😉
Actually it renders just fine in Chrome 2 - albeit somewhat faster than...
June 23, 2009 at 3:38 pm
lmu92 (6/23/2009)
Let me know where and when. I'd assume an "Oktoberfest" invitation with accommodation and beverages included would just be appropriate 🙂
Accommodation for Oktoberfest should be okay. I cannot guarantee...
June 23, 2009 at 3:25 pm
These OLE thinks are the reason why I'm really glad about the CLR integration in SQL Server 2005 and above.
June 23, 2009 at 3:14 pm
@roy: You just have to come to Germany.
@Gail: (S)He will answer when (s)he really gets performance problems. 😉
June 23, 2009 at 3:12 pm
:-):hehe::-D:-):hehe::-D
6000
:-):hehe::-D:-):hehe::-D
@paul-2: Probably looks better in IE or Firefox 😉
June 23, 2009 at 3:04 pm
Viewing 15 posts - 541 through 555 (of 2,038 total)