Connecting Tech Pros Worldwide Forums | Help | Site Map

SQl Syntax Check

FM
Guest
 
Posts: n/a
#1: Mar 12 '08
Hi there:

My question is about checking my sql-syntax against DB2UDB V9 throug
JDBC 2.0

Is there a way to check my syntax,for example "select * from T1"?

Thank you for your help.

Regards,
Felix

Serge Rielau
Guest
 
Posts: n/a
#2: Mar 12 '08

re: SQl Syntax Check


FM wrote:
Quote:
Hi there:
>
My question is about checking my sql-syntax against DB2UDB V9 throug
JDBC 2.0
>
Is there a way to check my syntax,for example "select * from T1"?
Can you define "checking"?
If you want an SQL Syntax checker within JDBC take a look at Data
Studio, especially pureQuery.

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
FM
Guest
 
Posts: n/a
#3: Mar 12 '08

re: SQl Syntax Check


On 12 Mrz., 16:49, Serge Rielau <srie...@ca.ibm.comwrote:
Quote:
FM wrote:
Quote:
Hi there:
>
Quote:
My question is about checking my sql-syntax against DB2UDB V9 throug
JDBC 2.0
>
Quote:
Is there a way to check my syntax,for example "select * from T1"?
>
Can you define "checking"?
If you want an SQL Syntax checker within JDBC take a look at Data
Studio, especially pureQuery.
>
Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Sorry that i was not clear enough.
What i mean is if i could check that my sql-syntax is correct and if
columns and tables i use are correct too.
--CELKO--
Guest
 
Posts: n/a
#4: Mar 12 '08

re: SQl Syntax Check


www.mimer.com has anon-line SQL Validator that compares your code to
one of several SQL Standards. I use it to make sure my code in my
books in ANSI/ISO complaint. Does that help?

Dave Hughes
Guest
 
Posts: n/a
#5: Mar 12 '08

re: SQl Syntax Check


FM wrote:
Quote:
On 12 Mrz., 16:49, Serge Rielau <srie...@ca.ibm.comwrote:
Quote:
FM wrote:
Quote:
Hi there:
Quote:
My question is about checking my sql-syntax against DB2UDB V9
throug JDBC 2.0
Quote:
Is there a way to check my syntax,for example "select * from T1"?
Can you define "checking"?
If you want an SQL Syntax checker within JDBC take a look at Data
Studio, especially pureQuery.

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
>
Sorry that i was not clear enough.
What i mean is if i could check that my sql-syntax is correct and if
columns and tables i use are correct too.
Sure - "prepare" the statement (there's probably something like a
prepareStatement() method in Java somewhere).

While it's possible to syntax check a statement prior to execution
(with whatever code you can get your hands on - e.g. Serge's pureQuery
suggestion, or Celko's mimer suggestion), checking whether the
referenced columns and tables are correct is only going to be possible
by actually preparing or executing the statement (preferably the
former).


Cheers,

Dave.
Closed Thread