jeffdeville / penn-orchestra

Automatically exported from code.google.com/p/penn-orchestra
0 stars 0 forks source link

SQLException when selecting tuple in Provenance viewer #7

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
On our test system, this SQL is generated when a tuple is selected in the 
Provenance viewer:

SELECT 1 AS C0, 'Primate' AS C1, "3" AS C2, "4" AS C3, 1 AS C0_LN,
  1 AS C1_LN, 1 AS C2_LN, 1 AS C3_LN
  FROM PPOD2.PM0 AS R0
  WHERE (((((R0.C0 = 1) AND (R0.C0_LN = 1)) AND ((R0.C1 = 'Primate') AND (R0.C1_LN = 1)))
    AND ((R0.C2 = 3) AND (R0.C2_LN = 1))) AND ((R0.C3 = 4) AND (R0.C3_LN = 1)))

The problem seems to be the quotes around the constants 3 (and 4) in the select 
clause.

Here is the stack trace:

com.ibm.db2.jcc.b.SqlException: DB2 SQL error: SQLCODE: -206, SQLSTATE: 42703, 
SQLERRMC: 3
    at com.ibm.db2.jcc.b.ig.e(ig.java:1594)
    at com.ibm.db2.jcc.b.ig.a(ig.java:1204)
    at com.ibm.db2.jcc.c.gb.g(gb.java:140)
    at com.ibm.db2.jcc.c.gb.a(gb.java:39)
    at com.ibm.db2.jcc.c.w.a(w.java:34)
    at com.ibm.db2.jcc.c.vb.f(vb.java:139)
    at com.ibm.db2.jcc.b.ig.n(ig.java:1175)
    at com.ibm.db2.jcc.b.ig.a(ig.java:1835)
    at com.ibm.db2.jcc.b.ig.a(ig.java:476)
    at com.ibm.db2.jcc.b.ig.executeQuery(ig.java:460)
    at edu.upenn.cis.orchestra.dbms.SqlDb.evaluateQuery(SqlDb.java:960)
    at edu.upenn.cis.orchestra.dbms.SqlDb.evalQueryRule(SqlDb.java:1629)
    at edu.upenn.cis.orchestra.exchange.BasicEngine.evalQueryRule(BasicEngine.java:555)
    at edu.upenn.cis.orchestra.gui.provenance.ProvenanceGraph.exploreNeighbors(ProvenanceGraph.java:223)

Original issue reported on code.google.com by jwfro...@gmail.com on 4 Mar 2010 at 11:02

GoogleCodeExporter commented 8 years ago
This seems to be the same problem: Quotes around a constant in a select clause.

Original comment by jwfro...@gmail.com on 4 Mar 2010 at 11:06