Using a global variable in a subselect? Help?

Evening all,
Trying to figure out how to use a global variable in a subselect.
Like this…

select clm_id from claim where clm_facid in
(SELECT fac_id FROM facility where fac_taxid = [global_var])

I was going to put this in a view but dont know how to accomplish this…
Any ideas?

issue is that there are many tax id records for facilities, and need to select all the claims from all the facility id’s with that tax id…

Kevin

Hi Kevin,

I usually test all queuris in phpmyadmin and get best results before trying with SC, sc finally will apply the same query… only what i found that sometimes ‘[global_var]’ doesn’t work unless added the single quotation, assuming string value…