Viewing 15 posts - 466 through 480 (of 499 total)
I think the only significance of 3 values per line is so it fits on an old 80-character green screen.
I have been investigating the code further and it seems the...
November 24, 2008 at 8:12 am
Some suggestions:
Try SELECT T1.ID, T2.ID, T3.ID
instead of SELECT * - if it now works, add columns back in until you find the problem column
and Try adding a WHERE clause
WHERE...
November 24, 2008 at 2:48 am
Thanks Jeff,
the file is ascii, record structure is
line 1 [Block Number] [No Values in Block]
lines 2...341 [value] [value] [value]
e.g. the first 4 lines are
...
November 24, 2008 at 2:27 am
Maybe just a standard x points for an article, y for a script and z for a QotD if they pass the moderator and make it onto the site. ...
August 22, 2008 at 1:17 am
Jeff
Its brilliant. But how on earth can anyone be expected to figure out the STUFF(... WHERE ... FOR XML PATH('') Syntax - especially when there is no XML involved!
I'll...
August 21, 2008 at 9:29 am
On first reading I thought your delete was taking over half an hour - so TRUNCATE may be an answer instead of DELETE * for a particularly large table.
However I'm...
August 20, 2008 at 5:10 am
I'm not sure exactly what you're looking for but this could help
CONVERT can take a variable, you could pass that as a parameter.
DECLARE @Fmt INT
SET @Fmt = 113
SELECT CONVERT(varchar(25), YourDateTimeColumn,...
August 20, 2008 at 4:57 am
Thanks Barry
I had thought about separate Tags tables originally: BookTags and AuthorTags - but a single Tag table does simplify things. I'd wondered on how to prevent the same...
August 14, 2008 at 11:02 am
Hmm although 7.5 miles certainly would be better exercise, I'm sure the car would win out if that were the case. Free parking at work too
But there is a...
August 5, 2008 at 9:03 am
Your NOT IN clause would mean checking against every single value to make sure there is no match.
Check the execution plan for the query, then try
AND NOT EXISTS (SELECT...
August 5, 2008 at 8:05 am
A reason to break the updates into chunks using TOP/ROWCOUNT is to prevent an exclusive table locks. There are other advantages to do with transaction logging, but I think you...
August 5, 2008 at 7:43 am
ð I am so lucky in my current job :). I cycle 2.5 miles to work, along a mostly traffic free route, however I do lug a heavy laptop...
August 5, 2008 at 7:18 am
I think you have the wrong type of quote at the end of .jpg a " ` " instead of " ' "
replace the quote and it should be OK
August 5, 2008 at 7:07 am
Is this what you're after?
SELECT SNO, Rating, Rating_Month as RatingMonth
FROM PI_ALL
WHERE Rating_Month = (SELECT MAX(Rating_Month) FROM PI_ALL)
GROUP BY SNO, Rating, Rating_Month
August 5, 2008 at 7:01 am
I think you can do it quite simply.
SELECT ID, ROW_NUMBER() OVER(PARTITION BY ID, ORDER BY ID) AS Seq_Num
FROM ... etc
See the ROW_NUMBER() function in BOL
July 10, 2008 at 8:55 am
Viewing 15 posts - 466 through 480 (of 499 total)