Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)

  • RE: Row_Number and Union query

    Yes..I used the full syntax..the problem is that using where clause to Gail's query throws an error..

    But no worries...all of our efforts didnt go waste... I tried this query and...

  • RE: Row_Number and Union query

    Also about the solution...

    "

    If you want to avoid that, either have the front end do the paging, or create a "permanent temp table" that includes some sort of connection ID....

  • RE: Row_Number and Union query

    I have tried that..it does not work

    SELECT * , ROW_NUMBER ... as RowNumber

    FROM

    (SELECT empid1,name1,joindate from emp where empid2=3

    union

    select empid2,name2,joindate from emp where id1=3) sub

    where RowNumber between 2 and 4

  • RE: Row_Number and Union query

    I dont have the queries that I typed saved....i have already posted the query that i am currently using to retrieve

    the data .. i want to use paging for...

  • RE: Row_Number and Union query

    create table emp (empid1 varchar(10),empid2 varchar(10),name1 varchar(10),name2 varchar(10),joindate datetime);

    insert into emp values(1,2,'Employee1','Employee2',getdate());

    insert into emp values(1,3,'Employee1','Employee3',getdate());

    insert into emp values(1,4,'Employee1','Employee4',getdate());

    insert into emp values(2,1,'Employee2','Employee1',getdate());

    insert into emp values(2,3,'Employee2','Employee3',getdate());

    insert into emp values(3,1,'Employee3','Employee1',getdate());

    insert into emp values(3,2,'Employee3','Employee1',getdate());

Viewing 5 posts - 1 through 5 (of 5 total)