Viewing 8 posts - 106 through 113 (of 113 total)
declare @year int
declare @uptomonth int
declare @Date datetime
set @year=2011
...
December 2, 2011 at 11:20 pm
declare @year int
declare @uptomonth int
declare @Date datetime
set @year=2011
...
December 2, 2011 at 11:19 pm
ISNULL(load_date) ? 01/01/1111 : load_date
when user load_date is datetime at that time 01/01/1111 is not supported sql server.
sql server support date starting from 01/01/1753.
November 30, 2011 at 12:38 am
BACKUP DATABASE [AdventureWorks] TO
DISK = N'\as\Backup\L40\SQL2005\AdventureWorks_backup_200702120215.bak'
WITH NOFORMAT, NOINIT, NAME = N'AdventureWorks-Full Database Backup',
SKIP, NOREWIND, NOUNLOAD, STATS = 10
November 29, 2011 at 7:56 pm
create function split(@par varchar(max)
returns table
declare @t table(id varchar(max))
declare @val varchar(100)
begin
while charindex(',',@par)>1
begin
set @val=substring(@val,1,(charindex(',',@par)-1))
insert into @t1 values(@val)
set @par=substring(@par,(charindex(',',@par)+1),len(@par))
end
insert into @t1 values(@par)
return @t1
end
-----------
example
select split('a,b,c')
o/p
----------
a
b
c
November 29, 2011 at 7:55 am
when i am using above query in below in put but i am not getting excute out put
pls help me.
-------input---------
todate id SM BM
2011-05-25 00:00:00.000 R10321 Gaurav Mehta Mihir Vaidh
2011-06-20 00:00:00.000 R10321 Chintan Raval Arjun M Moorjani
2011-06-20 00:00:00.000 R10321 Gaurav Mehta Rajesh Parmar
2011-08-17...
November 13, 2011 at 11:05 pm
Viewing 8 posts - 106 through 113 (of 113 total)