Hi
I'm trying to pull up value from an SQL database using variable values in the SQL statement. Using the examples given in mercator tutorials, i'm not able to create type tree using variable values.
Can anyone give me some examples for this
Thanks a lot
CBIN
If the variables are in the same elememt, then you can set the tree up easily, if the variable has different definitions, then the answer is no, use a DBLOOKUP.
BocaBurger
<===========================||////////////////|0
The pen is mightier than the sword, but the sword hurts more!
Thanks. Yes, I'm using DBLOOKUP.
When i directly give the value for the "Where" clause, the value is getting pulled up. But when i give the variable, i'm not getting any output.
My query looks like this
DBLOOKUP ( "SELECT BOL from TASN where InvoiceNo =33208506", "MFSelect.mdq" , "EDIIN" )
I get the output.
If i replace the InvoiceNo with the variable, it looks like this
DBLOOKUP ( "SELECT BOL from TASN where InvoiceNo = " + Ih_Invoice_Num Field:.:invoice + ",""MFSelect.mdq" ,"EDIIN")
Ih_Invoice_Num Field:.:invoice - this field is text in type tree and i have defined InvoiceNo in the table as VarChar.
The actual InvoiceNo data will be alphanumeric.
What am i doing wrong.. i'm little bit new to the database mapping.. is anything wrong with the syntax??
Add a -T to the command line to see what the error is. You could also wrap the DBLOOKUP with a valid /fail (lasterrormessage, lasterrorcode) and turn on the audit log to see what you get. If no help there, contact Ascential support.
BocaBurger
<===========================||////////////////|0
The pen is mightier than the sword, but the sword hurts more!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.