SQL Count and Floor -


so trying create query returns account numbers associated more 1 account.

when run code

select accountnumber tbl1 labelid = 328 

i following result:

601209.1 601212.1 601216.1 624601.1 624601.2 624601.3 624601.4 624861.1 624861.2 624861.3 624861.4 624961.1 624961.2 624961.3 624961.4 624962.1 624962.2 624962.3 624962.4 624962.5 624963.1 624963.2 624963.3 624963.4 624963.5 624963.6 624963.7 624963.8 624963.9 

so here can see account number 624601, 624921, 624861, 624961, 624962, , 624963 have more 1 account associated them. in order fix tried query:

select floor(accountnumber) [account number] tbl1 labelid = 328 

which partly need do, shows me account numbers, getting stuck counting accounts show more 2 times.

thanks, f

you use having (http://en.wikipedia.org/wiki/having_(sql))

select floor(accountnumber) [account number] tblclientaccount privatelabelseqid = 328 group floor(accountnumber) having count(0) > 1 

Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -