dbTalk Databases Forums  

Re: Help with DTS

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Re: Help with DTS in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Help with DTS - 12-22-2006 , 04:56 AM






I would probably break this into 2

Get your @date into a Global variable in the first step. (assign to a
variable)

select convert(varchar(9),dbo.getwkendingfiledate(max(wee kending)
),112) as dt from dbo.archive where ( loc_id = ?)

Use it in the second.

--


Regards



Allan Mitchell


Konesans Ltd
T +44 7966 476 572
F +44 2071 008 479
http://www.konesans.com


"Chris" <Chris (AT) discussions (DOT) microsoft.com> wrote


Quote:
Hi,
I am trying to create an SQL task with the following



declare @date smalldatetime

select @date =
convert(varchar(9),dbo.getwkendingfiledate(max(wee kending)
),112)from dbo.archive
where ( loc_id = ?)

INSERT INTO dbo.archive
SELECT loc_id,

filename
@date,
current_timestamp as DateCreated
FROM dbo.anotherarchive
WHERE (loc_id = ?)

I get the error syntax or access violation error.

Any ideas?


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.