If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
append table query
I need to append the results of a query into a table and one of the fields
needs to have a value that is not a part of the query results. Is there a way to do this? e.g. field 1, field 2, field 3, field 4(not in result of query) apple, 1.59, 1.99, Fruit orange, 1.49, 1.99, Fruit grapes, 0.99, 1.29, Fruit |
#2
|
|||
|
|||
append table query
In SQL view:
INSERT INTO tableName (field1, field2, field3, field4) SELECT field1, field2, field3, "Fruit" FROM tableWithData In other words, supply the missing field with the required expression, such as, here, the string constant "Fruit". In the query designer, make the append query, bring the three available fields in the grid, and, for the fourth one, type "Fruit" in the first line (or whatever expression fits). Fill the other elements of the grid, as supplying the name of the fields that will receive the fields/expression in the first line of the grid. Vanderghast, Access MVP "chilli_Novice" wrote in message ... I need to append the results of a query into a table and one of the fields needs to have a value that is not a part of the query results. Is there a way to do this? e.g. field 1, field 2, field 3, field 4(not in result of query) apple, 1.59, 1.99, Fruit orange, 1.49, 1.99, Fruit grapes, 0.99, 1.29, Fruit |
#3
|
|||
|
|||
append table query
Thanks for the help Michel that did the trick.
"Michel Walsh" wrote: In SQL view: INSERT INTO tableName (field1, field2, field3, field4) SELECT field1, field2, field3, "Fruit" FROM tableWithData In other words, supply the missing field with the required expression, such as, here, the string constant "Fruit". In the query designer, make the append query, bring the three available fields in the grid, and, for the fourth one, type "Fruit" in the first line (or whatever expression fits). Fill the other elements of the grid, as supplying the name of the fields that will receive the fields/expression in the first line of the grid. Vanderghast, Access MVP "chilli_Novice" wrote in message ... I need to append the results of a query into a table and one of the fields needs to have a value that is not a part of the query results. Is there a way to do this? e.g. field 1, field 2, field 3, field 4(not in result of query) apple, 1.59, 1.99, Fruit orange, 1.49, 1.99, Fruit grapes, 0.99, 1.29, Fruit |
Thread Tools | |
Display Modes | |
|
|