Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / June 2005

Tip: Looking for answers? Try searching our database.

Irritating Problem...

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Chris Gorham - 07 Jun 2005 08:19 GMT
Hi,

I have an irritatingly small querie that I'm struggling to write...

I have two columns of data in a table. The data contains letters, numbers
and underscores and also varies in length. The columns are of equal length.

All I want to do is count the number of unique pairs in this data
irrespective of which column the data is in

for example:

Col A           Col B
123A           65B
123A           65B
65B             123A
23VCJ_0      65B

These are only two unique pairs in the above data - the first three rows are
one pair and the fourth row is the second.

Any help is appreciated....Rgds Chris
Michel Walsh - 07 Jun 2005 11:43 GMT
Hi,

SELECT iif(colA <= colB, colA, colB), iif(colA<=colB, colB, colA)
FROM myTable
GROUP BY iif(colA <= colB, colA, colB), iif(colA<=colB, colB, colA)

Hoping it may help,
Vanderghast, Access MVP

> Hi,
>
[quoted text clipped - 20 lines]
>
> Any help is appreciated....Rgds Chris
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.