|brian on Mar 14, 2007 at 8:18:26 AM (# 2)|
try something like this.
from tablewhatever as t
where (select count(u_id) from tablewhatever as t2 where t2.u_firstname=t.u_firstname)=1
If you're using something like MySql or MS Access then this may not work but it should be fine with Sql Server, Oracle or any other real database :)
You may also have to tweak it a little as the syntax might not be quite right.
bod1467 on Mar 15, 2007 at 12:36:13 AM (# 3)
Why might that not work with Mysql or Access? Looks like standard SQL syntax - nothing bespoke or platform-specific as far as I can see.
brian on Mar 15, 2007 at 5:28:06 AM (# 4)
It is...but in past experience I've found mysql (admittedly v4) to do strange things with what would be considered a standard sql statement (especially complex joins, unions and sub-queries). And MS access, well, it is good for what it is but again it does wierd things and anyone who is an experienced access programmer would probably tell you the same thing.
vahid_reza on Mar 15, 2007 at 2:04:27 PM (# 5)
it worked but too slow ! i used this sql syntax with Absolute Database that is a pascal file based database ! and i think it work with mySql too .
Thanx brian !