Viewing 15 posts - 211 through 225 (of 441 total)
Hi Bob,
You're right about the query, it fails to join when there is no match between the items table and the relationships, it all depends on what the requirements...
August 20, 2009 at 6:34 am
With the sample data, it's a lot easier to help.
Here's how I would do it, first get the items you do not want to show, and left join on the...
August 19, 2009 at 2:55 pm
Hi,
I don't see anything odd in your code, can you provide the source code for this function : dbo.fnparsestring().
Maybe you need to send the parameter (0) to it, to get...
August 19, 2009 at 12:59 pm
I corrected a few syntax errors you had, but I cannot test it.
You need to put the syntax that way
Select CASE WHEN a = B then X else Y...
August 18, 2009 at 2:40 pm
Want to post your piece of code, we'll check for the error.
August 18, 2009 at 2:24 pm
Yes, I really love the solution, I'll keep a small script for that, it'll be useful!
Thanks again
August 7, 2009 at 12:53 pm
GSquared (8/7/2009)
;
WITH Statuses
AS (SELECT
...
August 7, 2009 at 12:48 pm
How's this? Gets the data based on the Max(Status_Date) then gets the underlying status(text) from the table.
It is untested, since I cannot test it.
--update prot2 max_status_date
UPDATE prot2
SET ...
August 7, 2009 at 12:46 pm
Well, thanks for the times Gus.
I'm surprised to see a huge select case solution beats the group by, but it makes sense, when you think about all the union...
August 7, 2009 at 11:33 am
jordon.shaw (8/7/2009)
Actually, the primary key is the EMPLOYID, but its not unique. I know, I was like "What????" Anyway, what you did worked perfectly!!!Thanks,
Jordon
You are welcome, I'm happy...
August 7, 2009 at 8:09 am
I'm sure someone will something more elegant to work this out, but here's my shot at it:
USE tempdb
GO
IF EXISTS (SELECT 1
FROM sys.objects
WHERE...
August 7, 2009 at 7:33 am
Tell me if that helps, even though I just saw Gus already had a solution before you even posted your data.. grrr, 😉
Hope it helps..
USE tempdb
GO
IF EXISTS (SELECT 1
...
August 6, 2009 at 2:45 pm
Please provide the DDL of the table, and some sample data, in a ready to execute way, along with any query you have built so far, and I'll try to...
August 6, 2009 at 1:58 pm
jordon.shaw (8/6/2009)
August 6, 2009 at 1:45 pm
steven (8/4/2009)
Thanks it worked for me, but I don't know how to mark your reply as Answer. can you tell me?
I don't think you can in this forum, well, just...
August 4, 2009 at 1:59 pm
Viewing 15 posts - 211 through 225 (of 441 total)