C
Céline Brien
Hi everybody,
Is it possible to copy a record when a field contains three entries and
obtain
3 records, one with each entry.
The table is Colors :
Id Color
1 blue
2 green
3 red
4 green;red;blue
5 blue;green;red
The result I would like after the query :
Id Color
1 blue
2 green
3 red
4 green
4 red
4 blue
5 blue
5 green
5 red
Many thanks,
Céline
-------------------------------
Here are the codes for two entries : green;blue
For three entries can you use Middle ???
-------------------------------
SELECT Brien.ID,
IIf(InStr([Color],";")=0,[Color],Left([Color],InStr([Color],";")-1)) AS
Color_List
FROM Brien
UNION SELECT Brien.ID,
IIf(InStr([Color],";")=0,[Color],right([Color],len([color])-InStr([Color],";")))
AS Expr1
FROM Brien;
Is it possible to copy a record when a field contains three entries and
obtain
3 records, one with each entry.
The table is Colors :
Id Color
1 blue
2 green
3 red
4 green;red;blue
5 blue;green;red
The result I would like after the query :
Id Color
1 blue
2 green
3 red
4 green
4 red
4 blue
5 blue
5 green
5 red
Many thanks,
Céline
-------------------------------
Here are the codes for two entries : green;blue
For three entries can you use Middle ???
-------------------------------
SELECT Brien.ID,
IIf(InStr([Color],";")=0,[Color],Left([Color],InStr([Color],";")-1)) AS
Color_List
FROM Brien
UNION SELECT Brien.ID,
IIf(InStr([Color],";")=0,[Color],right([Color],len([color])-InStr([Color],";")))
AS Expr1
FROM Brien;