Re: [SQL] Advice with an insert query

2013-06-07 Thread Thomas Kellerer
JORGE MALDONADO, 07.06.2013 15:58: > I need to insert records into a table where one value is fixed and 2 values > come from a SELECT query, something like the following example: > > INSERT INTO table1 fld1, fld2, fl3 > VALUES value1, (SELECT fldx, fldy FROM table2) > > Is this valid? > > Respe

Re: [SQL] Advice with an insert query

2013-06-07 Thread Oliver d'Azevedo Cristina
Just pass the fixed value for inside the select subquery. Do this > INSERT INTO table1 fld1, fld2, fl3 > VALUES (SELECT value1, fldx, fldy FROM table2) HTH Best, Oliver Enviado via iPhone Em 07/06/2013, às 02:58 PM, JORGE MALDONADO escreveu: > I need to insert records into a table where

Re: [SQL] Advice with an insert query

2013-06-07 Thread Andreas Gaab
] Advice with an insert query I need to insert records into a table where one value is fixed and 2 values come from a SELECT query, something like the following example: INSERT INTO table1 fld1, fld2, fl3 VALUES value1, (SELECT fldx, fldy FROM table2) Is this valid? Respectfully, Jorge

[SQL] Advice with an insert query

2013-06-07 Thread JORGE MALDONADO
I need to insert records into a table where one value is fixed and 2 values come from a SELECT query, something like the following example: INSERT INTO table1 fld1, fld2, fl3 VALUES value1, (SELECT fldx, fldy FROM table2) Is this valid? Respectfully, Jorge Maldonado