Harpreet wrote:

> I had a view on sqlserver which i am trying to convert to work with mysql.
> It uses a union which i believe does not work with mysql. What is another
> alternative for union.
>
> Sql with union:
>
> select a.asset_id,a.material_id,b.material_id as parent_material_id from
> lib_asset_tbl a inner join lib_asset_tbl b on a.parent_id=b.asset_id
> union
> select asset_id,material_id,'' from lib_asset_tbl where virtual_flag='N'

MySQL 4.0 supports unions.

b.



---------------------------------------------------------------------
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

Reply via email to