November 17, 2017 at 11:14 am
Hi,
We are currently migrating our project database from teradata to SQL. In teradata all the input parameters in queries are passed as placeholder(?) . How can I convert that placeholder to sql parameter. Can someone please give me ideas on different approaches to pass the input parameters. Am new to teradata ,so please help me with it.
example of teradata query :
update tablename set id=? where id=?
Does SQL supports placeholder(?) to pass input parameters as in teradata.
Thanks in Advance !
November 17, 2017 at 11:51 am
I wouldn't expect you to be able to directly port anything that's not base ansi sql code without having to review and likely modify it.
November 17, 2017 at 11:04 pm
prasanna0184 - Friday, November 17, 2017 11:14 AMHi,We are currently migrating our project database from teradata to SQL. In teradata all the input parameters in queries are passed as placeholder(?) . How can I convert that placeholder to sql parameter. Can someone please give me ideas on different approaches to pass the input parameters. Am new to teradata ,so please help me with it.
example of teradata query :
update tablename set id=? where id=?Does SQL supports placeholder(?) to pass input parameters as in teradata.
Thanks in Advance !
IIRC, the parameter placeholder "?" can either be named or not named, in the latter case it would depend on the order of the values passed.
Would have expected to see something likeupdate tablename set id=?NewVal where id=?OldVal
If the query is being run in SQL Assistant, then this is not proper parameterization as the SQLA will simply replace the value passed in the query.
To convert to T-SQL, simply use the variable and input parameter declaration, i.e.DECLARE @MYVAR [MyType]
Question, have you done static code analysis to find uncompatible features used?
November 19, 2017 at 5:50 pm
prasanna0184 - Friday, November 17, 2017 11:14 AMHi,We are currently migrating our project database from teradata to SQL. In teradata all the input parameters in queries are passed as placeholder(?) . How can I convert that placeholder to sql parameter. Can someone please give me ideas on different approaches to pass the input parameters. Am new to teradata ,so please help me with it.
example of teradata query :
update tablename set id=? where id=?Does SQL supports placeholder(?) to pass input parameters as in teradata.
Thanks in Advance !
WHICH QUERIES? Do you mean as generated in the front end or in stored procedures?
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy