If Statement..

If Statement..

Post by Ton » Thu, 04 Oct 2001 09:05:49



Hello Group

FM5 Win98

I can not get my if statement to work.  I think it is because I am
asking it to do 2 "ifs".  Would some one be so kind as to quide me to
the correct method.

My if statement reads like this:

If( Category = "Standard A" and DaystoFill =  "<= 4", "in", "out")

How can I get this to work?  Do I need to give more info?

Thanks
Toni

 
 
 

If Statement..

Post by Bump » Thu, 04 Oct 2001 11:27:42


Assuming that DaystoFill is a field, take the quotes off of the argument
for DaystoFill and either use an equal = sign or a less than equal to <=
sign not both.

If( Category = "Standard A" and DaystoFill <= 4, "in", "out")


> Hello Group

> FM5 Win98

> I can not get my if statement to work.  I think it is because I am
> asking it to do 2 "ifs".  Would some one be so kind as to quide me to
> the correct method.

> My if statement reads like this:

> If( Category = "Standard A" and DaystoFill =  "<= 4", "in", "out")

> How can I get this to work?  Do I need to give more info?

> Thanks
> Toni


 
 
 

If Statement..

Post by David Hind-Smit » Thu, 04 Oct 2001 09:31:29


Hi Toni,

Try removing the quotes from around "<=4"" so that your statement reads like
this:

If( Category = "Standard A" and DaystoFill =  <= 4, "in", "out")

-David

--
David Hind-Smith
Database Development and IT support
www.hind-smith.com

905-827-8056
2156 Glenfield Road
Oakville, ON L6M 3S6


Quote:> Hello Group

> FM5 Win98

> I can not get my if statement to work.  I think it is because I am
> asking it to do 2 "ifs".  Would some one be so kind as to quide me to
> the correct method.

> My if statement reads like this:

> If( Category = "Standard A" and DaystoFill =  "<= 4", "in", "out")

> How can I get this to work?  Do I need to give more info?

> Thanks
> Toni

 
 
 

If Statement..

Post by Lynn All » Thu, 04 Oct 2001 09:34:21



> Hello Group

> FM5 Win98

> I can not get my if statement to work.  I think it is because I am
> asking it to do 2 "ifs".  Would some one be so kind as to quide me to
> the correct method.

> My if statement reads like this:

> If( Category = "Standard A" and DaystoFill =  "<= 4", "in", "out")

> How can I get this to work?  Do I need to give more info?

Slight boo boo.

If( Category = "Standard A" and DaystoFill <= 4, "in", "out")

Number tests do not need to be in quotes, and all operators such as "="
and ">" go outside any quotes.

--
Lynn Allen              Allen & Allen Semiotics
FSA Associate           Filemaker Consulting & Training

 
 
 

If Statement..

Post by Toni Majstorovi » Thu, 04 Oct 2001 16:45:30


Thanks!


Quote:> Hello Group

> FM5 Win98

> I can not get my if statement to work.  I think it is because I am
> asking it to do 2 "ifs".  Would some one be so kind as to quide me to
> the correct method.

> My if statement reads like this:

> If( Category = "Standard A" and DaystoFill =  "<= 4", "in", "out")

> How can I get this to work?  Do I need to give more info?

> Thanks
> Toni

 
 
 

If Statement..

Post by <ni.. » Fri, 05 Oct 2001 03:12:43


Hi

Try this

If( (Category = "Standard A") and ( DaystoFill < 5) ;  "in" ;  "out")

( ) = Do this first - then expr. outside.

The value DaystoFill its an integer value.
Do the check <.
It's faster.

Country use diff sep. I'm using ;
Check it in your system setings.

--

Regards

P?l B?rje (US: Paul Boerje)



Hello Group

FM5 Win98

I can not get my if statement to work.  I think it is because I am
asking it to do 2 "ifs".  Would some one be so kind as to quide me to
the correct method.

My if statement reads like this:

If( Category = "Standard A" and DaystoFill =  "<= 4", "in", "out")

How can I get this to work?  Do I need to give more info?

Thanks
Toni

 
 
 

1. Problem with Procedure(Case Statement IF ELSE Statement )

Friends

I have created one Procedure

create procedure SampleCounter as



        begin

















                end

        end

Can i use IF-ELSE statement inside the CASE WHEN statement

my program runs successfuly but with above programs it gives me error
My application Procedure requires the same format
I have given it in simple example

Plz copy the above procedure and paste on sql server query analyzer
and check the result

If there is any modification in above program plz let me know
Frieds Plz Help me

2. HELP : Buttons on a DBCtrlGrid?

3. HOW TO create cursor from dynamic SQL statement (EXECUTE(@Statement))

4. jjjjjj

5. Help me convert a SELECT statement to an UPDATE statement

6. Object creation

7. insert statement using values from a select statement

8. Problem with Naming

9. Update statement with correlated subquery inside case statement fails

10. Case Statement in Update Statement

11. IF STATEMENTS IN SELECT STATEMENTS

12. While statement inside If statement

13. Running an EXEC statement in a case statement