Please help on query question.

From: Ryan <"rrichards[NO>
Date: Fri, 29 Jan 1999 17:06:53 -0600
Message-ID: <36B23F0D.16DD7DE3_at_benham.com>



I have a form that contains  (for simplicity) 2 variables:

NAME (varchar)
AGE (varchar)

I have two tables NAMES1 and NAMES2 that both have the same columns - NAME and AGE but some data is different.

I want to take input in text boxes (LOCALNAME and LOCALAGE) and compare the entry with BOTh tables to see if this info is in one, none or both tables. If it is NAMES1 then a checkbox called NAMES1CHECK gets selected to show the user it is in that table. If it is in NAME2 then it checks the NAMES2CHECK checkbox.

I have a WHEN_BUTTON_PRESSED trigger setup on a button called  QUERY to process this after the info (name and afe) is entered on the form. I am having serious trouble getting this query to work.

I need to do some kind of boolean check like:

if  (SELECT * from NAMES1
     WHERE :MYBLOCK.NAME like NAMES1.NAME
     AND :MYBLOCK.AGE = NAMES1.AGE) = true
     -- check the NAMES1 checkbox here.....

if  (SELECT * from NAMES2
     WHERE :MYBLOCK.NAME like NAMES2.NAME
     AND :MYBLOCK.AGE = NAMES2.AGE) = true
     -- check the NAMES2 checkbox here.....

Is there any way to do this kind fo thing in PLSQL or SQL? Everytime I try the SELECT * from table... I get a 'No INTO in clause'.

Thanks for any help!

Ryan
--

- Remove [NO SPAM] from email address to reply -
  Received on Sat Jan 30 1999 - 00:06:53 CET

Original text of this message