Forum Replies Created

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

  • RE: Order by Query

    create table source (timecol varchar(20))

    insert into source values('6 hours 00 minutes');

    insert into source values('6 hours 30 minutes');

    insert into source values('7 hours 00 minutes');

    insert into source values('7 hours 30 minutes');

    insert into...

  • RE: How to get the list of dates between two dates usind sql query?

    create table testtable (startdate datetime, enddate datetime)

    insert into testtable values(getdate(), dateadd(day, 5, getdate()));

    with test (startdate, enddate) as

    (select startdate, enddate from testtable

    union all

    select dateadd(day, 1, test.startdate), test.enddate from...

  • RE: Hot to update line X in a table with the value from line X+1?

    And this is my solution:

    create table dbo.table1(name varchar(10), code int, last_code int);

    insert into dbo.table1 values ('MC1',100,NULL);

    insert into dbo.table1 values ('MC2',200,NULL);

    insert into dbo.table1 values ('MC3',250,NULL);

    insert into dbo.table1 values ('MC4',300,NULL);

    insert into dbo.table1...

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