Help creating insert statement using Excel

  • Hi,

    I'm pretty green at this, any help would be great:

    I'm trying to write an insert statement so that it looks like this:

    insert into stk_location (Item_Code, Whouse_code) Values ('column J', 'VN09')

    I've entered it into Excel like so, but it keeps throwing up errors:

    ="insert into stk_location (Item_Code, Whouse_code) Values ('"&J3&"', 'VN09')

    This is the only part of the statement that needs to look at a field in the same sheet - '"&J3&"' all other items are text only.

    thanks

  • Hi I generally use concatenate function in excel to see how my insert statement builds up.

    Hope this solves your problem.

    =CONCATENATE("INSERT INTO stk_location "," (item_Code, Whouse_Code)"," Values","( '",J$3,"' ,","'","VN09","'"," )")

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply