Select to view content in your preferred language

Correct SQL syntax when on Iworkspace.executeSQL

909
2
07-12-2013 06:45 AM
HalilSiddique
Frequent Contributor
Hi All,

I am working on a VBA app, and I am having trouble with running sql using the executeSQL method.

I have a table and a SDE featureclass, i want to insert all the records from a particular field from the featureclass into the table.
The code i am trying to run is..

 
               sql = " insert into DP_TEMP (DP_REF)" + _
                       " select DP_REF " + _
                       " from SY_CSY_CPAT.CITY_DEVELOPMENT_PIPELINES"
               pWS.ExecuteSQL sql


But when the code is run - no errors appear, but the table is empty.

Has anyone got any idea on why it is not working.
Thanks
0 Kudos
2 Replies
HalilSiddique
Frequent Contributor
Any inkling anyone?
0 Kudos
SachinKanaujia
Deactivated User
Are you able to execute the same insert query from a sql prompt or sql editor and not here? Its always better to have a schema name qualification for the tables to be sure that they are modified correctly.
0 Kudos