M
matthewwhaley
I am trying to create a query that will update a new field with a
value from a table (tbl1) using another field in tb1 as a subject of a
"like" statement. Ex
Lets say I have 20 errors codes (groups of individual record error
codes) that come through a system (SysError) with record specific
information
SysError:
RVF error: [PreferredStock:17178U202] Tier2
product_new..PreferredStock row doesn't exists for this product so
preferred stock information (parValue, dividendRate, frequencyCode) is
missing
The above has many record specific variables that populate the string
(exreferredStock might be Bond, Equity,etc)
I created an errocode in one field in tbl1 called ErrCode and the
above looks like this
-RVF error: Tier2 product information is missing
For new records coming in I would like to use this criteria/ object of
a like statement to update the errorcode by record
Tbl1 field 1 errorstring =
-"RVF error: * Tier2 product * information * is missing"
In my query, I want to switch the syserror with the errorcode in tbl1.
This is where it falls down
Switch(a.syserror LIKE "&In(Select errorstring From
tbl1)&",tbl1.errorcode)
I only get blanks.
Question 1, can you nest a in(select )statement as an object of a
LIKE? If so, syntax would be greatly appreciated
Questions 2. If you cannot nest the above, any solutions on how to
group the errorcodes from the system?
Thanks in advance
value from a table (tbl1) using another field in tb1 as a subject of a
"like" statement. Ex
Lets say I have 20 errors codes (groups of individual record error
codes) that come through a system (SysError) with record specific
information
SysError:
RVF error: [PreferredStock:17178U202] Tier2
product_new..PreferredStock row doesn't exists for this product so
preferred stock information (parValue, dividendRate, frequencyCode) is
missing
The above has many record specific variables that populate the string
(exreferredStock might be Bond, Equity,etc)
I created an errocode in one field in tbl1 called ErrCode and the
above looks like this
-RVF error: Tier2 product information is missing
For new records coming in I would like to use this criteria/ object of
a like statement to update the errorcode by record
Tbl1 field 1 errorstring =
-"RVF error: * Tier2 product * information * is missing"
In my query, I want to switch the syserror with the errorcode in tbl1.
This is where it falls down
Switch(a.syserror LIKE "&In(Select errorstring From
tbl1)&",tbl1.errorcode)
I only get blanks.
Question 1, can you nest a in(select )statement as an object of a
LIKE? If so, syntax would be greatly appreciated
Questions 2. If you cannot nest the above, any solutions on how to
group the errorcodes from the system?
Thanks in advance