Forum Replies Created

Viewing 15 posts - 61 through 75 (of 79 total)

  • RE: crosstab SQL Server 2000

    Is count of followupdate fixed ?

    Vaibhav K Tiwari
    To walk fast walk alone
    To walk far walk together

  • RE: crosstab SQL Server 2000

    This may help you...

    select

    distinct t.patientid, stuff(

    (

    select distinct ' '+ convert(varchar(12),followupdate, 103)

    from followup as t1

    where t1.patientid = t.patientid

    for xml path('')

    ),1,1,' ') from followup as t;

    Vaibhav K Tiwari
    To walk fast walk alone
    To walk far walk together

  • RE: How to search exact word using LIKE operator?

    You should ask such questions in the forum of site

    http://www.sqlservercentral.com/Forums/Forum433-1.aspx

    Vaibhav K Tiwari
    To walk fast walk alone
    To walk far walk together

  • RE: Can this CTE based query be written more efficiently?

    Bhuvnesh (3/25/2010)


    try this select TransactionID,

    sum(TOT) as TOT,

    sum(UniqueEnvs) as UniqueEnvs,

    sum(GBX) as GBX,

    sum(IEX) as IEX,

    sum(UNK) as UNX,

    DateTimeReceived

    ...

    Vaibhav K Tiwari
    To walk fast walk alone
    To walk far walk together

  • RE: Can this CTE based query be written more efficiently?

    Kingston Dhasian (3/25/2010)


    SELECTpkTransactionID, [TOT],

    ISNULL( [TOT], 0 ) + ISNULL( [GBX], 0 ) + ISNULL( [IEX], 0 ) + ISNULL( [UNK], 0 ) UniqueEnvS,

    [GBX], [IEX], [UNK], DateTimeReceived FROM(

    SELECTpkTransactionID, LEFT( ComponentText, 3...

    Vaibhav K Tiwari
    To walk fast walk alone
    To walk far walk together

  • RE: T-SQL CASE Problem

    BrainDonor (3/25/2010)


    Yet another way:

    --CREATE TABLE tblCompany(

    --CompanyIDint,

    --CompanyNamevarchar(max),

    --Activevarchar(5),

    --LastModifieddateTime

    --)

    --INSERT INTO tblCompany(CompanyID, CompanyName, Active, LastModified)

    --SELECT 1, 'A Company', 'Yes', '01 MAR 2010'

    --UNION

    --SELECT 2, 'Another Company', 'Yes', '01 MAR 2010'

    --UNION

    --SELECT 3, 'Yet Another Company', 'No',...

    Vaibhav K Tiwari
    To walk fast walk alone
    To walk far walk together

  • RE: T-SQL CASE Problem

    dec_obrien (3/25/2010)


    Hi,

    I'm trying to build an sp that will return a list of companies where the company first letter is specified. I also want to cater...

    Vaibhav K Tiwari
    To walk fast walk alone
    To walk far walk together

  • RE: Query out tables and sps

    parthi-1705 (3/24/2010)


    Hi

    But What about scripting Tables i need to script tables how to do it.

    Thanks

    Parthi

    As per my knowledge by T-SQL Table script can not be generated :unsure:

    Vaibhav K Tiwari
    To walk fast walk alone
    To walk far walk together

  • RE: Query out tables and sps

    You can use the following to avoid cursor

    DECLARE @string VARCHAR(MAX)

    SET @string = ''

    SELECT @string = @string + 'EXEC ( ''sp_helptext ' + name + ' '')' from sys.sysobjects where xtype...

    Vaibhav K Tiwari
    To walk fast walk alone
    To walk far walk together

  • RE: How to search exact word using LIKE operator?

    Excellent BrainDonor, really appreciable :Wow:

    Vaibhav K Tiwari
    To walk fast walk alone
    To walk far walk together

  • RE: select all field except field wich have NULL value

    Bhuvnesh (3/10/2010)


    sinamora (3/9/2010)


    Day1 Day2 Day3 Day4 Day5

    12 3 ...

    Vaibhav K Tiwari
    To walk fast walk alone
    To walk far walk together

  • RE: select all field except field wich have NULL value

    below will give you those column names and values which have not any null value

    ;with cte as

    (

    SELECT ColumnNames, Value, COUNT(ColumnNames) AS cnt

    FROM

    (

    SELECT day1, day2, day3, day4, day5 FROM days

    )...

    Vaibhav K Tiwari
    To walk fast walk alone
    To walk far walk together

  • RE: Calculating tenure in position

    Please post table structure for dates

    Vaibhav K Tiwari
    To walk fast walk alone
    To walk far walk together

  • RE: Distinct values from all the columns of a sql 2005 table

    Ramesh sir,

    I was also working with in infoton vile parle.

    I also left infoton 1 month before.

    I listent a lot about you...

    and most of the procedures of paysmart was written by...

    Vaibhav K Tiwari
    To walk fast walk alone
    To walk far walk together

  • RE: SQL 2005 Holding the last not value on several columns

    This may give you required output....

    DECLARE @tbl AS TABLE ( [pkId] int, [Col1] int, [Col2] int, [Col3] int, [Col4] int )

    DECLARE @tbl1 AS TABLE ( [pkId] int, [Col1] int, [Col2]...

    Vaibhav K Tiwari
    To walk fast walk alone
    To walk far walk together

Viewing 15 posts - 61 through 75 (of 79 total)