insert into Oracle tables from SQL Server

  • When I try to put my SQL into a Stored Procedure I get this error (see the attachment).

    My SQL executes correctly:

    CREATE PROCEDURE [nontouch].[insert_salary_employee_hours] AS

    INSERT INTO OPENQUERY([risexw.caemilusa_test.local],

    'SELECT * FROM LaborOwner.salary_employee_hours_backup')

    SELECT site_code,

    week_ending_date,

    employee_id,

    record_date,

    project_number,

    labor_type_code,

    regular_hours,

    overtime_hours,

    sunday_hours,

    casual_hours,

    rate_used,

    processed_flag,

    date_added,

    added_id,

    comment_text,

    charged_obs,

    cost_element,

    charged_bid_category,

    home_obs,

    home_bid_category,

    shift_diff_hours,

    shift_diff_type,

    labor_type,

    shift_ot_hours from nontouch.salary_employee_hours

    where trans_to_ora = '1'

    I issued the command:

    set ansi_warnings on

    set ansi_nulls on

    for the database in SQL Server.

    Any other ideas on this?

  • hi!

    where can I see the exact errormessage?

    Maybe there is just an syntaxerror in the sql statement. in such cases I try to insert data into a testtable (with only 2-3 fields) so I can narrow the source of the error...

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

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