[DUG] SQL error

johnkbird at paradise.net.nz johnkbird at paradise.net.nz
Fri Feb 15 15:47:04 NZDT 2008


Thanks folks.  Doh!

I am using a monitor and font that really cannot show any difference between the
two brackets, which explains also why I never use curly brackets.  I had pasted
the offending sql into another editor and showed it to others....no-one had
spotted the offending brackets on this monitor!

Another trap for old players...



Quoting Kyley Harris <kyleyharris at gmail.com>:

> perhaps its the 2 curly brackets instead of ( round ones on postcode
> and
> location ;)
> 
> On Fri, Feb 15, 2008 at 12:12 PM, <johnkbird at paradise.net.nz> wrote:
> 
> > The following SQL
> >
> > select * from ADDRESS
> > where
> >
> > ( ( COMPANY = :COMPANY)
> > and ( ADDR1 = :ADDR1 )
> > and ( ADDR2 = :ADDR2 )
> > and ( SUBURB = :SUBURB )
> > and ( CITY = :CITY )
> > and ( STATE = :STATE )
> > and ( COUNTRY = :COUNTRY )
> > and { POSTCODE = :POSTCODE )
> > and { LOCATION_ID = :LOCATION_ID )
> > and ( ID <> :ID ) )
> >
> > order by ID
> >
> > produces an error I cannot figure...
> > "Class EDBEngine Error with message 'General SQL error, token
> unknown,
> > Line 11
> > char 9 POSTCODE'..." (this line is the Postcode line)
> >
> > All the fields listed are in the Address table
> >
> > (Firebird 1.5 and Delphi 5 Enterprise) BDE v5.01
> >
> > Anyone have any ideas???
> >
> > John
> >
> > _______________________________________________
> > NZ Borland Developers Group - Delphi mailing list
> > Post: delphi at listserver.123.net.nz
> > Admin: http://delphi.org.nz/mailman/listinfo/delphi
> > Unsubscribe: send an email to delphi-request at listserver.123.net.nz
> with
> > Subject: unsubscribe
> >
> 
> 
> 
> -- 
> Kyley Harris
> Harris Software
> +64-21-671-821
>  



John Bird


More information about the Delphi mailing list