SQl Syntax Check

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • FM

    SQl Syntax Check

    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

    #2
    Re: SQl Syntax Check

    FM wrote:
    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

    Comment

    • FM

      #3
      Re: SQl Syntax Check

      On 12 Mrz., 16:49, Serge Rielau <srie...@ca.ibm .comwrote:
      FM wrote:
      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
      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.

      Comment

      • --CELKO--

        #4
        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?

        Comment

        • Dave Hughes

          #5
          Re: SQl Syntax Check

          FM wrote:
          On 12 Mrz., 16:49, Serge Rielau <srie...@ca.ibm .comwrote:
          FM wrote:
          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
          >
          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
          prepareStatemen t() 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.

          Comment

          Working...