Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

native SQL

Former Member
0 Likes
459

Hi,

I want to execute the following code and get an exception.

ErrorCode: =>

dsf = 've_country, ve_vendor_no, ve_name' .

dsv = ' :DE, :18005, :jwr'.

EXEC SQL.

insert into Dummytab

(

dsf

)

VALUES

(

dsv

)

ENDEXEC.

<=

Goodcode, which does work.

EXEC SQL.

insert into Dummytab

(

ve_country, ve_vendor_no, ve_name

)

VALUES

(

:'DE', :'18005', :'jwr'

)

ENDEXEC.

Does anybody have an idea, how I can solve?

Thx

Joachim

3 REPLIES 3
Read only

ferry_lianto
Active Contributor
0 Likes
431

Hi,

Please try this.


EXEC SQL.
  INSERT INTO Dummytab
        (ve_country, ve_vendor_no, ve_name)
  VALUES 
        ('DE', '18005', 'jwr')      "Change here
ENDEXEC.

Regards,

Ferry Lianto

Read only

Former Member
0 Likes
431

Hi,

but I want to use a String for the Values, because I want to create the fields, which should be insert Dynamically.

Joachim

Read only

ferry_lianto
Active Contributor
0 Likes
431

Hi,

I don't think you can do that with native SQL.

Regards,

Ferry Lianto