Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server DTS
|
SQL Server DTS Discussion specific to Data Transformation Service with SQL Server. General SQL Server discussions should use the general SQL Server forum. Readers of the book Professional SQL Server 2000 DTS with questions specific to that book should post in that book forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server DTS section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 9th, 2004, 03:06 AM
Registered User
 
Join Date: Jun 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Parameters in a DTS Transformation


I hope someone can help, as this has been driving me crazy for the last 2 days.

I have written script, which joins a Composite PK to the FK to speed up and reduce the amount of data loaded (30K rows reduces to around 2K).

Select
     Table1.*
from
    Table1
    Inner Join (Select
                   Column1, --Char
                   Column2 --Bigint
                from
                    Table2
                where
                   Column2 between ? and ?
                   and Column3 in ('Q','Z')) Join1 on
                               Join1.Column1=Table1.Column1
                               Join1.Column2=Table1.Column2

The problem is that when i try and assign the parameters, i get the following error :
 Error source Microsoft OLE DB Provider For SQL Server, syntax error or access violation.

Followed by :
  an Error occured while parsing the sql statement.

The transformation is from SQL server to SQL Server so there should be no problems with the query, I could understand it if the source was through ODBC.

If i remove the paramerts and put actual numbers in or move the parameters to the main select it works.

any Ideas?

Thanks in advance for all help.


 
Old July 9th, 2004, 07:06 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hello,

For parameterized queries, I don't believe you can use ?; you need to use a parameter variable, for example: @param1.

Brian





Similar Threads
Thread Thread Starter Forum Replies Last Post
xsl transformation ... rajesh_css XSLT 5 September 30th, 2008 12:37 AM
using transformation KieshaJ310 ASP.NET 2.0 Basics 2 June 6th, 2007 05:56 AM
Execute DTS with input parameters from a SP dbradley SQL Server 2000 6 March 22nd, 2006 05:36 AM
dts calls a lot of dts steffi_ma SQL Server DTS 2 May 24th, 2004 07:18 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.