Forum Replies Created

Viewing 8 posts - 1 through 9 (of 9 total)

  • RE: create table to group th e people of same department

    with it as (select row_number() over (order by name) as row_num, name, department from #test where department = 'IT')

    ,marketing as (select row_number() over (order by name) as row_num, name, department...

    There is always something new to learn.
    My personal SQL Blog[/url]

  • RE: Table Join using unique values or where Null = all values

    Something like this ?

    SELECT b.DeliveryName, a.Item, a.[Description]

    FROM

    TableA a JOIN Tableb b ON (a.Area = b.ColId) or (a.Area is null)

    There is always something new to learn.
    My personal SQL Blog[/url]

  • RE: Unable to find Server name on my local machine.

    You have to look in the services on your local machine and see the name that was given to you installed instance.

    There is always something new to learn.
    My personal SQL Blog[/url]

  • RE: Comparision of tables in two instances

    Minnu (3/20/2013)


    Am having two instances A and B, in that having a table called students in two databasess, but the records are not in match,

    i want to retrieve records which...

    There is always something new to learn.
    My personal SQL Blog[/url]

  • RE: a query like factorial

    if you just want to concatenate the values from a given table you can try this :

    CREATE TABLE #temp

    (

    id ...

    There is always something new to learn.
    My personal SQL Blog[/url]

  • RE: How to Remove duplicate records (rows)

    wmalik001, you should not use text data type, unless you use sql server 2000. You should use varchar(max)...

    There is always something new to learn.
    My personal SQL Blog[/url]

  • RE: How to Remove duplicate records (rows)

    DELETE

    FROM dbo.SMRights

    WHERE gRightSID NOT IN

    (

    SELECT a.gRightSID

    FROM (select row_number() over( prtition by DuplicateColumn1, DuplicateColumn2, DuplicateColumn3,Duplicatecolumn4,Duplicatecolumn5 order by Duplicatecolumn5) as rownum, gRightSID from dbo.SMRights ) a where a.rownum=2)

    hope it works.

    There is always something new to learn.
    My personal SQL Blog[/url]

  • RE: Problem renaming tables while select is running

    you have run all the scripts in the same batch...and it will execute the queries in order. The problem appears if you run the select in a different batch.

    I saw...

    There is always something new to learn.
    My personal SQL Blog[/url]

Viewing 8 posts - 1 through 9 (of 9 total)