Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

If Then Not Include 1

Status
Not open for further replies.

chrsab

Programmer
May 24, 2002
44
GB
Hello

I am trying to write a query which will not include a row if there is another row mostly with the same details but one column is different, below i will try and explain myself a bit better using an example:

ID Name Addon
1 Mr Flibble Extra
2 Mr Flibble Normal

What i need is if Mr Flibble has the extra addon, then the second Mr Flibble in ID 2 to not show. But if Mr Flibble only has normal, then to show this.

Below is what i have done so far:

INSERT INTO query2
SELECT *
FROM query2
UPDATE (IIF [product_addon_debug] = "Extra",[product_addon_debug] <> "Normal")
WHERE (((query2.product_addon_debug) In ("Extra"))

It is the update line which should do the job but it is not working.

Any help will be much appreicated.

Thank you
 
Hello.

take a look at this thread, it solved a similar problem for me

jimlad

"There is more to life than simply increasing its speed."
-Mahatma Gandhi
 
this thread !...

thread701-1041050

doh!

jimlad

"There is more to life than simply increasing its speed."
-Mahatma Gandhi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top