E10 Calculated Field Editor

In that case I recommend using the ISNUMERIC function
something like

CASE ISNUMERIC(SUBSTIRING(PartNum,0,1) THEN ELSE ...Â



Jose C Gomez
Software Engineer


T: 904.469.1524 mobile

Quis custodiet ipsos custodes?

On Wed, Jan 28, 2015 at 9:03 AM, Bernie Walker bwalker@... [vantage] <vantage@yahoogroups.com> wrote:

Â
<div>
  
  
  <p>

The single quote vs. double quote is what got me on this one

Â

And I wanted to group PartNums that begin with a Numeral differently than ones that begin with an Alpha….

Â

Thanks.

Â

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, January 28, 2015 8:59 AM
To: Vantage
Subject: Re: [Vantage] E10 Calculated Field Editor

Â




E10 is SQL , (MSSQL) to be exact MSSQL doesn't have an IF THEN ELSE but the CASE WILL WORK just do

Â

CASE WHEN PartNum < "A" Â THEN ' ' ELSE SUBSTRING (...) END.

Â

Â

However a couple of notes, why are you comparing character "A" with a less than operator? This doesn't work well seeing as most languages take the value of A in ASCII (65) to use as a comparison which can yield funny results for example "a" is ASCII 97 meaning that A < a = true... What are you trying to do exactly? There may be better ways



Jose C Gomez

Software Engineer


T: 904.469.1524 mobile

E: jose@...
http://www.josecgomez.com
 Â
   Â


Quis custodiet ipsos custodes?

Â

On Wed, Jan 28, 2015 at 8:31 AM, bwalker@... [vantage] <vantage@yahoogroups.com> wrote:

Â

I am trying to do an If - Then - Else using the calculated field editor and when I select that condition, it is giving me (case when then else end)

Â

I don't see how that is equivalent since you cant use comparison symbols in a when statement ???

Â

Is there not a true If-Then-Else condition available?

Â

What I want is:

Â

if (PartNum < "A") Then "Â " Else substring(PartNum,0 ,2 )

Â




</div>
 


<div style="color:#fff;min-height:0;"></div>

I am trying to do an If - Then - Else using the calculated field editor and when I select that condition, it is giving me (case when  then  else  end)


I don't see how that is equivalent since you cant use comparison symbols in a when statement ???


Is there not a true If-Then-Else condition available?


What I want is:


if (PartNum < "A") Then "  " Else substring(PartNum,0 ,2 )

E10 is SQL , (MSSQL) to be exact MSSQL doesn't have an IF THEN ELSE but the CASE WILL WORK just do

CASE WHEN PartNum < "A" Â THEN ' ' ELSE SUBSTRING (...) END.


However a couple of notes, why are you comparing character "A" with a less than operator? This doesn't work well seeing as most languages take the value of A in ASCII (65) to use as a comparison which can yield funny results for example "a" is ASCII 97 meaning that A < a = true... What are you trying to do exactly? There may be better ways


Jose C Gomez
Software Engineer


T: 904.469.1524 mobile

Quis custodiet ipsos custodes?

On Wed, Jan 28, 2015 at 8:31 AM, bwalker@... [vantage] <vantage@yahoogroups.com> wrote:

Â
<div>
  
  
  <p></p><p><span>I am trying to do an If - Then - Else using the calculated field editor and when I select that condition, it is giving me (case when  then  else  end)</span></p><p><span><br></span></p><p><span>I don&#39;t see how that is equivalent since you cant use comparison symbols in a when statement ???</span></p><p><span><br></span></p><p><span>Is there not a true If-Then-Else condition available?</span></p><p><span><br></span></p><p><span>What I want is:</span></p><p><span><br></span></p><p><span>if (PartNum &lt; &quot;A&quot;) Then &quot;  &quot; Else substring(PartNum,0 ,2 )</span></p><p></p>

</div>
 


<div style="color:#fff;min-height:0;"></div>

The single quote vs. double quote is what got me on this one

 

And I wanted to group PartNums that begin with a Numeral differently than ones that begin with an Alpha….

 

Thanks.

 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, January 28, 2015 8:59 AM
To: Vantage
Subject: Re: [Vantage] E10 Calculated Field Editor

 




E10 is SQL , (MSSQL) to be exact MSSQL doesn't have an IF THEN ELSE but the CASE WILL WORK just do

 

CASE WHEN PartNum < "A"  THEN ' ' ELSE SUBSTRING (...) END.

 

 

However a couple of notes, why are you comparing character "A" with a less than operator? This doesn't work well seeing as most languages take the value of A in ASCII (65) to use as a comparison which can yield funny results for example "a" is ASCII 97 meaning that A < a = true... What are you trying to do exactly? There may be better ways



Jose C Gomez

Software Engineer


T: 904.469.1524 mobile


Quis custodiet ipsos custodes?

 

On Wed, Jan 28, 2015 at 8:31 AM, bwalker@... [vantage] <vantage@yahoogroups.com> wrote:

 

I am trying to do an If - Then - Else using the calculated field editor and when I select that condition, it is giving me (case when  then  else  end)

 

I don't see how that is equivalent since you cant use comparison symbols in a when statement ???

 

Is there not a true If-Then-Else condition available?

 

What I want is:

 

if (PartNum < "A") Then "  " Else substring(PartNum,0 ,2 )