Viewing 15 posts - 16 through 30 (of 60 total)
Jack Corbett (11/8/2011)
I ran it on a...
November 8, 2011 at 7:29 am
Nice question - got it wrong today 'cos I thought the response "query out of order" referred to a syntax error and not otherwise. It parsed successfully but blew up...
November 8, 2011 at 2:18 am
Hugo Kornelis (10/24/2011)
codebyo (10/24/2011)
wware (10/24/2011)
October 25, 2011 at 6:54 am
Nice question ... and thanks for the alternatives posted by other users.
October 24, 2011 at 3:36 am
Thanks guys!
Due to the length of time that had gone by when I submitted the question, I almost forgot the answer 🙂
Kwex.
October 19, 2011 at 2:53 am
Thanks Drew ... that was another "classy" solution 🙂
September 30, 2011 at 1:43 am
yubo1 (9/29/2011)
here are test sql_code below:
create table test
(
col1 int,
col2 int
)
insert into test
select 1,null
union
select 2,2
...
September 29, 2011 at 4:47 am
Thanks guys for taking time to respond.
I'm not sure what level of DDL you expect, but I hope this can suffice.
IF OBJECT_ID('tempdb..#test') IS NOT NULL
DROP TABLE #test
GO
CREATE TABLE #test (ID...
September 29, 2011 at 4:30 am
GilaMonster (9/29/2011)
Did you try Howard's suggestion?
Yes I have. This just sets that row to NULL, and still uses up the numbering. Thus, the next NON-NULL row would not have [Prev...
September 29, 2011 at 3:37 am
Thanks guys.
The TSQL Phrase is
SELECT *, ROW_NUMBER() OVER (PARTITION BY colA ORDER BY colB) FROM tbl;
Adding more light to my initial post, I desire to return all rows in...
September 29, 2011 at 3:06 am
I got it wrong today ... as I completely forgot the role of "HASH" in the join statement. Grrrrr ....
September 20, 2011 at 2:30 am
Nice question ... interesting to learn something new too.
September 19, 2011 at 2:37 am
Nice question ... pls amend the second SELECT statement to have a return value of 1 and not 2.
Kwex.
September 15, 2011 at 2:57 am
Viewing 15 posts - 16 through 30 (of 60 total)