Menu

Problem with Select Statement

2010-02-04
2012-12-07
  • Nobody/Anonymous

    Hi, someone knows why this search does not work?

    SELECT cb.Genus , cb.Species
    FROM  Coleccion_de_Briofitas as cb, unigeo:estados as es
    WHERE es.the_geom = cd.geometry AND es.nombre = "Tamaulipas"

    Any HELP will be apreciated.

     
  • Leonardo Francalanci

    unigeo:estados should be unigeo.estados (I guess)

    SQL standard expects single quotes for strings:

    es.nombre = 'Tamaulipas'

    not:

    es.nombre = "Tamaulipas"

     
  • Nobody/Anonymous

    Thanks, the problem is in the symbol ":" I changed the line:

    <# Special_chars: "$" | "_" |> by
    <# Special_chars: "$" | "_" | ":">

    in file JSqlParserCC.jj, recompile and everything works :=)

     
  • Leonardo Francalanci

    unigeo:estados

    what kind of syntax is that?

     
  • Nobody/Anonymous

    jajaja, I said the same, but the word unigeo:estados is an identifier and is valid for them to put a table called unigeos: estados

     

Log in to post a comment.