BAQ Case Statement

Thanks Linda that was my problem.



~Charlie

_____

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
Linda Lowney
Sent: Tuesday, January 05, 2010 8:08 AM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] BAQ Case Statement





Hi Charlie,

Try:

if 0 < 1 then "3" else ""

It seems to expect the ELSE.

Regards,

Linda

From: vantage@yahoogroups <mailto:vantage%40yahoogroups.com> .com
[mailto:vantage@yahoogroups <mailto:vantage%40yahoogroups.com> .com] On
Behalf
Of Charlie Wilson
Sent: Tuesday, January 05, 2010 7:57 AM
To: vantage@yahoogroups <mailto:vantage%40yahoogroups.com> .com
Subject: RE: [Vantage] BAQ Case Statement

I keep getting syntax errors so I tried

If 0 < 1 then

"3"

And this too gave me a syntax error I stuck an end if on there and that
gave
me a syntax error as well.

~Charlie

_____

From: vantage@yahoogroups <mailto:vantage%40yahoogroups.com> .com
<mailto:vantage%40yahoogroups.com>
[mailto:vantage@yahoogroups <mailto:vantage%40yahoogroups.com> .com
<mailto:vantage%40yahoogroups.com> ] On
Behalf Of
Karen Schoenung
Sent: Monday, January 04, 2010 2:10 PM
To: vantage@yahoogroups <mailto:vantage%40yahoogroups.com> .com
<mailto:vantage%40yahoogroups.com>
Subject: RE: [Vantage] BAQ Case Statement

Charlie,

I think you are pretty close...

If (NonConf.systime / 3600 >= 0 and nonconf.systime / 3600 < 8) then

"Shift 3"
if (NonConf.systime / 3600 >= 8 and nonconf.systime / 3600 < 16) then

"Shift 1"

Else

"Shift 2"

I would try the first if in a calc field, analyze and test...Then add
the second if in the same calc field, analyze and test, so on...

Karen

From: vantage@yahoogroups <mailto:vantage%40yahoogroups.com> .com
[mailto:vantage@yahoogroups <mailto:vantage%40yahoogroups.com> .com] On
Behalf
Of Charlie Wilson
Sent: Monday, January 04, 2010 12:39 PM
To: vantage@yahoogroups <mailto:vantage%40yahoogroups.com> .com
Subject: [Vantage] BAQ Case Statement

All,

I am attempting to set up a calculated field in a BAQ I need to use
either
an If / Else if statement or a case statement that does the following:

If NonConf.systime / 3600 >= 0 and nonconf.systime / 3600 < 8 then

Print Shift 3

Else if NonConf.systime / 3600 >= 8 and nonconf.systime / 3600 < 16 then

Print Shift 1

Else

Print Shift 2

End If

I've never done an if else statement in this can anyone show me what I
should put in?

If it just kicks out a 1, 2 or 3 that is fine.

~Charlie

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]





[Non-text portions of this message have been removed]
All,



I am attempting to set up a calculated field in a BAQ I need to use either
an If / Else if statement or a case statement that does the following:



If NonConf.systime / 3600 >= 0 and nonconf.systime / 3600 < 8 then

Print Shift 3

Else if NonConf.systime / 3600 >= 8 and nonconf.systime / 3600 < 16 then

Print Shift 1

Else

Print Shift 2

End If



I've never done an if else statement in this can anyone show me what I
should put in?



If it just kicks out a 1, 2 or 3 that is fine.



~Charlie





[Non-text portions of this message have been removed]
Charlie,


I think you are pretty close...



If (NonConf.systime / 3600 >= 0 and nonconf.systime / 3600 < 8) then

"Shift 3"
if (NonConf.systime / 3600 >= 8 and nonconf.systime / 3600 < 16) then

"Shift 1"

Else

"Shift 2"

I would try the first if in a calc field, analyze and test...Then add
the second if in the same calc field, analyze and test, so on...


Karen



From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of Charlie Wilson
Sent: Monday, January 04, 2010 12:39 PM
To: vantage@yahoogroups.com
Subject: [Vantage] BAQ Case Statement





All,

I am attempting to set up a calculated field in a BAQ I need to use
either
an If / Else if statement or a case statement that does the following:

If NonConf.systime / 3600 >= 0 and nonconf.systime / 3600 < 8 then

Print Shift 3

Else if NonConf.systime / 3600 >= 8 and nonconf.systime / 3600 < 16 then

Print Shift 1

Else

Print Shift 2

End If

I've never done an if else statement in this can anyone show me what I
should put in?

If it just kicks out a 1, 2 or 3 that is fine.

~Charlie

[Non-text portions of this message have been removed]





[Non-text portions of this message have been removed]
I keep getting syntax errors so I tried



If 0 < 1 then

"3"



And this too gave me a syntax error I stuck an end if on there and that gave
me a syntax error as well.



~Charlie

_____

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
Karen Schoenung
Sent: Monday, January 04, 2010 2:10 PM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] BAQ Case Statement





Charlie,

I think you are pretty close...

If (NonConf.systime / 3600 >= 0 and nonconf.systime / 3600 < 8) then

"Shift 3"
if (NonConf.systime / 3600 >= 8 and nonconf.systime / 3600 < 16) then

"Shift 1"

Else

"Shift 2"

I would try the first if in a calc field, analyze and test...Then add
the second if in the same calc field, analyze and test, so on...

Karen

From: vantage@yahoogroups <mailto:vantage%40yahoogroups.com> .com
[mailto:vantage@yahoogroups <mailto:vantage%40yahoogroups.com> .com] On
Behalf
Of Charlie Wilson
Sent: Monday, January 04, 2010 12:39 PM
To: vantage@yahoogroups <mailto:vantage%40yahoogroups.com> .com
Subject: [Vantage] BAQ Case Statement

All,

I am attempting to set up a calculated field in a BAQ I need to use
either
an If / Else if statement or a case statement that does the following:

If NonConf.systime / 3600 >= 0 and nonconf.systime / 3600 < 8 then

Print Shift 3

Else if NonConf.systime / 3600 >= 8 and nonconf.systime / 3600 < 16 then

Print Shift 1

Else

Print Shift 2

End If

I've never done an if else statement in this can anyone show me what I
should put in?

If it just kicks out a 1, 2 or 3 that is fine.

~Charlie

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]





[Non-text portions of this message have been removed]
Hi Charlie,



Try:

if 0 < 1 then "3" else ""



It seems to expect the ELSE.



Regards,

Linda



From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of Charlie Wilson
Sent: Tuesday, January 05, 2010 7:57 AM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] BAQ Case Statement





I keep getting syntax errors so I tried

If 0 < 1 then

"3"

And this too gave me a syntax error I stuck an end if on there and that
gave
me a syntax error as well.

~Charlie

_____

From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
[mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ] On
Behalf Of
Karen Schoenung
Sent: Monday, January 04, 2010 2:10 PM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
Subject: RE: [Vantage] BAQ Case Statement

Charlie,

I think you are pretty close...

If (NonConf.systime / 3600 >= 0 and nonconf.systime / 3600 < 8) then

"Shift 3"
if (NonConf.systime / 3600 >= 8 and nonconf.systime / 3600 < 16) then

"Shift 1"

Else

"Shift 2"

I would try the first if in a calc field, analyze and test...Then add
the second if in the same calc field, analyze and test, so on...

Karen

From: vantage@yahoogroups <mailto:vantage%40yahoogroups.com> .com
[mailto:vantage@yahoogroups <mailto:vantage%40yahoogroups.com> .com] On
Behalf
Of Charlie Wilson
Sent: Monday, January 04, 2010 12:39 PM
To: vantage@yahoogroups <mailto:vantage%40yahoogroups.com> .com
Subject: [Vantage] BAQ Case Statement

All,

I am attempting to set up a calculated field in a BAQ I need to use
either
an If / Else if statement or a case statement that does the following:

If NonConf.systime / 3600 >= 0 and nonconf.systime / 3600 < 8 then

Print Shift 3

Else if NonConf.systime / 3600 >= 8 and nonconf.systime / 3600 < 16 then

Print Shift 1

Else

Print Shift 2

End If

I've never done an if else statement in this can anyone show me what I
should put in?

If it just kicks out a 1, 2 or 3 that is fine.

~Charlie

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]





[Non-text portions of this message have been removed]
Hi Charlie,

I have found that if you use a set of parenthises in a nested IF statement that this usually solves the problem. Try this:

If (NonConf.systime / 3600 >= 0 and nonconf.systime / 3600 < 8) then

"Shift 3"
Else (If (NonConf.systime / 3600 >= 8 and nonconf.systime / 3600 < 16) then

"Shift 1"

Else

"Shift 2")

David Pfiester
NuStep, Inc.
734-769-3939 x150

--- In vantage@yahoogroups.com, "Charlie Wilson" <foamdesigncsw@...> wrote:
>
> I keep getting syntax errors so I tried
>
>
>
> If 0 < 1 then
>
> "3"
>
>
>
> And this too gave me a syntax error I stuck an end if on there and that gave
> me a syntax error as well.
>
>
>
> ~Charlie
>
> _____
>
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
> Karen Schoenung
> Sent: Monday, January 04, 2010 2:10 PM
> To: vantage@yahoogroups.com
> Subject: RE: [Vantage] BAQ Case Statement
>
>
>
>
>
> Charlie,
>
> I think you are pretty close...
>
> If (NonConf.systime / 3600 >= 0 and nonconf.systime / 3600 < 8) then
>
> "Shift 3"
> if (NonConf.systime / 3600 >= 8 and nonconf.systime / 3600 < 16) then
>
> "Shift 1"
>
> Else
>
> "Shift 2"
>
> I would try the first if in a calc field, analyze and test...Then add
> the second if in the same calc field, analyze and test, so on...
>
> Karen
>
> From: vantage@yahoogroups <mailto:vantage%40yahoogroups.com> .com
> [mailto:vantage@yahoogroups <mailto:vantage%40yahoogroups.com> .com] On
> Behalf
> Of Charlie Wilson
> Sent: Monday, January 04, 2010 12:39 PM
> To: vantage@yahoogroups <mailto:vantage%40yahoogroups.com> .com
> Subject: [Vantage] BAQ Case Statement
>
> All,
>
> I am attempting to set up a calculated field in a BAQ I need to use
> either
> an If / Else if statement or a case statement that does the following:
>
> If NonConf.systime / 3600 >= 0 and nonconf.systime / 3600 < 8 then
>
> Print Shift 3
>
> Else if NonConf.systime / 3600 >= 8 and nonconf.systime / 3600 < 16 then
>
> Print Shift 1
>
> Else
>
> Print Shift 2
>
> End If
>
> I've never done an if else statement in this can anyone show me what I
> should put in?
>
> If it just kicks out a 1, 2 or 3 that is fine.
>
> ~Charlie
>
> [Non-text portions of this message have been removed]
>
> [Non-text portions of this message have been removed]
>
>
>
>
>
> [Non-text portions of this message have been removed]
>