Forum Replies Created

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

  • RE: re: Creating a pivot query through SQL

    Mate,

    use northwind

    declare @STR varchar(255)

    set @STR =""

    select @STR = @STR +

    convert(varchar, orderid) +','

    from orders

    select @STR

    Cheers,

    Russel ....

    Russel Joseph

  • RE: last day of the month

    The above script does only return the last day of the year! I think u require the last day of the month for anyt given month.

    Here lies the solotion !!!...

  • RE: last day of the month

    the above solution would work if the date format is mdy. If the date format is the default dateformat of SQL Server then the above script would fail.

    Russel Joseph

  • RE: Creating a table from a subquery

    Hi all,

    There is way to crack the problem and it is as follows

    select (select count(*) from tab1) as tabname into tab2

    This could return an error if the 'Select into/bulkcopy' is...

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