Viewing 6 posts - 1 through 6 (of 6 total)
Short answer is NO,you can't.
You have to create your table (temp ot static)first.
If you do not have a stable data pattern in your text file how useful will be that...
March 4, 2009 at 12:32 pm
------'C:\Test\TestBulkInsert.txt' -----
--1, tablname1, datacolumn1, datacolumn2, datacolumn1,
--1, tablname2, 1, datacolumn2, 2, 3
--1, tablname2, datacolumn1, datacolumn2, datacolumn1,
--1, tablname1, datacolumn1, datacolumn2, datacolumn1,
--1, tablname2, 1, datacolumn2, 2, 3
drop table #Sample
create table #Sample(
f1 int,
f2 sysname,
f3...
March 3, 2009 at 3:59 pm
create function dbo.MonthList(@year int)
returns table
as
/*
USAGE:
declare @year int
set @year=2007
select * from dbo.MonthList(@year )
*/
return
select Months=upper(right(convert(varchar(11),dateadd(mm,n,dateadd(yy,@year-1900,0)),113),8))
from (
select 0 union all select 1 union all select 2 union all
select 3 union all select ...
May 30, 2007 at 5:04 pm
What DATEFIRST setting do you have?
with default which is 7 the condition :
AND DATEPART(dw, Date) NOT IN (6, 7) /* Eliminate Weekend Dates */
is wrong and should be "NOT IN (1,...
September 15, 2005 at 11:53 am
We need to find the first Monday for the month next to target one and then subtract 3 days.
declare @d datetime--any date within target month
set @d=getdate()
select LastFriday=dateadd(dd,-3,dateadd(wk,datediff(wk,0,dateadd(mm,datediff(mm,0,@d)+1,0)),0))
Regards,
Leonid
August 19, 2005 at 3:05 pm
Try this
SELECT
site=coalesce(T3.site,T4.site),
IPAddress,
HostName
FROM
Table3 T3 FULL OUTER JOIN
Table4 T4 ON T3.Site = T4.Site
order by site
--Leonid
January 7, 2005 at 11:34 am
Viewing 6 posts - 1 through 6 (of 6 total)