Forum Replies Created

Viewing 15 posts - 346 through 360 (of 1,048 total)

  • RE: IF ELSE Query

    I am not clear with your requirement..can you please some more detailed information to us.......

  • RE: Record Being Duplicated In Join Statement

    mkswanson (7/19/2013)


    In the statement below, there is a problem where some records are occasionally duplicated. I have not been able to figure out where my problem is.

    When...

  • RE: Help with SQL query

    mehfuz.khaled (7/20/2013)


    Op is also char. Sorry about that.

    Change the datatype of Op to CHAR and run the query that I posted... Hope it will work for you

  • RE: Help with SQL query

    you can try this-

    ;WITH CTE AS

    (

    select op,imei, DENSE_RANK() over (order by op,imei) rankno

    FROM mastertab

    )

    select c.op, COUNT(distinct rankno) - 1 cnt

    FROM CTE c

    GROUP BY c.op

  • RE: Help with SQL query

    First thing is your table structure is incorrect..

    You have specified op as INT but you are inserting character values in that column

    aa, 0191, 111222333

  • RE: MERGE statement - WHEN NOT MATCHED DELETE takes ages

    Can you please provide your merge script that you have written,,,,,

  • RE: creating a non sequential incremental number field

    As Sean said we are not cleared what you are trying to achieve and your Select statement is also incorrect as you have nt specified any column names.....

    Can you please...

  • RE: Identity property

    ChrisM@Work (7/19/2013)


    Steve-3_5_7_9 (7/19/2013)


    kapil_kk (7/19/2013)


    NO you cant add the IDENTITY property to the existing column using a sql query....

    But it can be done from edit design of a table

    Of course you...

  • RE: Identity property

    Steve-3_5_7_9 (7/19/2013)


    kapil_kk (7/19/2013)


    NO you cant add the IDENTITY property to the existing column using a sql query....

    But it can be done from edit design of a table

    Of course you can....

  • RE: Update Problem

    PLease provide the proper DDL statements and data so that we can help you in your problem....

    Refer this link whever you post any problem:

    http://www.sqlservercentral.com/articles/Best+Practices/61537/

  • RE: LS

    Thanks Perry... I was unaware about this TUF file fact...

  • RE: Identity property

    NO you cant add the IDENTITY property to the existing column using a sql query....

    But it can be done from edit design of a table

  • RE: SPs inside BEGIN/ROLLBACK TRAN

    dan-572483 (7/18/2013)


    Interesting! When tinkering with data, I've often forgotten to to run COMMIT TRAN until the last change, then just ran COMMIT TRAN repeatedly until "The COMMIT TRANSACTION request...

  • RE: What's in a name?

    I select SSDT as now when we open new SQL SERVER 2012 it comes with name Server Server Data Tool so I selected that option but still got wrong :w00t:

  • RE: Looking for a clever solution

    You can do one thing.....

    You can assign your constant value to a variable like this

    Declare @var char(3) ='abc'

    And put this variable in condition of your case statements.... So if...

Viewing 15 posts - 346 through 360 (of 1,048 total)