English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I have a 30 plus column database to build. There are no columns with unique rows. To find a unique row, I would need to combine the first 5 columns. If i do that, there would be a problem, [unless you can suggest otherwise] when someone wants to do a query based upon one of those 5 merged columns. Or should I just utilize the autonumber option and allow for my rows to be numbered 1, 2, 3, 4 etc. thanks!

2007-11-15 11:42:18 · 2 answers · asked by 27ysq 4 in Computers & Internet Programming & Design

2 answers

Try this:
Select fld1 + fld2 + fld3 + fld4 + fld5 as myUniqueFld, * From myTable
and save it as like myQuery1.
Then you can now create a new query like:
Select * From myQuery1 where myUniqueFld = 'uniquedata'

hope this helps..:D
cheers!!!

2007-11-15 20:53:35 · answer #1 · answered by Expolorer 2 · 1 0

The database is not normalized properly, if there are so many duplicates that you would need to use five columns in order to make a primary key then there are parts that of the table that can be optimized.

With that said, if you're set on keeping the table like it is, then the autonumber is probably the only solution. I don't think Access lets you use more than two columns for a primary key.

2007-11-15 19:57:49 · answer #2 · answered by Skippy 2 · 1 0

fedest.com, questions and answers