I am trying to call Graphgen funtion with jdbc, it seems not work.but it works in Teradata sql assistant.
Any one can help? Thanks!!!
Sorry, but my crystal ball didn't show me any details, so it's your turn:
What did you try and how did it fail?
con = DriverManager.getConnection(url, "abc", "abc");
rs=stmt.executeQuery("SELECT path FROM GraphGen"
+"PARTITION by 1 "
The error show "SQLEXCEPTION:ERROR: syntax error at or near "1", but i did try the mr-sql in sql assistant client, it works!
When you check the resulting SELECT string you will easily see why it fails.
You concat all those parts of the SELECT statement without additional spaces.
It's recommended not to execute a concatenated string directly. When you assign it to a string variable it's easy to inspect the actual string value.