Forum Replies Created

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

  • RE: Resultset to display in column Format

    Hi,

    In this case you have to create a TEMP table

    declare @iStartID int,

               @iEndID int,

               @sqlcol as nvarchar(4000)

    select @iStartID = 3, @iEndID = 8

  • RE: Resultset to display in column Format

    declare @sqlcol as nvarchar(4000)

    select @sqlcol=''

    select  @sqlcol = @sqlcol + ' ' + COALESCE (rtrim(name), 'NULL') from country_master where id < 3

    print @sqlcol

  • RE: Resultset to display in column Format

    Hi,

    What about this one...

    declare @sqlcol as nvarchar(4000)

    select @sqlcol=''

    select  @sqlcol = @sqlcol + ' ' + rtrim(Name ) from country_master where id < 3

    print @sqlcol

     

  • RE: Updating multiple referance column data seperated by comma.

    Try this...

    CREATE TABLE [dbo].[Table3] (

     [table1_Col1] [char] (1000) NULL ,

     [table1_Col1_new] [char] (1000)  NULL

    )

    GO

    ----------

    CREATE TRIGGER table2_update

    ON table2

    for update

    AS

    BEGIN

    declare @OldCol as varchar(100)

    declare @NewCol as varchar(100)

    declare @Col as...

  • RE: Need to Select rows from a Top 10 Result

    Try this script...

    select top 10 OD.*, rownumber

    from

         (

           select  temp1.productid productid,

                     temp1.ORDERID ORDERID,

                     count(*) rownumber

            from

                     (

                       SELECT   a1.*

                       FROM  [order details] a1

                       join

                                 [order...

  • RE: Need to Select rows from a Top 10 Result

    Do you have 'rs' tabel ot view in Northwind DB?

     

  • RE: Databases displayed with (suspect)

    Hi,

    Have a look at Resetting the Suspect Status in BOL

    Microsoft® SQL Server™ 2000 returns error 1105 and sets the status column of...

  • RE: Sargable condition slower than non-sargable...why?

    Hi Aaron. SQL Server is configured to use a physical pool of memory on the server, and it will allocate the majority of this memory pool to hold data pages...

  • RE: How to Query a missing record from a table?

    Try this..

    Declare @tbATable Table(ID Int Identity(1,1) Not Null,AName varChar(20),ADate DateTime)

    declare @CurrentDate  DateTime

    set @CurrentDate = GetDate()

    Insert @tbATable (AName,ADate) Values('A',@CurrentDate-4)

    Insert @tbATable (AName,ADate) Values('A',@CurrentDate-3)

    Insert @tbATable (AName,ADate) Values('A',@CurrentDate-2)

    Insert...

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