Forum Replies Created

Viewing 8 posts - 436 through 443 (of 443 total)

  • RE: How to retrive all row value in single column?

    How about COALESCE

    Declare @vc as varchar(max)

    Select @vc = COALESCE(@vc + ',','') + EmployeeName from tEmployee

    Select @vc

    Also, you can use where clause to filter the Select statament

  • RE: Date Function

    DECLARE @MyDate datetime

    SET @MyDate = '1994-08-01 00:13:00.000'

    -- Converting date to varchar gives you option to convert in the

    --required format and then convert back to the datetime for future

    --referance...

  • RE: Using Exists in IF condition

    I executed the code on my SQL Server and found no error (SQL Server 2005 Ent). Also, the insert statement executes according to the conditions.

  • RE: Find the Difference between two tables, listing the column values that differ

    Thanks for the reply...

    Actually, I am passing XML from the trigger. This XML consists of data from the Inserted and deleted virtual tables.

    I dont know how will I embed the...

  • RE: Stuck to using pivot table

    I hope this will help you

    OR At least will give a solid clue to your solution...

    --I created the following structure table and inserted the rows as required...

    CREATE TABLE [dbo].[tblDR](

    [Date_t]...

  • RE: rows into columns

    As far as I understood your problem...

    CREATE TABLE [dbo].[tblABC](

    [C1] [varchar](50) NULL,

    [V1] [varchar](50) NULL

    )

    Declare @sSqlC varchar(1000)

    select @sSqlC = COALESCE(@sSqlC + ',','') + ' ''' + cast(tblABC.[V1] as varchar(20)) + ''' As...

  • RE: Convert Row Values into Column

    Check this out...

    Declare @sSqlC varchar(1000)

    select @sSqlC = COALESCE(@sSqlC + ',','') + ' ''' + cast(tblDating.[Date] as varchar(20)) + ''' As Col' + cast(tblDating.id as varchar) from tblDating

    set @sSqlC = 'Select...

  • RE: Problem with Merge Replication...

    Yes... initially the replication starts and I have also witnessed the status as ruuning some script files. But after running few script files, error is shown as mentioned in Problem...

Viewing 8 posts - 436 through 443 (of 443 total)