|
Archives of the TeradataForumMessage Posted: Mon, 28 Jan 2002 @ 17:55:50 GMT
Hi, Is it possible to use a variable for a table name in the FROM clause? I get the following error when I compile this SP. SPL1027:E(L11), Missing/Invalid SQL statement'E(3707):Syntax error, expected something like a name between the 'From' keyword and ':'. replace procedure sp_test_insert() BEGIN DECLARE tname CHAR(30); SET tname = 'my_table'; INSERT INTO dba.process_table (process_id,process_name) SELECT Process_ID, Process_Name From :tname Where process_date = DATE; END; Appreciate any help with this. Thanks, girija
| ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||