|
Archives of the TeradataForumMessage Posted: Fri, 13 May 2011 @ 09:06:10 GMT
Hi, As Mike said, this isn't possible in 'raw SQL'. But as you said that you need to maintain a 'single program' then you'd typically do this in the program code. When the code is building the SQL (plugging in date ranges, other variables for the WHERE clause etc) then also plug in the schema name. Another alternative may be to get this work done in a stored procedure (I'm fairly certain you can do this there). An SP will allow you to change the schema name at run time. I think that even if the column list being returned is different you can do this with dynamic SQL in the SP. Cheers, Dave Ward Analytics Ltd - Information in motion (www.ward-analytics.com)
| ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||