Instr formula in SQL vba

MilaK

Registered User.
Local time
Today, 12:54
Joined
Feb 9, 2015
Messages
285
Please suggest the proper punctuation for instr formula in SQL vba statement

this is not correct:

Code:
Do While Not RS.EOF
criteria = criteria & InStr([variant_id], RS("gene") & "_" & RS("aa_change")) > 0) & " OR "
RS.MoveNext

thanks,

Mila
 
I need to construct where clause using vba. I would like to retrieve records from a table that have a variant_id that contains specific strings that are retrieved from another table.
Let's say the variant_id is "EGFR_ALK_DS52", the combination of RS("gene") & "_" & RS("aa_change") will return ALK_DS52. I'm using this instead of Like. Is this the correct approach? Thanks
 
You say 2 tables--- what are the table designs?
How are they related?
 
I'll need more info if I'm going to offer any help.

What are the tables and fields?
Take a sample from 1 table and show the result you need from the combination of tables.
 
Last edited:
Code:
 InStr([variant_id], RS("gene") & "_" & RS("aa_change")) > 0)

Left parenthesis <> right parenthesis
 

Users who are viewing this thread

Back
Top Bottom