Open fangyukui opened 8 years ago
Unions are not supported in Simple.Data, so it would be best to split it into two queries and then concat once fetched.
Thank you for your answers! But we still have a problem.
select a,b,c,'0' as d from [table]
'0' as d how to write using Simple.Data?
Aliasing a constant value is not supported either I believe, it must be a reference to a column.
you can also use Simple.Data.RawSql https://github.com/jasondentler/Simple.Data.RawSql
Thank!
Hi ! I have a SQL statement:
SELECT Organization_ID,Organization_Name,ParentId,'0' AS isUser FROM Base_Organization UNION ALL SELECT U.User_ID AS Organization_ID ,U.User_Code+'|'+U.User_Name AS User_Name,S.Organization_ID,'1' AS isUser FROM Base_UserInfo U RIGHT JOIN Base_StaffOrganize S ON U.User_ID = S.User_ID
Could you tell me how to write using Simple.Data ? thank you !!