RowFilter = column not in value from other table?
Posted on 2007-08-09
From the bygone days of the dataview, I have a table that is a part of a dataset and I want to filter it off of another table's value.
select poo_suboptionrefid suboptionrefid, description from product_or_option poo , suboptionref sor
where poo.poo_suboptionrefid = sor.suboptionrefid
and poo_active_sts_cd = 'A'
and poo_product_flag = 'Y'
and poo_suboptionrefid not in
select pop_product_id from product_option
where pop_option_id = 1310
I have pulled a tiny table for Products, and another for FlexOptions. I am trying to show you what you can still pick from in the FlexOptions
.Table = dsProds.Tables("Products")
.RowFilter = "suboptionrefid not in ( select pop_product_id from flexoptions where pop_option_id =" & Me.cboOptions.SelectedValue(0) & " )"
Error it pops up "Syntax error: Missing operand after 'pop_product_id' operator."
Thinks that this is a plain vanilla query and not a subtle sub query.
Is there a work around for this? I could do a lot of this low level functionality in my gui instead of calling my bizLayer to set up the SQL for a data call.