Electric_Soul Posted December 12, 2011 Posted December 12, 2011 Hello Knowing a realtionship is NOT case sensiive, I am trying to create and equivalent in SQL. But SQL is case sensitive. What I came up with is the first sql statement. But this statement is really slow, compared to the second statement, which doesn't give correct result, because of case differences. Does anyone have a clue on how to create a good equivalent, without modifying records?? 1. BE_FileMakerSQL ( " SELECT sn."Seriennr.", sum(ap.Menge) SN from Seriennummern sn INNER JOIN Artikelposten ap on lower(sn."Seriennr.")=lower(ap."Seriennr.") WHERE lower (sn."Artikelnr.") = lower('" & "PN0605-01" & "') GROUP bY sn."Seriennr." HAVING sum(ap.Menge)>0 " ) 2. BE_FileMakerSQL ( " SELECT sn."Seriennr.", sum(ap.Menge) SN from Seriennummern sn INNER JOIN Artikelposten ap on sn."Seriennr."=ap."Seriennr." WHERE sn."Artikelnr." = '" & "PN0605-01" & "' GROUP bY sn."Seriennr." HAVING sum(ap.Menge)>0 " )
Electric_Soul Posted December 12, 2011 Author Posted December 12, 2011 Let me guess. Filemaker is storing the indexes in either lower or upper case, depending on the language setting for a table field ?? right ? but please correct me otherwise :)
RalphL Posted December 15, 2011 Posted December 15, 2011 All those calculations in your SQL WHERE & GROUP BY statements are your problem. Why not add a column or field to tables that is an auto-entered calculation that makes the Lower Case calculation. Use these columns or fields in you SQL. This should not affect any thing in your database and users need not be aware of it. Change lower('" & "PN0605-01" & "') to 'pn0605-01'"). To see the Index put the cursor in the field then go to the Insert Menu and select From index..., Command I does this on a Mac.
Recommended Posts
This topic is 5072 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now