4

我正在创建一个使用 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...

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

4

1 回答 1

4

尝试使用AS代替=

select (select distinct(fldprecentage) from precentage  where    
fldgroup='Training' and fldset='First') AS trainPrecent1,
......
于 2012-05-15T04:29:26.620 回答