Thread: FileMaker Pro SQL Hulp
-
23-08-2015, 19:54 #1Approved 9liver
- Registered
- 21/08/08
- Location
- Mechelen
- Posts
- 5,952
- iTrader
- 30 (97%)
- Mentioned
- 0 Post(s)
- Reputation
- 0/4
FileMaker Pro SQL Hulp
Hoi,
Ik zou graag een WHERE toevoegen aan een script in filemaker pro, het huidige script:
Er zou een WHERE moeten bij komen van het veld "Type" met als value "Nog te bepalen".Code:Let ( [ month = Bedrijfsdashboard::Huidige maand ; year = Bedrijfsdashboard::Huidig jaar ; status = Statusfilter ; decimal = Left ( Evalueren ( 1/2 ) ; 1 ) ; SQL = ExecuteSQL ( " SELECT SUM ( a.\"Totaal\" ) FROM \"Facturen\" a " & If ( IsEmpty ( status ) ; "WHERE a.\"Maand\" = ? AND a.\"Jaar\" = ? AND a.\"Statusvolgorde\" IN ( 0 ,1, 2 ) " ; "WHERE a.\"Maand\" = ? AND a.\"Jaar\" = ? AND a.\"Statusvolgorde\" = ? " ) ; "" ; "" ; month ; year ; status ) ] ; If ( SQL ; Substitute ( SQL; "." ; decimal ) ; 0 ) )
Iemand een idee hoe je dit doet?
Thanks!StackOverflow Account
Pain is temporary. It may last a minute, or an hour, or a day, or a year, but eventually it will subside and something else will take its place. If I quit, however, it lasts forever.no votes
-
-
29-08-2015, 14:43 #2
Ik kan geen SQL in FileMaker Pro, maar als ik een beetje naar bovenstaande code kijk, lijkt het mij dit te zijn:
Code:Let ( [ month = Bedrijfsdashboard::Huidige maand ; year = Bedrijfsdashboard::Huidig jaar ; status = Statusfilter ; decimal = Left ( Evalueren ( 1/2 ) ; 1 ) ; SQL = ExecuteSQL ( " SELECT SUM ( a.\"Totaal\" ) FROM \"Facturen\" a " & If ( IsEmpty ( status ) ; "WHERE a.\"Maand\" = ? AND a.\"Jaar\" = ? AND a.\"Statusvolgorde\" IN ( 0 ,1, 2 ) " ; "WHERE a.\"Maand\" = ? AND a.\"Jaar\" = ? AND a.\"Statusvolgorde\" = ? "; "WHERE a.\"Type\" = \"Nog te bepalen\" " ) ; "" ; "" ; month ; year ; status ) ] ; If ( SQL ; Substitute ( SQL; "." ; decimal ) ; 0 ) )Do or do not, there is no try.no votes
