All Forums Database
hluu 1 post Joined 11/12
03 Jan 2013
Parse and validate select statement

Hi All,
Is there a way to parse and validate a SQL select statement w/o executing it using Teradata JDBC driver or another mechanism?
Thanks,
Hien
 

WAQ 158 posts Joined 02/10
03 Jan 2013

Well in SQLA you can use F6 to get the explain plan. It will only generate the plan if you query is correct syntatically.

tomnolan 594 posts Joined 01/08
07 Jan 2013

Yes, the way to parse and validate a SQL select statement without executing it, using the Teradata JDBC Driver, is to prepare the SQL statement:
PreparedStatement ps = con.prepareStatement("select * from mytable");

You must sign in to leave a comment.