繁体   English   中英

将mssql转换为mysql的错误

[英]error for converting mssql to mysql

我创建了一个使用mssql计算问题集的过程。 我在下面发布该查询。 现在我想将以下查询转换为mysql,但它返回错误。请帮我修复此错误..

我的部分查询在这里......

     select trainPrecent1 = (select distinct(fldprecentage) from precentage  where    fldgroup='Training' and fldset='First'),
     trainPrecent2 = (select distinct(fldprecentage) from precentage where fldgroup='Training' and fldset='Second'),
     agentPrecent1 = (select distinct(fldprecentage) from precentage where fldgroup='Agent on floor' and fldset='First'),
     agentPrecent2 = (select distinct(fldprecentage) from precentage where fldgroup='Agent on floor' and fldset='Second'), 
     superPrecent1 = (select distinct(fldprecentage) from precentage where fldgroup='Supervisor on floor' and fldset='First'), 
     superPrecent2 = (select distinct(fldprecentage) from precentage where fldgroup='Supervisor on floor' and fldset='Second')

现在我收到以下错误...

 "unknown column name "trainPrecent1" in fielelist...

请帮我解决这个错误....

使用AS代替=

select (select distinct(fldprecentage) from precentage  where    
fldgroup='Training' and fldset='First') AS trainPrecent1,
......

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM