|
Archives of the TeradataForumMessage Posted: Wed, 03 Nov 2004 @ 21:02:32 GMT
If you have SQL Assistant you can do 1 of 2 things depending on how many of these you need to run, if the values are known (available) ahead of time, and what type of statement it is. #1: Use named parameters (Requires SQL Assistant 6.2) eg. Select * from ?Tbl When you execute this you will be prompted to enter a value for 'Tbl' which can be of the form 'MyTable' or 'MyDB.MyTbl', or even include a where clause etc. #2: Use Import mode You can not use this method to substitute a table name if it is a Select, Insert, Update, or Delete statement. (Real parameterized sql is generated in these cases and table names are not legal parameters.) You can use it for Create statements, Collect/Show statements etc. however. (Any statement except the 4 above.) The statement will be executed once for each line in your Import file. The values in the import file will be substituted for the parameters in the query - indicated by ? characters.) Mike dempsey
| ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||