Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
lukenathan
Contributor II
Contributor II

Greater than or blank

[tblResult]:
Load
“Archive No.”,
“Machine No.”,
“Build Begin”,
“Build End”,
“Start to Finish”,

IF((“Start to Finish” > 7)OR Len(“Build End” = 0 ),'N') AS [Certified]

Resident [tblCustomer]:

The LOAD statement above is producing this table…

Archive No.

Machine No.

Build Begin

Build End

Start to Finish

Certified

G0000894

HF G60

12/1/2018

 12/19/2018

15

N

G0000894

LIDE 300

12/12/2018

 

-

N

G0000894

DR-G2140

12/29/2018

12/29/2018

0

N

 

However, I want it to produce this table.  The difference is the 3rd record in the certified field.  The  record should be ‘blank’ but instead I get ‘N’

Archive No.

Machine No.

Build Begin

Build End

Start to Finish

Certified

G0000894

HF G60

12/1/2018

 12/19/2018

15

N

G0000894

LIDE 300

12/12/2018

 

-

N

G0000894

DR-G2140

12/29/2018

12/29/2018

0

 

 

Can you help?

 

 

 

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Maybe this (comparisons with null will always return false):

If(Alt(“Start to Finish”, 0) > 7 Or Len(“Build End”) = 0 ,'N') AS [Certified]

Is there condition for which 'Y' should be returned

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

2 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Maybe this (comparisons with null will always return false):

If(Alt(“Start to Finish”, 0) > 7 Or Len(“Build End”) = 0 ,'N') AS [Certified]

Is there condition for which 'Y' should be returned

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
PV
Contributor II
Contributor II

Here ')' placement has gone wrong
IF((“Start to Finish” > 7)OR Len(“Build End”) = 0 ,'N') AS Certified