I have an access 2000 database (with the adp extension, so it's actually a
SQL database) and I'm am trying to "append" data from a view to a table.
Both have the same number of fields, each are the same field types, however
the following Procedure says bad things about the proc ADO error: Incorrect
syntax near the keyword 'INSERT'.
Create Procedure "ProcName"
INSERT "tablename" (field_1, field_2, field_3)
SELECT field_1, field_2, field_3
FROM "viewname"
Help
John Nurick - 15 Sep 2005 07:20 GMT
I don't know about T-SQL, but in Jet SQL that would be INSERT INTO,
wouldn't it?
>I have an access 2000 database (with the adp extension, so it's actually a
>SQL database) and I'm am trying to "append" data from a view to a table.
[quoted text clipped - 9 lines]
>
>Help
--
John Nurick [Microsoft Access MVP]
Please respond in the newgroup and not by email.
RWG - 15 Sep 2005 16:11 GMT
Tried that also
> I don't know about T-SQL, but in Jet SQL that would be INSERT INTO,
> wouldn't it?
[quoted text clipped - 17 lines]
>
> Please respond in the newgroup and not by email.
John Nurick - 15 Sep 2005 21:43 GMT
Are you actually using double quotes round the names of the table and
view? That produces syntax errors in Jet SQL.
>Tried that also
>
[quoted text clipped - 19 lines]
>>
>> Please respond in the newgroup and not by email.
--
John Nurick [Microsoft Access MVP]
Please respond in the newgroup and not by email.
RWG - 15 Sep 2005 21:55 GMT
no quote marks. Same statement without the Create Procedure line works in
SQL Query Analyser.
> Are you actually using double quotes round the names of the table and
> view? That produces syntax errors in Jet SQL.
[quoted text clipped - 27 lines]
>
> Please respond in the newgroup and not by email.
John Nurick - 16 Sep 2005 06:55 GMT
Isn't there some sort of terminator needed between the CREATE PROCEDURE
statement and what in another language would be the body of the
procedure? Like AS? You'd better check in BOL or MSDN: they're a far
better source of SQL Server information than I am.
>no quote marks. Same statement without the Create Procedure line works in
>SQL Query Analyser.
[quoted text clipped - 30 lines]
>>
>> Please respond in the newgroup and not by email.
--
John Nurick [Microsoft Access MVP]
Please respond in the newgroup and not by email.
RWG - 16 Sep 2005 17:48 GMT
Yep the AS word was needed. Thanks
> Isn't there some sort of terminator needed between the CREATE PROCEDURE
> statement and what in another language would be the body of the
[quoted text clipped - 40 lines]
>
> Please respond in the newgroup and not by email.