Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Logical help

Hi All,

I want to create a new column (TXT_EXPORT.ARGUMENT_05).Pls see the script and i have applied if condition


if(Num(TXT_EXPORT.ARGUMENT_051) > 10, TW_SP_BO.Reservoir_Pressure, "1*") as  TXT_EXPORT.ARGUMENT_05

but it is not giving desired numerical result of TW_SP_BO.Reservoir_Pressure instead giving some string


Any one pls help me .I have reduced the data sorry 4 dat pls refer the screenshot it is hows is the data

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Thanks all for your continuous support and apolgy for hurting anyone my issue has been resolved .It was error in requirement.

View solution in original post

12 Replies
prieper
Master II
Master II

Is it necessary to post a 36M attachment?

Use a "Straight Table" and enter an expression like

IF([Item 10] > 10 AND [Item 5] > 10, TW_SP_BO.Reservoir_Pressure, '1*')

Peter

sunny_talwar

But Item 5 and Item 10 are never greater than 10?

Capture.PNG

Anonymous
Not applicable
Author

Hi Sunny ,

I have reduced the data

Capture12.PNG

sunny_talwar

Can you reduce your file in such a way that we can see few of the rows where these numbers show up?

sunny_talwar

Got it.... so I see this script

Temp:

Load if( num(TXT_EXPORT.ARGUMENT_05) > 10, "TW_SP_BO.Reservoir_Pressure",'1*') as TXT_EXPORT.ARGUMENT_015

Resident TXT_EXPORT;

You are creating a new field called TXT_EXPORT.ARGUMENT_015... but I don't even see it in the application... TXT_EXPORT.ARGUMENT_05 isn't changing, but it is used to create a new field... is this what are hoping to do?

Anonymous
Not applicable
Author

It is used to create a new field. ..any other suggestions

Anonymous
Not applicable
Author

Exactly sunny any other ways to do so..

sunny_talwar

May be change it in the same table

TXT_EXPORT:

LOAD

    if( num(TXT_EXPORT.ARGUMENT_05) > 10, "TW_SP_BO.Reservoir_Pressure",'1*') as TXT_EXPORT.ARGUMENT_05,

    .....

FROM...

vvira1316
Specialist II
Specialist II

We all here help each other. I've received lot of "Prompt and correct" help from users that are at top level and particularly from Sunny. He has been very prompt, tries to understand the problem we have and provides solution that has worked almost every time I've posted a question.