dbTalk Databases Forums  

Error while parsing for parameters

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


Discuss Error while parsing for parameters in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Paul Makulski
 
Posts: n/a

Default Error while parsing for parameters - 04-01-2004 , 05:15 PM






SQL 2000

I have a Transform Data Task
that has a SQL query as the source.
It uses a function:

SELECT SegmentCode, SUM([Value]) AS Amount
FROM dbo.FnGLSegJE('200401', 'A', 62)
GROUP BY SegmentCode

If I hit preview, this works just fine.

But when I change the hardcoded '200401' to a ? and hit
the Parameters button, I get this error message:

An error occurred while parsing the SQL statement for
parameters. Check syntax ...

Any ideas? I've used parameters sucessfully, but never
with a function.

Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Error while parsing for parameters - 04-02-2004 , 01:39 AM






This will most likely be the Design time parser. It is less robust that
it's runtime brother. A way around this is to create the whole statement up
fron of the DataPump task and then substitute in the statement at runtime
ala

Global Variables and SQL statements in DTS
(http://www.sqldts.com/default.aspx?205)

--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"Paul Makulski" <msn (AT) makulski (DOT) ca> wrote

Quote:
SQL 2000

I have a Transform Data Task
that has a SQL query as the source.
It uses a function:

SELECT SegmentCode, SUM([Value]) AS Amount
FROM dbo.FnGLSegJE('200401', 'A', 62)
GROUP BY SegmentCode

If I hit preview, this works just fine.

But when I change the hardcoded '200401' to a ? and hit
the Parameters button, I get this error message:

An error occurred while parsing the SQL statement for
parameters. Check syntax ...

Any ideas? I've used parameters sucessfully, but never
with a function.



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.