Viewing 15 posts - 14,701 through 14,715 (of 14,953 total)
I may be missing something, but why not just use a Group By, Max(Date) and Having Count(*) > 1, type query on this?
February 11, 2008 at 1:42 pm
Please provide a copy of the table structure.
(Right click the table in Management Studio, select Script Table as -> CREATE to -> clipboard, then paste that into the forum here.)
If...
February 11, 2008 at 12:49 pm
I use Identity columns in many, but not all tables.
For example, and identity is the best key I've found yet for people. Same name different person, same person different...
February 11, 2008 at 12:10 pm
"IDs" is a valid name for them. Same as "identities".
"Indexes", on the other hand, are a means of storing parts of a table in a separate structure, to speed...
February 8, 2008 at 7:29 pm
Vertical partion on the table is the only real way. Works just fine.
February 8, 2008 at 2:33 pm
You might try changing it to a derived table in the From clause, instead of an inline sub-query in the Select clause. I haven't tested that, but from what...
February 8, 2008 at 2:30 pm
Aha! You're using the wrong word. The word you want is "identities", not "indexes". ("Indexes" is probably the right word in some other context, but in SQL,...
February 8, 2008 at 2:08 pm
You'd need to have some sort of payment category datum. Then "Express Cash" and "Payment Services" could be part of the same category, and the case statement could refer...
February 8, 2008 at 1:46 pm
Timothy Ford (2/8/2008)
(SELECT @list_id = COALESCE(@list_id + ', ', '') + ' ' + LTRIM(RTRIM(pit1.secondary_id))
FROM partyInfoTable pit1
WHERE pit1.primary_id = pidt.primary_id) as list_id
Pay...
February 8, 2008 at 1:29 pm
You don't have a comma after "pidt.primary_id" on the first line of the outer select.
If you get rid of the "@list_id = " part of the sub-query, it compiles. ...
February 8, 2008 at 1:27 pm
Joe Celko (2/7/2008)
February 8, 2008 at 1:21 pm
I've had to solve this one numerous times.
A cursor is deadly slow.
A while loop is pretty fast.
A CTE is the fastest, but only by a small margin.
Here are some tests.
Set-up:
use...
February 8, 2008 at 1:06 pm
Sounds to me like you'll need to add a column to the Rank function. Something like "(select count(*) from uploads where userid = users.userid)". Join to a CTE/Derived...
February 8, 2008 at 8:46 am
It seems odd to me to have an identity column be part of a primary key, as opposed to being the whole primary key by itself.
The way the table is...
February 7, 2008 at 1:23 pm
Viewing 15 posts - 14,701 through 14,715 (of 14,953 total)