getting error in sql: Every derived table must have its own alias -


need in fixing error,trying run query , getting error every derived table must have own alias, below code:

$sql="select trouble_type_priority, category_1, category_2, status, count(*) ( select distinct trouble_type_priority, category_1, category_2 tbl_main ) group trouble_type_priority,category_1,category_2 having count(*) > 1"; 

you need give subquery "alias", or name.

notice addition of a after subquery:

$sql="select trouble_type_priority, category_1, category_2, status, count(*) ( select distinct trouble_type_priority, category_1, category_2 tbl_main ) group trouble_type_priority,category_1,category_2 having count(*) > 1"; 

Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -