SQL/MySQL Database Question

william humphrey bill at bluewatermaritime.com
Thu Jan 21 14:35:47 EST 2010


Did you try running your query in a SQL utility first?

On Thu, Jan 21, 2010 at 3:02 PM, Warren Kuhl <warrenkuhl at gmail.com> wrote:

> 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
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>



-- 
http://www.bluewatermaritime.com



More information about the use-livecode mailing list