Harpreet writes:
> I dont think we can use 'IN' and 'NOT IN' in mysql. Is there an alternative
> that would work?
>
> select * from lib_asset_tbl where material_id <>'' and asset_id in (select
> asset_id from lib_copy_tbl)
>
> Help is appreciated.
>
> Regards,
> Harpreet Kaur
> Software Developer
> Crispin Corporations Inc.
>
The above query is easily resolved by a join:
select lib_assed_tbl.* from lib_asset_tbl, lib_copy_tbl where material_id <>'' and
lib_asset_tbl.asset_id = lib_copy_tbl.asset_id
--
Regards,
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic <[EMAIL PROTECTED]>
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Fulltime Developer
/_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus
<___/ www.mysql.com
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php