Forum Replies Created

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

  • RE: Need help

    Thanks for the reply.

    There is a column name1, in it the rock value is duplicate,

    So i need output of the name column.

    Thanks in advanced.

  • RE: How to compate cross column values

    Thank You 🙂

  • RE: How to compate cross column values

    Thanks for your reply..

    Its very much helpful to me..

    But i want to know is there any other way without using ROW_NUMBER() function ??

    B'cause i am using server 2000 so its...

  • RE: How to compate cross column values

    Hello Thanks for reply

    below is script

    create table #temp

    ( col1 int , col2 int , dt1 datetime , dt2 datetime )

    insert into #temp

    select 1,5,'7/1/2013','7/5/2013'

    union

    select 1,5,'7/7/2013','7/7/2013'

    union

    select 1,5,'7/7/2013','7/9/2013'

    union

    select 1,5,'7/10/2013','7/15/2013'

    union

    select 1,5,'7/15/2013','7/18/2013'

    union

    select 1,5,'7/18/2013','7/20/2013'

    select * from...

  • RE: how to get data where value is null

    Thank You Very Much...

    Its so helpful to me..

  • RE: select records between a date range

    My SQL:

    select *

    from [Assessor_Forms].[dbo].[tblRental]

    where TransactionDateStamp >= convert(datetime, '07/01/2011')

    and TransactionDateStamp < convert(datetime, '08/15/2011')

    Hello Try This,

    select *

    from [Assessor_Forms].[dbo].[tblRental]

    where TransactionDateStamp >= convert(date, '07/01/2011')

    and TransactionDateStamp < convert(date, '08/15/2011')

  • RE: Finding all CID's with certain criteria

    Try this....

    create table #txn

    (

    jid varchar(5) primary key

    ,cid varchar(5)

    ,Dt datetime

    ,Amt int

    ,Opt bit

    )

    GO

    insert into #txn values ('abc','123','2012-03-01',10,0),

    ('def','456','2011-11-11',20,1),

    ('ghi','789','2011-12-15',30,0),

    ('jkl','234','2012-01-08',25,1),

    ('mno','123','2012-01-15',20,1)

    GO

    create table #ri

    (

    cid VARCHAR(5)

    ,bal INT

    )

    go

    INSERT INTO #ri VALUES ('123',50),

    ('456',120),

    ('789',45),

    ('234',200)

    GO

    SELECT *

    FROM #txn

    SELECT *

    FROM...

  • RE: How can i know which columns are ununsed in my table?

    Please explain about what "columns" you have in mind, and who is "using" them.

    Are you suggesting that some dynamic procedure is executing and you want to know which columns it...

  • RE: How to substract from one column to another ?

    All of you thank you very much for reply....

  • RE: query

    Thanks for reply....

  • RE: query

    Sorry i havent any logic ....

  • RE: Update record if exists else create new

    Hello Try This Example --

    create table #a ( id int, col varchar(5) )

    insert into #a

    values (1,'a'),(2,'b'),(5,'c')

    create table #b ( id int, col varchar(5) )

    insert into #b

    values (1,'a'),(3,'b'),(4,'c')

    merge into

    #b...

  • RE: Update record if exists else create new

    Hello Try This Example --

    create table #a ( id int, col varchar(5) )

    insert into #a

    values (1,'a'),(2,'b'),(5,'c')

    create table #b ( id int, col varchar(5) )

    insert into #b

    values (1,'a'),(3,'b'),(4,'c')

    merge into

    #b...

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