iActiveRecord icon indicating copy to clipboard operation
iActiveRecord copied to clipboard

How to create View in ActiveRecord

Open minhthuc251 opened this issue 8 years ago • 1 comments

I want to create View with my sql query like this : CREATE VIEW IF NOT EXISTS view_table_status AS Select a.AreaId, a.AreaName, OrderId, t.AccountId, t.AccountNo, Amount, CustomerId, CustomerName, CustomerCategoryId, CustomerCategoryName, i.DispStatus, t.LocationId, LocationName, TotalAmount, OrderCode, OrderFullName, t.TableId, t.TableName, TableTypeId, ProductAmount FROM tbl_tables t LEFT JOIN tbl_areas a ON t.AreaId=a.AreaId LEFT OUTER JOIN tbl_orders i ON t.TableId=i.TableId AND (i.DispStatus='4' OR i.DispStatus='2' OR i.DispStatus='5');

Anyone help me how i can do it with activeRecord

minhthuc251 avatar Jun 28 '16 09:06 minhthuc251

I don't think it's possible with iActiveRecord, even despite the fact that the project is abandoned.

AlexDenisov avatar Jul 01 '16 15:07 AlexDenisov