Hey all,
i have to find duplicates item, by name, in a table, for clarity the items
represent an application by its name, and its path.
if i do :
sql = DB[:applications].group_by(:name).having{|o| o.count(:name) >
1}.order(:name).sql
i get :
sql = SELECT * FROM `applications` GROUP BY `name` HAVING (count(`name`) >
1) ORDER BY `name`
and executing that gave me only one example of the duplicates, for exampe :
# -> a[:name] = Assistant.app (a[:path] =
/Applications/MacPorts/Qt/Assistant.app)
is the only one i've found by the above.
but not the one it duplicates :
# -> a[:name] = Assistant.app (a[:path] =
/Developer/Applications//Qt/Assistant.app)
ie same name different pathes.
i don't understand why the second isn't listed by this first sql.
best,
Yvon
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sequel-talk?hl=en.