span8
span4
span8
span4
When writing to an Oracle table and using a Sequence in the insert statement the SQL DML statement would look like this:
Insert into table1 (ID, myatt1, myatt2) values (ID_SEQ.nextval, ' testing', 'testing 2');
This would assign the sequence's next value to this attribute.
In FME the Oracle Spatial and Non-Spatial Writers have a Feature Type Format Parameter called "Sequenced Table Columns".You can assign different columns to different sequences by entering the column name and sequence name pairs like so:
column1:seqname1;column2:seqname2;..
To get fancy you can also have FME create the sequence for you...by entering the above column/sequence name pair and having FME create the table for you (set the Format Parameter "Table Handling" to "Create If Needed") the sequence will be created when FME writes to the database.
NOTE:
Ensure you are careful with the sequence names in this case.If the sequence entered doesn't match the sequence name in the schema you are writing to, FME will create it...and thus you won't get values you expect.FME will create the sequence for you in this case even if the table does exist.Obviously if the sequence already exists FME will make use of it so ensure to check the database schema you are writing to for existing sequences if you are not familiar with the database.
If you want to use a sequence in another schema then you must use the schema in the column sequence name pairing.
column1:schema1.seqname1
Even if the synonym exists for the sequence FME will not relate to the correct sequence unless you include the schema name.
To check for existing sequences using SQL Plus and logged on as the schema owner you intend to write to run:
select sequence_name, Last_number, Max_value, Increment_by from user_sequences;
This will return the sequences that exist in that schema.You may want to use ALL_SEQUENCES table and include the SEQUENCE_OWNER column if you are inquiring about another schema.
You can useSQLCreator / SQLExecutortransformers to work with existing Sequence numbers.
E.g.to get the next sequence number in a sequence use the appropriate SQL statement
SELECT ID_SEQ.nextval as StartID from DUAL
This will return a value for StartID which can then be exposed using theAttributeExposerand used in transformers such as the计数器orAttributeSetter。
有可能通过利用SQL语句来之前执行/翻译设置后操纵甲骨文序列值。在这里,您可以发出SQL命令来关闭测序工作区的持续时间和重新打开工作区完成之后。有时,这如果你要在工作区中手动管理的序列号是必要的。
Performing spatial queries on database tables using the FeatureReader
Using the SQLExecutor or SQLCreator to issue commands to a database
Running a Oracle stored procedure
Writing custom data types to an Oracle table
Read Oracle Sequence Nextval and use in Counter
Oracle error was `ORA-00911: invalid character
FME is loading features with invalid geometries into my Database
Writing to an Oracle table with Foreign Keys
© 2020 Safe Software Inc |Legal