insert into
I have created this query:
INSERT INTO versamenti2 ( codice_iscrizione, riferimento )
SELECT codice_iscrizione, rif
FROM iscrizioni;
I want that only the current record is appended in the table
iscrizioni2
thanks
by
Re: insert into
"nicolacantalupo" <nicolacantalupo [at] libero.it> wrote
>I have created this query:
> INSERT INTO versamenti2 ( codice_iscrizione, riferimento )
> SELECT codice_iscrizione, rif
> FROM iscrizioni;
> I want that only the current record is appended in the table
> iscrizioni2
What "current record"?
If from a Form, you should be able to obtain from the Form or the Form's
RecordSource the unique identifer of the Form's current record, and use it
to construct a WHERE or HAVING clause in your SQL.
Larry Linson
Microsoft Access MVP
Re: insert into
On Fri, 18 Jan 2008 19:53:14 GMT, "Larry Linson"
<bouncer [at] localhost.not> wrote:
Larry is right. A SQL statement like:
INSERT INTO versamenti2 ( codice_iscrizione, riferimento )
SELECT codice_iscrizione, rif
FROM iscrizioni
WHERE <primarykey> = Forms!YourFormName!YourPrimaryKeyField
will update just a single row.
The HAVING clause is reserved for GROUP BY situations - not your
problem at this time.
-Tom.
>"nicolacantalupo" <nicolacantalupo [at] libero.it> wrote
>
>>I have created this query:
>> INSERT INTO versamenti2 ( codice_iscrizione, riferimento )
>> SELECT codice_iscrizione, rif
>> FROM iscrizioni;
>> I want that only the current record is appended in the table
>> iscrizioni2
>
>What "current record"?
>
>If from a Form, you should be able to obtain from the Form or the Form's
>RecordSource the unique identifer of the Form's current record, and use it
>to construct a WHERE or HAVING clause in your SQL.
>
> Larry Linson
> Microsoft Access MVP
>