Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Best match...

Status
Not open for further replies.

YOUNGCODGER

Programmer
Jul 9, 2007
102
GB

Hello,

I have a table with various telephone destinations. What I am trying to achieve is a lookup for the best match. For instance the entries include '07' - 'Personal numbers, messaging and mobiles', '077' - 'Mobile phone', '07702' - 'O2', etc. Whilst I can write a lookup to match for 'n' characters is there an easy way to match on a variable number of characters. I have coded a tree search in C++ in the past but was hoping to avoid this.

Many thanks,

YoungCodger [bigglasses]
 
...how is this related to Reporting Services ?

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 

Sorry I do not understand your comment! I am trying to write an SQL report where I need to find the best leading match rather than an exact match. Is this not reporting?

Regards,

YoungCodger...
 
This forum is for the MS SQL Server Reporting Services application. Not for general reporting with SQL. Please post your question in a more appropriate forum

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 

I have searched various forums that make reference to SQL and also the 'How to get Best Answers' section but none seem to fit. A suggestion as to which one would be much appreciated.

Regards,

YoungCodger [ponder]
 
does this one fit: forum183

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top