Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SqlSugar在Mysql中使用 SqlFunc.IIF时候拼接字段的问题 #36

Closed
Hello-Mango opened this issue Dec 4, 2017 · 1 comment
Closed

Comments

@Hello-Mango
Copy link

Code:
SqlFunc.IIF<String>(s1.RESERVATION_SEX == "0", s1.RESERVATION_NAME + "女士", s1.RESERVATION_NAME + "先生")

SQL:
SELECT RESERVATION_COUSULTANT_ID AS RESERVATION_COUSULTANT_ID, RESERVATION_TIME AS RESERVATION_TIME, RESERVATION_SEX, RESERVATION_MOBILE AS RESERVATION_MOBILE, ( CASE WHEN (RESERVATION_SEX = '0') THEN ( RESERVATION_NAME + '女士' ) ELSE ( RESERVATION_NAME + '先生' ) END ) AS RESERVATION_NAME, RESERVATION_QUESTION AS RESERVATION_QUESTION FROM c_reservation_cousultant_t ORDER BY RESERVATION_TIME DESC LIMIT 0, 10
在这里如果在MYSQL里 应该是要使用Concat进行拼接才有效果

@DotNetNext
Copy link
Owner

SqlFunc.MagreString()

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

No branches or pull requests

2 participants