1. #1
    AliChemicali's Avatar
    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:

    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 )  
    
    	)
    Er zou een WHERE moeten bij komen van het veld "Type" met als value "Nog te bepalen".

    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  

  2. #2
    Timberwinter's Avatar
    Registered
    04/03/08
    Location
    Nazareth
    Posts
    159
    iTrader
    2 (100%)
    Mentioned
    0 Post(s)
    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  

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Log in

Log in