Forum Replies Created

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

  • RE: Incremental additions

    hi,

    I think this will give diif result in SQL Server 2008.

    if question is

    select @a += @b-2

    select @a

    then result will be

    like 0,-21

    bcoz...

  • RE: How to sum rows

    Try the follwoing query......

    select case convert(varchar(20),orderid) when 0 then 'Total' else convert(varchar(20),orderid) end as Orderid,

    buyerid,saleprice,title

    from

    (

    select * from (

    select case grouping(title) when 1 then 0 else orderid end as orderid,buyerid,sum(saleprice)...

  • RE: Can we have more than one identity columns in a table

    Identity is the column having property to uniquely identify the row.

    If you are going to make two identity columns then what sense it makes.

    Nothing.

    even we cant declare the...

  • RE: How to create a new Database and copy data from existing DB

    Hi,

    Can you tell me why u r goin to Create Database on daily basis.

    rather than you can do

    scripts for defination of tables and their constraints(one time only),

    scrips for truncating...

  • RE: Primary Keys

    When we creates the primary key it alwas enforce to create as Clustured.

    how it will enforce to create as NonClustered.

    Please Can u tell me.

  • RE: Convert VARCHAR into DATETIME

    Date should be in format MM-dd-yyyy to give it as varchar.

    Eg.'01/25/2009'

    try this one..

  • RE: how to group my results

    I have tried this & it works well.....

    when firstname,lastname and date are same then

    definately it groups the grades and give the avearage result.

    select firstname, lastname, date,avg(grades)

    from duplicate2

    group by firstname, lastname,date

  • RE: how to get only duplicate rows from table

    Here is the Query for u r solution....

    select * from tblSapmple

    where names in (

    select names

    from tblsample

    group by names

    having count(names)>1 )

  • RE: Little help with insert statement

    I think query should be :

    insert into server1.databaseA.dbo.tableA (id,version,versionType)

    SELECT

    A2.ID,

    ...

  • RE: Little help with insert statement

    I think query should be :

    insert into server1.databaseA.dbo.tableA (id,version,versionType)

    SELECT

    A2.ID,

    ...

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