SQL - me bad or parser bad

Robert Brenstein rjb at rz.uni-potsdam.de
Wed Mar 26 10:15:46 CST 2003


>on 3/25/03 5:39 PM, Robert Brenstein at rjb at rz.uni-potsdam.de wrote:
>
>>  Problem:
>>
>>  Valentina selects records that should be excluded. Namely, records
>>  with non-empty u_canc field are included.
>>
>>  SQL query:
>>
>>  Select r_rid,r_lna,r_fna,r_mna,r_ema,r_tit,a_titl,
>>  a_cdts,r_fee,u_canc,u_oral From
>>  abstract2,registration2a,registration2b
>>  Where r_rid = u_rid and a_rid = u_rid and a_cdts < 1046077200 and
>>  r_fee <> 5  and r_fee <> 6 and u_canc = '' and u_oral = ''
>>  Order by r_lna,r_fna
>
>Hi Robert,
>
>Check that you group fields from one table together!
>Most probably this is source of problem.
>

Ruslan, sounds like you missed what I wrote at the bottom:

>The order of "where" items is like Ruslan recommended in the past: 
>links first, then conditions grouped by table. I tried changing the 
>order, putting quotes. However, no matter what order I use, I get 
>records with either non-empty u_canc or non-empty u_oral whichever 
>is first in the Where clause!

I haven't tried every possible reordering, of course. These quirks of 
the parser seem to always get me at worst time -- like in major 
embarassment for me and your product. When is the real sql parser 
coming?

Robert


More information about the Valentina mailing list