spikepl
Eledittingent Beliped
- Local time
- Today, 09:42
- Joined
- Nov 3, 2010
- Messages
- 6,142
I have to sort out a database of goods where many doublets have been created over time. Unfortunately each doublet/triplet/multiplet can be disguised by not having ANY fields common with the other versions. The only pointer I have is that the SKU of a copy contains the SKU of the original. I have some 6000 SKU's.
I want to identify each SKU that has been copied, and into what SKU or SKUs.
tblSKUs
----------
Seq : sequential numerator for shiwing it on AWF
ID: Id of the item (Autonumber)
SKU: SKU (Text)
In the above table, item with Seq 2 is a copy of 1, 4 is a copy of 3, 6-10 are copies of 5, and 12 is copy of 11. Each copied SKU is thus the original SKU + some more characters. Minimum length for an SKU is 4. No maximum length.
I can do anything using VBA, but need to get inspiration to do minimum possible using queries.
I would be happy to get a table like this ( for each copy in RH column, the Orginal is listed in the LH)
My mind is blank at this stage :-( .. can I do this with plain queries?
I want to identify each SKU that has been copied, and into what SKU or SKUs.
tblSKUs
----------
Seq : sequential numerator for shiwing it on AWF
ID: Id of the item (Autonumber)
SKU: SKU (Text)
Code:
Seq ID sku
[FONT=Courier New]1 2205 MQAC2212
2 17416 MQAC2212-black-s-x
3 2258 MQAC2232
4 12815 MQAC2232-red-X
5 2283 MQAC2254
6 13028 MQAC2254-00
7 16278 MQAC2254-red-s-x
8 16298 MQAC2254-red-s-x1
9 16304 MQAC2254-red-s-x2
10 16313 MQAC2254-red-s-x3
11 2302 MQACP
12 12751 MQACP100-X
13 17468 MQBA201-1-s-x
14 17476 MQBA403-1-s-x
15 17216 MQBA503-1-s-x [/FONT]
I can do anything using VBA, but need to get inspiration to do minimum possible using queries.
I would be happy to get a table like this ( for each copy in RH column, the Orginal is listed in the LH)
Code:
[FONT=Courier New]
Original [/FONT][FONT=Courier New]Copy[/FONT]
MQAC2212 MQAC2212-black-s-x
MQAC2232 MQAC2232-red-X
MQAC2254 MQAC2254-00
MQAC2254 MQAC2254-red-s-x
MQAC2254 MQAC2254-red-s-x1
MQAC2254 MQAC2254-red-s-x2
MQAC2254 MQAC2254-red-s-x3
MQACP MQACP100-X