You are here: Re: non key select or search « MsSQL Server « IT news, forums, messages
Re: non key select or search

Posted by Ed Murphy on 11/05/07 04:54

Analizer1 wrote:

> i need to search a table for columns
> i have to match data i recieve from a online transaction batch
> example
> in our system we send out
> transactionno (unique)
> Acctno (can be duplicated in transfile)
> insuredacct (can be duplicated)
> firstname (can be duplicated)
> lastname (can be duplicated)
> datofbirth (possible with the above duplicated)
> transdate (not possible to be duplicated with the above)
>
> we have a table with all completed transactions (few million)
>
> I need to match the above to a transaction so i can report to the entity who
> transmited the data to our company
> the company we transmit to send back the above information..without the
> transaction number
>
> based on the above what is the best way to match to the correct row and how
> should i build a index based on the above

Educated guess:

create unique clustered index index1 on the_table (transactionno)

create unique index index2 on the_table (acctno, insureacct,
firstname, lastname, datofbirth, transdate)

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация