A B Bob 1, 2, 3 Sue 2, 3, 4 Jane 2
And want
A B Bob 1 Bob 2 Bob 3 Sue 2 Sue 3 Sue 4 Jane 2
What would be the SQL code to create this?
A B Bob 1, 2, 3 Sue 2, 3, 4 Jane 2
And want
A B Bob 1 Bob 2 Bob 3 Sue 2 Sue 3 Sue 4 Jane 2
What would be the SQL code to create this?
Is B field a multi-value or is that just a comma separated string? The first would be easy, the second is not.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
The B field is a comma separated field unfortunately![]()
By comma separated field you mean just a typed text string?
If the items were selected by a multi-select listbox or combobox then that is a multi-value field.
If this is simply a text string, parsing the string to separate records can be complex because of the inconsistent structure, not every value is the same length. Can there be more than 3 items or even none?
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Correct. This is just a string. The real data is actually patch IDs, with varying lengths but will be comma delimited in a single cell.
Since there is no way to know how many elements, a UNION query is not possible.
Only approach I can see is VBA code writing records to a temp table, essentially building the structure should have started with.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.