Viewing 15 posts - 601 through 615 (of 683 total)
Scorpion - Have you been drinking? ![]()
Allen - Nicely written question
You've done this exactly how...
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
March 16, 2006 at 10:45 am
You mean "Joe Celko's Trees and Hierarchies in SQL for Smarties"?
Shame on you Joe! ![]()
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
March 16, 2006 at 2:44 am
Just use a case statement ![]()
Something like...
select isnull(p1.dep_number, p2.dep_number) as dep_number, TurnW1, TurnW2,
case when...
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
March 16, 2006 at 2:41 am
Check the triggers of that table...
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
March 15, 2006 at 9:58 am
You can do this too...
SELECT ISNULL(address2, address1) AS Result FROM tablename
Or...
SELECT COALESCE(address2, address1) AS Result FROM tablename
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
March 15, 2006 at 9:53 am
Hi All,
Matt - you're not just looking for this, are you?
select ProjectID, min(User_Rank) as User_Rank from Myview Group by ProjectID
Ryan Randall Solutions are easy. Understanding the problem, now, that's the hard part.
March 15, 2006 at 9:50 am
You'll need to do something like this...
select a.*, commentcount
from tbl_UserBlog a
inner join (select UserBlogID, count(*) as commentcount From tbl_Comments group by UserBlogID) b
on a.UserBlogID...
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
March 15, 2006 at 8:09 am
You'll be needing a UNION:
DECLARE @t TABLE (dssid1 VARCHAR(3), dssid2 VARCHAR(3), dssid3 VARCHAR(3), name1 VARCHAR(20), name2 VARCHAR(20), name3 VARCHAR(20))
INSERT INTO @t
SELECT '001', '003',...
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
March 15, 2006 at 8:03 am
Thanks Junkie ![]()
I don't think you'll need to do anything dynamically - if 8 levels is your max, just extend it as below, and...
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
March 15, 2006 at 7:58 am
Hi Jean-Pierre,
I'd probably do something like this (so a bit of a combination of the two techniques
)...
Good luck!
--This SQL...
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
March 15, 2006 at 5:21 am
Ignoring the fact that you probably ought to think some more about your data structure
, this query below does the trick (I think)...
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
March 15, 2006 at 4:04 am
Maybe I'm missing something, but why is 7264;20433;17886 (Level 2, TableSort 2) above 7264;20433;40264 (Level 2, TableSort 1)? ![]()
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
March 14, 2006 at 11:34 am
I was more meaning that you had the 1, 2 and 3 in the wrong order (or so it seemed), rather than the output, but no matter. ![]()
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
March 14, 2006 at 9:50 am
No problem James - solving problems like this is fun! ![]()
I don't know anything about Sybase though - sorry ![]()
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
March 14, 2006 at 7:57 am
Viewing 15 posts - 601 through 615 (of 683 total)