SQL/MySQL Database Question

Warren Kuhl warrenkuhl at gmail.com
Thu Jan 21 14:02:55 EST 2010


I am trying to get the number of records that exist in 1 tables that do not
exist in another table.  Looking online, I saw an example of a
SELECT....WHERE NOT EXISTS.

I have a two questions:

1) Does RR handle the scenario below?  For some reason I am getting a
error around the "not exists (select * from" when I try to run this.

2) Is there a better way to do this?

put revQueryDatabase (gConID, "SELECT Brand_URL, Product_URL, Product_Name,
Product_UOM, Product_Retail, Product_Price, Product_Image,
Product_Description, from products where not exists (select * from
z-products where brand_url = z_brand_url and brand_name = z_brand_name and
product_url = z_product_url and product_name = z_product_name and
product_uom = z_product_uom)") into tNotExists

put revNumberofRecords(tNotExists) into vRecNo

Thanks for any help!
Warren



More information about the use-livecode mailing list