Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all,
I have written multiple if statements at the script level and based on the condition i am trying to load some fields from a table in each if.
If condition is written in such a way that every time only one of the if will get executed based on the base data.
Upto this i am getting what is required. After this, after EndIf statement i am trying to do join to that table, by another table but it is not actually working and new fields from joining other table is not getting added.
Can anybody help???
Thanks In Advance
give a script extract.
You need to provide more details.
- Marcus
Dummy Example -
If Sales > $200 then
Load CustomerId, Sales
From Customer;
else
If Sales >$100 then
Load CustomerId, Sales, Country
From Customer;
End If
Left Join
CustomerId, CustomerName, Address
From Contact;
In this case i will not get fields from contacts like CustomerName, Address.
You compares Sales (is this really a variable ?) against $200 which is no number, no string and no variables - I think you need only the value 200. Also you need to check (maybe per TRACE) which value Sales had - from where did it come. Further your if-loop won't cover each case whereby the join-statement could fail.
- Marcus
This was just a dummy example. In my actual example field which i am comparing is a variable only and Its an integer.
I am checking that variable value with integer only say 5, 4, 3 etc according to my condition.
Suppose i am having 5 such conditions, so my 3rd conditon is coming as true and i am getting those fields which are there in the table. Further i am doing few join operations to that table which is satisfying the if condition.
But all those fields from those join operations not getting added to my original table
I suggest you comment your loadings out and adds trace-statements with your variables to see what happens - on which point had which variable which value. You could see that tracing within the log-file or within the processing-window. As alternatively you could use the debugger and goes step-wise through your script.
- Marcus