Viewing 4 posts - 1 through 4 (of 4 total)
Mate,
use northwind
declare @STR varchar(255)
set @STR =""
select @STR = @STR +
convert(varchar, orderid) +','
from orders
select @STR
Cheers,
Russel ....
Russel Joseph
September 29, 2003 at 1:21 am
#476142
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 !!!...
March 21, 2002 at 8:00 am
#425818
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.
March 21, 2002 at 7:55 am
#425815
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...
March 21, 2002 at 7:18 am
#425808