Append query (More than one Value at a time)

G

Guest

Hi,
I have a list of value in the format of "Value1,Value2,Value3..."
I will need an access sql query to add this to a table.
For example if the table was before the query:

Field1 Field2
Done aa
Done bb

after the append query it should be

Field1 Field2
Done aa
Done bb
Done Value1
Done Value2
Done Value3

I am not sure how to tackle it,
Hope you can help
Thanks, M
 
J

John Vinson

Hi,
I have a list of value in the format of "Value1,Value2,Value3..."
I will need an access sql query to add this to a table.

Is this just a text string? Is it coming from a file, a field in the
table, or what? Amplify please!

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
G

Guest

It is a list a value selected in a multiselection listbox - saved is a string.
Thanks
 
J

John Vinson

It is a list a value selected in a multiselection listbox - saved is a string.
Thanks

You'll need to build up the entire SQL string in code. I know of no
good way to do this with a parameter query.

You *can* use a criterion "backwards", like

Where InStr([fieldname], [comma-value-string]) > 0

but this defeats any indexing and will be slow for any reasonably
sized table.

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top