Skip to content
This repository has been archived by the owner on Nov 25, 2019. It is now read-only.

How to create View in ActiveRecord #93

Open
minhthuc251 opened this issue Jun 28, 2016 · 1 comment
Open

How to create View in ActiveRecord #93

minhthuc251 opened this issue Jun 28, 2016 · 1 comment

Comments

@minhthuc251
Copy link

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

@AlexDenisov
Copy link
Owner

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants