Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

more than one insert statement

Featured Replies

Hi,

is there a way you can insert into an oracle table more than one row through the FileMaker Execute Sql script step?

my sql is as follows:

insert into emp(empno,ename,job) values('1234','Constance','guru')

/

Insert into dept(deptno,dname,loc) values('12','Accounting','Calgary')

/

I keep getting an error that either that there's an invalid character (when I use the ";")or that the Sql command not properly ended (when I use the / to represent a new sql insert command)

Thanks for your help in advance!

Constance

Sql-92 allows a single insert statement to contain multiple rows, I believe it works like this:

insert into emp (empno,ename,job) values

    ('1234','Constance' ,'guru'), ('12','Accounting', 'Calgary')

There's a rough-draft of the SQL-92 standard at: SQL-92 standard

See page 176 for a discussion of this (called table value constructor's).

Reading the page a little myself, it appears that SQL engine's that only implement the "Intermediate" level don't have to support more than one row. But I would expect Oracle to implement the full standard.

Ooops, just re-read your original post, and I see you were referring to different tables. I don't know of any way to do that.

Edited by Guest

I think you'd need to use a stored procedure to do this. The stored procedure would take the values that you are inserting as parameters, then do the two inserts.

-- Tim

  • Author

Do you have an example of a stored procedure that would do this?

I would greatly appreciate it.

Constance

Constance --

No, I don't. I do most of my SQL development on SQL Server, not on Oracle. But your Oracle DBA should be able to whip up a stored procedure to do this fairly easily.

-- Tim

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.