sql - Add Field to Query -


how add "name" field query

    select address,             count(*) countof       dbo.mydb      address not null   group address     having count(*) > 1 

ive tried

select name,         address ... 

but come error

thanks,

if want add name column, have add group by or include in aggregate function:

select address, name, count(*) countof dbo.mydb address not null group address, name having count(*)>1 

Comments

Popular posts from this blog

symfony - InvalidConfigurationException in SecurityExtension.php line 429: No authentication listener registered for firewall "secured_area" -

angular ui router - 10 digest iterations reached in angularjs when using $state.go -

javascript - Handling constructor related functions while testing with mocha and sinon -