R
Rob Richardson
Greetings!
I want to write an insert query for which one of the values will come from
another query. I have a query that generates a number to use for a new
order. The query is called "GetNewOrderNumber", and its single field is
named "NewOrderNumber". (I forget why I didn't make it an autonumber, but I
didn't.) I want to add a row to my Orders table. The simplest case is to
set the number field only. The following query gives me a wierd error
message:
INSERT INTO Orders (Order_number)
VALUES ((SELECT NewOrderNumber FROM GetNewOrderNumber));
The error message is "Reserved error (-3025); There is no message for this
error."
What is the correct SQL statement to do what I want to do?
Thanks very much!
Rob, once again being hit over the head with how little I truly know about
SQL.
I want to write an insert query for which one of the values will come from
another query. I have a query that generates a number to use for a new
order. The query is called "GetNewOrderNumber", and its single field is
named "NewOrderNumber". (I forget why I didn't make it an autonumber, but I
didn't.) I want to add a row to my Orders table. The simplest case is to
set the number field only. The following query gives me a wierd error
message:
INSERT INTO Orders (Order_number)
VALUES ((SELECT NewOrderNumber FROM GetNewOrderNumber));
The error message is "Reserved error (-3025); There is no message for this
error."
What is the correct SQL statement to do what I want to do?
Thanks very much!
Rob, once again being hit over the head with how little I truly know about
SQL.