Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Importing / Linking / September 2005

Tip: Looking for answers? Try searching our database.

insert procedure error message

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
RWG - 15 Sep 2005 02:38 GMT
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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.