Forum Moderators: open

Message Too Old, No Replies

ms Access

Create Table with random data

         

zazu

9:42 am on Jun 25, 2007 (gmt 0)

10+ Year Member



We have a database of books. The main table has a few fields of which SKU and CATEGORY are two. The SKU field stores either 10 or 13 digit isbn's. This field is a text field as some of the isbn's have one or two leading zeros. Each SKU is unique.

We would like to run a QUERY that results in a table of, say, five randomnly selected SKU's for each unique SKU - other data for the unique SKU would be included such as title, author etc. The result could have column headings like this:

SKU
TITLE
AUTHOR RANDOM_SKU_ONE
RANDOM_SKU_TWO
RANDOM_SKU_THREE
RANDOM_SKU_FOUR
RANDOM_SKU_FIVE

We have tried with queries but always get thousands of lines with the same unique SKU. Have even tried querying queries.

The challenge for us is that we have skills limited to using simple queries etc. Can anybody assist or tell us that it cannot be done please

The purpose is so that we can say to customers "Thank you for buying this book, here are five others you may like"