vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Under DB2 v7, while writing JDBC/Java/SQL code to query the database, I could embed newlines in my SQL, ala: ResultSet rs = stmt.executeQuery("select blah \n" +"from blahblah") ; This worked fine. However, if I try this under DB2 v8, I get: SQL Error Code -7, SQL State 42601, The character " " following "select blah " is not valid. Why is this? Can I get around it w/ a JDBC setting? And before anyone asks: the reason I embed newlines in SQL is so that the offending SQL printed in errors/exceptions is across multiple lines and is easier to read. And along the same lines: many of my developers, while writing JDBC/Java/SQL code to query the database (see above), would append a semi-colon to the end of SQL statements. In DB2 v7 this worked fine. Under v8 you get: SQL Error Code -104, SQL State 42601, An unexpected token "" was found following "". Expected tokens may include: "lah from blah". Why? Can I get around it w/ a JDBC setting? TIA Allen |
| Thread Tools | |
| Display Modes | |
|
|