MAXL to import data to the OSB.
Greetings,
I'm trying to import data from a data file located on our unix Server (/ export/lvl0.txt). Here's the Maxl I use to import data.
-->. import data from AA.aa database server text data_file ' / export/lvl0.txt ' on abandonment of the error;
I get this error when I call this Maxl using a Shell script.
ERROR - 1003027 - failed to open file [/ hyperion/Oracle/Middleware/user_projects/epmsystem1_Ess13/EssbaseServer/essbaseserver1/app/AA/aa/lvl0.txt].
ERROR - 1241101 - Essbase unexpected error 1003027.
I guess maxl looks for the file in the default location. Any suggetions?
If this data file is free of data, then no need of rules file (free-form means the same thing that you export the request essbase data)... Otherwise, you need rule file to understand the combination of its data and metadata to essbase.
See you soon!
SH! going
Tags: Business Intelligence
Similar Questions
-
import data into the different tablespace
Hello
I had exported a my schema of production data now I want to import data in the schema of the trial, I had mentioned the tablespace default for the trial scheme, but when I import data is not taking default tablespace of schema of its database taking default tablespace. How to import data into the different tablespace. In remap_tablespace where I can specify the touser.
my version of oracle database:
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
AMT for 32-bit Windows: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
-------------------------------------------------------------------------------------------------------------------------------------------Raj wrote:
HelloI had exported a my schema of production data now I want to import data in the schema of the trial, I had mentioned the tablespace default for the trial scheme, but when I import data is not taking default tablespace of schema of its database taking default tablespace. How to import data into the different tablespace. In remap_tablespace where I can specify the touser.
my version of oracle database:
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
AMT for 32-bit Windows: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production-------------------------------------------------------------------------------------------------------------------------------------------
If your storage source and destination areas are different, you must use the remap_tablespace option.
example:System $impdp / * directory = data_pump_dir dumpfile = logfile = schema_refresh.log remap_schema = Prd_schema:Tst_schema remap_tablespace = prd_TBS:tst:TBS schema_refresh.dmp
-
importing data from the old system to the new system, key to the raw16 column
Hi, experts,
now I have a new system, the design of the system is to use raw (16) column as the key column in all tables of database.
of course, when the new system goes live (in production), new records of transactions are written to the new database system.
When the new system inserts new records, it manages itself to avoid any conflict of the raw key column value (16)
Now, I'm dealing with this problem:
I need to import data from the old system to the new system, I use sys_guid() to fill the column raw (16) into the new database system.
How can I avoid conflicts of raw column value (16) between the old system data and the new data of database system?
the sql code I write is very simple:
insert into new_sys_table_a (key_column_raw_16,...,...)
Select sys_guid(), old_sys_col_a, old_sys_col_b
of old_sys_table_a;insert into new_sys_table_a (key_column_raw_16, col1, col2 ) select key_column_raw_16, col1, col2 from old_sys_table_a;
-
Import data from the text file to open the Document
This should seem simple, but I can't find a way to import a text file delimited to tab automatically on opening the document. I can open my form fill pdf document, select Forms > more form Options > data management > Import Data > change the bottom right "Text (*.txt) files" file type, select the file, then import with no problems. I can't find a way to do this automatically when the document opens. I know a *.fdf file will do, but my data are in a tab delimited text file. If this is not possible, is there a program or a script that will convert *.txt to import *.fdf? Thanks for your time. Steve
Have you looked at using custom JavaScript?
You will need to work on how the data file select the line form.
-
How to import Date into the text data file TDR box?
I have a report template that I use frequently for data tracing files. At the top of the TOR, I have a main title text box that says "Daily Operation" usually followed by the date (entered manually) of this file.
Q: How do I import/reference the value of the date of the file (photo #1 - black outline) in the text box (photo #2) I use to Date? I appreciate all help.
Hi man of laboratory.
Looks like you will need to use the RTT (-real time), which transforms the tiara time real number (fractions of a second from 0 AD) in a date/time string. There is also a TTR function that goes the other way.
@@RTT (ChD (1, "[1] / Date"), "" mm/dd/yyyy # hh:nn:ss.fff "') @.
Brad Turpin
Tiara Product Support Engineer
National Instruments
-
import data with the command line switch
Is it possible to automatically import data to a .pdf file? My idea would be a command line switch, but another way would be appreciated also.
To explain myself better (my English is bad and I use a non-English version of Adobe Acrobat Reader):
I use Adobe Acrobat Reader DC and got a PDF with a lot of filelds. Now I can open the 'empty' file and import the data (.xml or .xdp format, I prefer .xml). It works very well.
I would like to stress that this task "import data" is performed automatically when I run the file - so I think that a command line parameter, but also another (macros?) way would be OK.
sincerely
Bruno
Open the FDF file instead. It must contain a key F name the PDF file.
-
How to import data from the Excel worksheet file in a table DB using a filebrowse
Hi friends,
Im having a table has with the following columns as
< Li > ID
< Li > Employee_name
< Li > Department
with empty data in it.
Im having an excel sheet that contains the data for the table has for the column ID < Employee_name < Department
If it is possible to import excel data sheet empty table A that I have in the DB using a form of front-end APEX which is having a file navigation item only.
So, if I store that excel sheet using a navigation button in table wwv_flows_files, then automatically all means this sheet file data in the excellent flows_files table must be inserted into the table empty i have.
It is possible to store the data this way using a browse.
Brgds,
MiniHello
If you're on APEX 4.1 create data loading page. Then the end user may download the CSV data to your table.
Excel can be saved in CSV format.Kind regards
Jarihttp://dbswh.webhop.NET/dbswh/f?p=blog:Home:0
-
import data into the table with the triggers of the sequence
Hello
I'm on oracle 11G on OS SPARC.
I need to import a table from a dump using "imp."
At the destination table where I have to import a 'insert before' with the sequence as the primary key.
Suppose if I am importing data that has the sequence from 200... then when I imported the data into the new table, I have to define the sequence to be the same as the boot sequence for the source or it will automatically use this source sequence.
Please suggest
concerning
KkurkejaDisable the trigger prior to importation.
Thank you
-
Can we import data to the server target directly without creating a dump file
Hi all...
We choose to pass patterns to the target server using the data pump in Import/export.
in the normal case, I use that way
1. export the drawings required in the dump by customer 10 g file.
target 2 - required import patterns directly to the server.
but when I'd rather pump data is faster and easier.
but I have a problem here when I export the file from the server only and this file is large (schematics size 80 GB) of data.
then I need move this file to the target. I don't like it. It will take more time.
I heard of network link. Can I use this function to import data directly to the target server.
My big concern here time.
Thanks in advanceYes, if you use the option NETWORK_LINK that no dump file is created on the source server or destination. I would say that the time to complete the task is directly related to the infrastructure of network between the source and destination hosts.
-
NEED TO IMPORT DATA TO THE FIELD OFFICE
I have a form where I want: place 1.) data in the correct location on the digitized form, 2) copy the data, learn about their positions on a file, 3) place the copied data, know their positions on a form of my printer
You should probably get Acrobat, then. Drive is capable of doing these things, but it requires a lot of scripts. Acrobat includes these built-in features.
-
Import data over the network link in oracle 11 g
We want to take the export of the NDO schema in database production and
import in the scheme of the NDO in UAT database on a network
link using data in Oracle 11 g pump. Kindly share the steps.Scenario:
Directly import the schema of TEST01 in the production database (oraodrmu) to test the oraodrmt database, on
a network to help pump link and data from database in Oracle 11 g.Note: When you perform an import via a database link, the import source is a database, not a dump file set, and the data is imported to the connected instance of database.
Because the link may identify a database remotely in a network, the database of terms link and the network link are used interchangeably.=================================================================
STEP 1 (IN PRODUCTION DATABASE - oraodrmu)
=================================================================[root@szoddb01] > su - oraodrmu
Enter the user name: virtue sysdba
Connected to:
Oracle Database 11 g Enterprise Edition Release 11.2.0.2.0 - 64 bit Production
With partitioning, OLAP, Data Mining and Real Application Testing optionsSQL > grant resources to test01.
Grant succeeded.
SQL > grant imp_full_database to test01.
Grant succeeded.
SQL > select owner, object_type, status, count (*) in the dba_objects where owner = "TEST01" group by owner, object_type, status;
OWNER OBJECT_TYPE STATUS COUNT (*)
------------------------------ ------------------- ------- ----------
TEST01 PROCEDURE VALID 2
TEST01 TABLE 419 VALID
TEST01 SEQUENCE VALID 3
TEST01 FUNCTION VALID 8
TEST01 TRIGGER 3 VALID
TEST01 INDEX VALID 545
TEST01 LOB 18 VALID7 selected lines.
SQL >
SQL > define pages 999
SQL > format 'size Mo' 999 999 999 col
SQL > col 'objects' format 999 999 999
SQL > select obj.owner 'owner '.
obj_cnt 2, 'objects '.
3, decode (seg_size, NULL, 0, seg_size) 'size MB.
4 of (select master, the obj_cnt of count (*) group by owner dba_objects) obj
5, (select master, ceil (sum (bytes) / 1024/1024) seg_size)
6 Group dba_segments by owner) seg
7 where obj.owner = seg.owner (+)
Order of 8 by 3 desc, desc 2, 1
9.Size of the objects owner MB
------------------------------ ------------ ------------
NDO 8 097 284 011
9 601 1 912 SYS
998 1 164 TEST013 selected lines.
SQL > exit
=================================================================
STEP-2 (in TEST DATABASE - oraodrmt)
=================================================================[root@szoddb01] > su - oraodrmt
[oraodrmt@szoddb01] > sqlplus
SQL * more: Production release 11.2.0.2.0 on Mon 3 dec 18:40:16 2012
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Enter the user name: virtue sysdba
Connected to:
Oracle Database 11 g Enterprise Edition Release 11.2.0.2.0 - 64 bit Production
With partitioning, OLAP, Data Mining and Real Application Testing optionsSQL > select name, open_mode from v$ database;
NAME OPEN_MODE
--------- --------------------
ODRMT READ WRITESQL > create tablespace test_test datafile ' / trn_u04/oradata/odrmt/test01.dbf' size 2048 m;
Created tablespace.
SQL > create user identified by test123, default tablespace test01 test_test;
Created by the user.
SQL > grant resources, create session to test01.
Grant succeeded.
SQL > grant permission to test01.
Grant succeeded.
SQL > grant imp_FULL_DATABASE to test01.
Grant succeeded.
Note: ODRMU is the name of hoste DNS. We can test the connection with: [oraodrmt@szoddb01] > sqlplus test01/test01@odrmu
SQL > create directory test_network_dump as ' / dbdump/test_exp ";
Created directory.
SQL > grant read, write on directory test_network_dump to test01.
Grant succeeded.
SQL > conn test01/test123
Connected.SQL > DATABASE LINK remote_test CONNECT TO test01 identified by test01 to create with the HELP of "ODRMU";
Database link created.
To test the link of database, we can try the sql below:
SQL > select count (*) in OA_APVARIABLENAME@remote_test;
COUNT (*)
----------
59SQL > exit
[oraodrmt@szoddb01] > impdp test01/test123 network_link = remote_test = test_network_dump remap_schema = test01:test01 logfile directory = impdp__networklink_grms.log;
[oraodrmt@szoddb01] >Import: Release 11.2.0.2.0 - Production on Mon 3 19:42:47 dec 2012
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11 g Enterprise Edition Release 11.2.0.2.0 - 64 bit Production
With partitioning, OLAP, Data Mining and Real Application Testing options
Departure "TEST01". "' SYS_IMPORT_SCHEMA_01 ': test01 / * network_link = remote_test = test_network_dump remap_schema = test01:test01 impdp_grms_networklink.log = logfile directory
Current estimation using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 318,5 MB
Processing object type SCHEMA_EXPORT/USER
ORA-31684: USER object Type: "TEST01" already exists
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE of treatment
Object type SCHEMA_EXPORT/TABLE/TABLE processing
. . imported "TEST01". "' SY_TASK_HISTORY ' 779914 lines
. . imported "TEST01". "' JCR_JNL_JOURNAL ' 603 lines
. . imported "TEST01". "" 1229 GX_GROUP_SHELL lines.
. . . .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .
. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. ..
. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. ..
. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. ..Work "TEST01". "" SYS_IMPORT_SCHEMA_01 "completed with error (s 1) at 19:45:19
[oraodrmt@szoddb01] > sqlplus
SQL * more: Production release 11.2.0.2.0 on Mon 3 dec 19:46:04 2012
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Enter the user name: virtue sysdba
Connected to:
Oracle Database 11 g Enterprise Edition Release 11.2.0.2.0 - 64 bit Production
With partitioning, OLAP, Data Mining and Real Application Testing optionsSQL > select owner, object_type, status, count (*) in the dba_objects where owner = "TEST01" group by owner, object_type, status;
OWNER OBJECT_TYPE STATUS COUNT (*)
------------------------------ ------------------- ------- ----------
TEST01 PROCEDURE VALID 2
TEST01 TABLE 419 VALID
TEST01 SEQUENCE VALID 3
TEST01 FUNCTION VALID 8
TEST01 TRIGGER 3 VALID
TEST01 INDEX VALID 545
TEST01 LOB 18 VALID
TEST01 DATABASE LINK VALID 18 selected lines.
SQL >
SQL > define pages 999
SQL > format 'size Mo' 999 999 999 col
SQL > col 'objects' format 999 999 999
SQL > select obj.owner 'owner '.
obj_cnt 2, 'objects '.
3, decode (seg_size, NULL, 0, seg_size) 'size MB.
4 of (select master, the obj_cnt of count (*) group by owner dba_objects) obj
5, (select master, ceil (sum (bytes) / 1024/1024) seg_size)
6 Group dba_segments by owner) seg
7 where obj.owner = seg.owner (+)
Order of 8 by 3 desc, desc 2, 1
9.Size of the objects owner MB
------------------------------ ------------ ------------
NDO 8 065 247 529
9 554 6 507 SYS
999 1 164 TEST0113 selected lines.
=================================================================
STEP 3 TO REMOVE THE LINK OF DATABASE
=================================================================[oraodrmt@szoddb01] > sqlplus
SQL * more: Production release 11.2.0.2.0 on Mon 3 dec 19:16:01, 2012
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Enter the user name: virtue sysdba
Connected to:
Oracle Database 11 g Enterprise Edition Release 11.2.0.2.0 - 64 bit Production
With partitioning, OLAP, Data Mining and Real Application Testing optionsSQL > drop database link remote_test;
Database link dropped.
-
Import data from the grid using Excel Option not available
On the grid, we have the ability to import the data in grid. However, on the Import Wizard, the only option that appears is import values separated by comma (CSV). Options for importing to Excel not displayed. Why is it other import options is not available?You may need to register the OCX that offer this feature.
You can check out a place like this OCX files:
C:\Program Files\IBM\WebSphere\AppServer\installedApps\E1DVWEB1Node01\EA_JS_Prototype.ear\webclient.war\axctls\jdeexpimpU.cab
and
C:\Program Files\IBM\WebSphere\AppServer\installedApps\E1DVWEB1Node01\EA_JS_Prototype.ear\webclient.war\axctls\jdewebctlsU.cab
Put the OCX files in a network location, and then put cela in a connection/GPO script or run it manually:
copy '\\somenetworklocation\jdeexpimpu\jdeexpimpU.ocx' 'C:\windows\system32\.
copy '\\somenetworklocation\jdeexpimpu\jdewebctlsU.ocx' 'C:\windows\system32\.
regsvr32 "c:\windows\system32\jdeexpimpU.ocx".
regsvr32 "c:\windows\system32\jdewebctlsU.ocx". -
Import data to the level the lowest storage
Hi guys,.
So I chose this for some backup RDMs, my question is why have replays frozen in this volume?
Also what makes allow replays to blend in proofreading active?
The replay expired October 21? What is the best way to proceed exactly. If I unexpire he said that the data could end up spending levels?
When you take a replay, it freezes the data at this time here in time (a replay of '' Frozen ''). A brand replay the entire block has changed since the last replay as readonly. If it's the oldest replay, he will have all the blocks marked as readonly.
As long as you take always either slow down regular or manual creation of a replay, then it should always work. The shows of the State if it's reading 'Active' (where the written is written to) or a replay of 'Frozen' have been given are marked as readonly because you take a replay.
If you have only 1 replay 'frozen' on a volume, it won't coalesce until there is a more recent replay. The 'Replays allow to blend into active Replay' always a replay of 'Frozen' to merge up to the accessible read-write. Deleting affectively playback if it's only reading 'frozen '.
-
Reading file from the ftp server and importing data into the table
Hi experts,
Well, basically, I text with different layout files have been uploaded to an ftp server. Now, I must write a procedure to recover these files, read and insert data into a table... what to do?
your help would be greatly helpful.
Thank youuser9004152 wrote:
http://it.Toolbox.com/wiki/index.php/Load_data_from_a_flat_file_into_an_Oracle_tableSee the link, hope it will work.
It is an old method, using the utl_file_dir parameter that is now obsolete and which is frankly a waste of space when external tables can do exactly the same thing much more easily.
-
Error with PL/SQL procedure to import data into the database
When you run the procedure below, I get the message:
Compilation failure, line 448
PLS-00103: encountered the symbol "LOOP" when expecting one of the following values: case of the symbol "case" was substituted for the "LOOP" continue. Compilation failure, line 450
PLS-00103: encountered the symbol ";" when expecting one of the following values: case
Can someone help me understand what im missing? Thank you
Deanna
CREATE OR REPLACE PROCEDURE PURSUITS.IMPORT_LEGACY_PURSUIT IS CURSOR DATA_CURSOR IS SELECT * FROM PURSUITS.IMPORT_LEGACY_PURSUIT; CR DATA_CURSOR%ROWTYPE; V_PURSUIT_DATE DATE; V_ROADWAY_TYPE VARCHAR2(5); V_TRAFFIC_FLOW VARCHAR2(8); V_REASON_FOR_INITIATION VARCHAR2(6); V_VEHICLE_MARKING VARCHAR2(8); V_VEHICLE_LIGHTS_ON VARCHAR2(1); V_VEHICLE_SIREN_ON VARCHAR2(1); V_AIRCRAFT_AVAILABLE VARCHAR2(1); V_AIRCRAFT_INVOLVED VARCHAR2(1); V_OTHER_AGENCY_INVOLVED VARCHAR2(1); V_OTHER_AGENCY_STATUS VARCHAR2(8); V_OTHER_AGENCY_COUNT NUMBER(2,0); V_SUSPECT_VEHICLE_TYPE VARCHAR2(2); V_SUSPECT_RACE VARCHAR2(1); V_SUSPECT_ETHNICITY VARCHAR2(1); V_SUSPECT_ID_KNOWN VARCHAR2(1); V_SUSPECT_POSSESS_WEAPON VARCHAR2(1); V_REASON_FOR_TERMINATION VARCHAR2(6); V_REASON_FOR_FLIGHT VARCHAR2(6); V_ACCIDENT VARCHAR2(1); V_ACCIDENT_TYPE VARCHAR2(8); V_ACCIDENT_PARTIES_INVOLVED VARCHAR2(8); V_CASE_COUNT NUMBER; BEGIN OPEN DATA_CURSOR; LOOP FETCH DATA_CURSOR INTO CR; EXIT WHEN DATA_CURSOR%NOTFOUND; --PURSUIT DATE -- IF CR.PURSUIT_DATE = 0 THEN -- V_PURSUIT_DATE :=NULL; -- ELSE -- V_PURSUIT_DATE :=TO_DATE(CR.PURSUIT_DATE,CONCAT('MONTH'/'DAY'/'YEAR'); -- END IF; --ROADWAY TYPE CASE WHEN CR.ROADWAY = 1 THEN V_ROADWAY_TYPE := 'URBAN'; WHEN CR.ROADWAY = 2 THEN V_ROADWAY_TYPE := 'RURAL'; ELSE V_ROADWAY_TYPE := NULL; END CASE; --TRAFFIC FLOW CASE WHEN CR.TRAFFICFLO = 1 THEN V_TRAFFIC_FLOW := 'LIGHT'; WHEN CR.TRAFFICFLO = 2 THEN V_TRAFFIC_FLOW := 'MODERATE'; WHEN CR.TRAFFICFLO = 3 THEN V_TRAFFIC_FLOW := 'HIGH'; ELSE V_TRAFFIC_FLOW := NULL; END_CASE; --INITIATION CODES CASE WHEN CR.INITREASON = 1 THEN V_REASON_FOR_INITIATION := 'SUSACT'; WHEN CR.INITREASON = 2 THEN V_REASON_FOR_INITIATION := 'TRAFVI'; WHEN CR.INITREASON = 3 THEN V_REASON_FOR_INITIATION := 'MISCCR'; WHEN CR.INITREASON = 4 THEN V_REASON_FOR_INITIATION := 'FELONY'; WHEN CR.INITREASON = 5 THEN V_REASON_FOR_INITIATION := 'DUIARR'; WHEN CR.INITREASON = 6 THEN V_REASON_FOR_INITIATION := 'NCICHT'; WHEN CR.INITREASON = 7 THEN V_REASON_FOR_INITIATION := 'OTHERR'; ELSE V_REASON_FOR_INITIATION := NULL; END_CASE; --VEHICLE MARKING CASE WHEN CR.CARMARKS = 1 THEN V_VEHICLE_MARKING := 'MRKLIGHT'; WHEN CR.CARMARKS = 2 THEN V_VEHICLE_MARKING := 'MRKCLEAN'; WHEN CR.CARMARKS = 3 THEN V_VEHICLE_MARKING := 'UNMARKED'; ELSE V_VEHICLE_MARKING := NULL; END CASE; --LIGHTS CASE WHEN CR.LIGHTS_ON = 1 THEN V_VEHICLE_LIGHTS_ON := 'Y'; WHEN CR.LIGHTS_ON = 2 THEN V_VEHICLE_LIGHTS_ON := 'N'; ELSE V_VEHICLE_LIGHTS_ON := NULL; END CASE; --SIREN CASE WHEN CR.SIREN_ON = 1 THEN V_VEHICLE_SIREN_ON := 'Y'; WHEN CR.SIREN_ON = 2 THEN V_VEHICLE_SIREN_ON := 'N'; ELSE V_VEHICLE_SIREN_ON := NULL; END CASE; --AIRCRAFT AVAILABLE CASE WHEN CR.AIRCRAFTAV = 1 THEN V_AIRCRAFT_AVAILABLE := 'Y'; WHEN CR.AIRCRAFTAV = 2 THEN V_AIRCRAFT_AVAILABLE := 'N'; WHEN CR.AIRCRAFTAV = 3 THEN V_AIRCRAFT_AVAILABLE := 'U'; ELSE V_AIRCRAFT_AVAILABLE := NULL; END CASE; --AIRCRAFT INVOLVED CASE WHEN CR.AIRCRAFTIN = 1 THEN V_AIRCRAFT_INVOLVED := 'Y'; WHEN CR.AIRCRAFTIN = 2 THEN V_AIRCRAFT_INVOLVED := 'N'; ELSE V_AIRCRAFT_INVOLVED := NULL; END CASE; --AGENCY INVOLVED CASE WHEN CR.OTHRAGENCY = 1 THEN V_OTHER_AGENCY_INVOLVED := 'Y'; WHEN CR.OTHRAGENCY = 2 THEN V_OTHER_AGENCY_INVOLVED := 'N'; ELSE V_OTHER_AGENCY_INVOLVED := NULL; END CASE; --AGENCY STATUS CASE WHEN CR.STATUS = 1 THEN V_OTHER_AGENCY_STATUS := 'INITIATE'; WHEN CR.STATUS = 2 THEN V_OTHER_AGENCY_STATUS := 'ASSISTED'; ELSE V_OTHER_AGENCY_STATUS := NULL; END CASE; --SUSPECT VEHICLE TYPE CASE WHEN CR.VEHICLETYP = 1 THEN V_SUSPECT_VEHICLE_TYPE := 'SD'; WHEN CR.VEHICLETYP = 2 THEN V_SUSPECT_VEHICLE_TYPE := 'MC'; WHEN CR.VEHICLETYP = 3 THEN V_SUSPECT_VEHICLE_TYPE := 'VN'; WHEN CR.VEHICLETYP = 4 THEN V_SUSPECT_VEHICLE_TYPE := 'PK'; WHEN CR.VEHICLETYP = 5 THEN V_SUSPECT_VEHICLE_TYPE := 'DS'; WHEN CR.VEHICLETYP = 6 THEN V_SUSPECT_VEHICLE_TYPE := 'OT'; ELSE V_SUSPECT_VEHICLE_TYPE := NULL; END CASE; --SUSPECT RACE AND ETHNICITY IF CR.RACE = 'H' THEN V_SUSPECT_RACE := 'W'; ELSE V_SUSPECT_RACE := CR.RACE; END IF; --SUSPECT ETHNICITY IF CR.RACE = 'H' THEN V_SUSPECT_ETHNICITY := 'H' ELSE V_SUSPECT_ETHNICITY := NULL; END IF; --SUSPECT ID CASE WHEN CR.ID_KNOWN = 1 THEN V_SUSPECT_ID_KNOWN := 'Y'; WHEN CR.ID_KNOWN = 2 THEN V_SUSPECT_ID_KNOWN := 'N'; ELSE V_SUSPECT_ID_KNOWN := NULL; END CASE; --SUSPECT WEAPON CASE WHEN CR.WEAPON = 1 THEN V_SUSPECT_POSSESS_WEAPON := 'Y'; WHEN CR.WEAPON = 2 THEN V_SUSPECT_POSSESS_WEAPON := 'N'; ELSE V_SUSPECT_POSSESS_WEAPON := NULL; END CASE; --TERMINATION REASON CASE WHEN CR.TERMREASON = 1 THEN V_REASON_FOR_TERMINATION := 'DVRVOL'; WHEN CR.TERMREASON = 2 THEN V_REASON_FOR_TERMINATION := 'ALATER'; WHEN CR.TERMREASON = 3 THEN V_REASON_FOR_TERMINATION := 'VEHDIS'; WHEN CR.TERMREASON = 4 THEN V_REASON_FOR_TERMINATION := 'VEHWRK'; WHEN CR.TERMREASON = 5 THEN V_REASON_FOR_TERMINATION := 'ROADBL'; WHEN CR.TERMREASON = 6 THEN V_REASON_FOR_TERMINATION := 'STOPST'; WHEN CR.TERMREASON = 7 THEN V_REASON_FOR_TERMINATION := 'RAMMED'; WHEN CR.TERMREASON = 8 THEN V_REASON_FOR_TERMINATION := 'WEAPON'; WHEN CR.TERMREASON = 9 THEN V_REASON_FOR_TERMINATION := 'DVRINJ'; WHEN CR.TERMREASON = 10 THEN V_REASON_FOR_TERMINATION := 'OFFTER'; WHEN CR.TERMREASON = 11 THEN V_REASON_FOR_TERMINATION := 'SUPTER'; WHEN CR.TERMREASON = 12 THEN V_REASON_FOR_TERMINATION := 'PATDIS'; WHEN CR.TERMREASON = 13 THEN V_REASON_FOR_TERMINATION := 'PATWRK'; WHEN CR.TERMREASON = 14 THEN V_REASON_FOR_TERMINATION := 'LOSTEM'; WHEN CR.TERMREASON = 15 THEN V_REASON_FOR_TERMINATION := 'FLEDAB'; WHEN CR.TERMREASON = 16 THEN V_REASON_FOR_TERMINATION := 'FLEDWK'; WHEN CR.TERMREASON = 17 THEN V_REASON_FOR_TERMINATION := 'OFFINJ'; WHEN CR.TERMREASON = 18 THEN V_REASON_FOR_TERMINATION := 'OTHAGY'; ELSE V_REASON_FOR_TERMINATION := NULL; END CASE; --FLIGHT REASON CASE WHEN CR.FLI_REASON = 1 THEN V_REASON_FOR_FLIGHT := 'SUMMON'; WHEN CR.FLI_REASON = 2 THEN V_REASON_FOR_FLIGHT := 'DUIARR'; WHEN CR.FLI_REASON = 3 THEN V_REASON_FOR_FLIGHT := 'FELONY'; WHEN CR.FLI_REASON = 4 THEN V_REASON_FOR_FLIGHT := 'STOLEN'; WHEN CR.FLI_REASON = 5 THEN V_REASON_FOR_FLIGHT := 'MISDEM'; WHEN CR.FLI_REASON = 6 THEN V_REASON_FOR_FLIGHT := 'DRUGAR'; WHEN CR.FLI_REASON = 7 THEN V_REASON_FOR_FLIGHT := 'FEARPO'; WHEN CR.FLI_REASON = 8 THEN V_REASON_FOR_FLIGHT := 'NODVRL'; WHEN CR.FLI_REASON = 9 THEN V_REASON_FOR_FLIGHT := 'NOINSU'; WHEN CR.FLI_REASON = 10 THEN V_REASON_FOR_FLIGHT := 'PARENT'; WHEN CR.FLI_REASON = 11 THEN V_REASON_FOR_FLIGHT := 'MENTAL'; WHEN CR.FLI_REASON = 12 THEN V_REASON_FOR_FLIGHT := 'OTHERR'; ELSE V_REASON_FOR_FLIGHT := NULL; END CASE; --ACCIDENT CASE WHEN CR.ACCIDENT = 1 THEN V_ACCIDENT := 'Y'; WHEN CR.ACCIDENT = 2 THEN V_ACCIDENT := 'N'; ELSE V_ACCIDENT := NULL; END CASE; --ACCIDENT TYPE CASE WHEN CR.ACCDNTTYPE = 1 THEN V_ACCIDENT_TYPE := 'PROPERTY DAMAGE'; WHEN CR.ACCDNTTYPE = 2 THEN V_ACCIDENT_TYPE := 'INJURY'; WHEN CR.ACCDNTTYPE = 3 THEN V_ACCIDENT_TYPE := 'FATALITY'; ELSE V_ACCIDENT_TYPE := NULL; END CASE; --ACCIDENT PARTIES INVOLVED CASE WHEN CR.ACCPARTIES = 1 THEN V_ACCIDENT_PARTIES_INVOLVED := 'SUSPONLY'; WHEN CR.ACCPARTIES = 2 THEN V_ACCIDENT_PARTIES_INVOLVED := 'THRDONLY'; WHEN CR.ACCPARTIES = 3 THEN V_ACCIDENT_PARTIES_INVOLVED := 'POLIONLY'; WHEN CR.ACCPARTIES = 4 THEN V_ACCIDENT_PARTIES_INVOLVED := 'POLISUSP'; WHEN CR.ACCPARTIES = 5 THEN V_ACCIDENT_PARTIES_INVOLVED := 'POLITHRD'; WHEN CR.ACCPARTIES = 6 THEN V_ACCIDENT_PARTIES_INVOLVED := 'SUSPTHRD'; WHEN CR.ACCPARTIES = 7 THEN V_ACCIDENT_PARTIES_INVOLVED := 'ALLPARTY'; ELSE V_ACCIDENT_PARTIES_INVOLVED := NULL; END CASE; SELECT COUNT(*) INTO V_CASE_COUNT FROM PURSUITS.IMPORT_LEGACY_PURSUIT WHERE CASE_NUMBER = CR.LOCCASENUM; CASE WHEN V_CASE_COUNT = 0 THEN DBMS_OUTPUT.PUT_LINE ('DONE'); --INSERT DATA INTO TABLE INSERT INTO PURSUITS.IMPORT_LEGACY_PURSUIT( CASE_NUMBER, OFFICER_LNAME, OFFICER_FNAME, OFFICER_MI, OFFICER_NAME_HP261, OFFICER_RADIO, OFFICER_VEH_UNIT, OFFICER_TROOP, OFFICER_ZONE, OFFICER_YEARS_SERVICE, PURSUIT_TIME_BEGAN, PURSUIT_DATE, PURSUIT_DOW, PURSUIT_TIME_ENDED, DURATION_MILES, DURATION_MINUTES, SPEED_MAX, ROADWAY_TYPE, TRAFFIC_FLOW, REASON_FOR_INITIATION, REASON_FOR_INITIATION_OTHER, VEHICLE_MARKING, VEHICLE_LIGHTS_ON, VEHICLE_SIREN_ON, VEHICLE_COUNT_MARKED_TOPLIGHT, VEHICLE_COUNT_UNMARKED, VEHICLE_COUNT_MARKED_CLEAN, AIRCRAFT_AVAILABLE, AIRCRAFT_INVOLVED, OTHER_AGENCY_INVOLVED, OTHER_AGENCY_STATUS, OTHER_AGENCY_COUNT, SUSPECT_VEHICLE_TYPE, SUSPECT_VEHICLE_TYPE_OTHER, SUSPECT_AGE, SUSPECT_GENDER, SUSPECT_RACE, SUSPECT_ETHNICITY, SUSPECT_ID_KNOWN, SUSPECT_POSSESS_WEAPON, SUSPECT_DUI, SUSPECT_BAC, REASON_FOR_TERMINATION, REASON_FOR_FLIGHT, REASON_FOR_FLIGHT_OTHER, ACCIDENT, ACCIDENT_TYPE, ACCIDENT_PARTIES_INVOLVED, IMMEDIATE_SUPERVISOR, TROOP_COMMANDER) VALUES( CR.LOCASENUM, NULL, NULL, NULL, CR.N/A, CR.RADIO_NUM, CR.UNIT_NUM, CR.TROOP, CR.ZONE, CR.YRSSERVICE, CR.TIMEBEGAN, V_PURSUIT_DATE, CR.DAYOFWEEK, CR.TIME_ENDED, CR.MILES, CR.MINUTES, CR.MPH, V_ROADWAY_TYPE, V_TRAFFIC_FLOW, V_REASON_FOR_INITIATION, CR.OTHER1, V_VEHICLE_MARKING, V_VEHICLE_LIGHTS_ON, V_VEHICLE_SIREN_ON, CR.MARKED_TL, CR.UNMARKED, CR.MARKED_CR, V_AIRCRAFT_AVAILABLE, V_AIRCRAFT_INVOLVED, V_OTHER_AGENCY_INVOLVED, V_AGENCY_STATUS, CR.NUM_VEH, V_SUSPECT_VEHICLE_TYPE, CR.OTHER2, CR.AGE, CR.SEX, V_SUSPECT_RACE, CR.N/A, V_SUSPECT_ID_KNOWN, V_SUSPECT_POSSESS_WEAPON, CR.DUI, CR.BAC_PERCNT, V_REASON_FOR_TERMINATION, V_REASON_FOR_FLIGHT, CR.OTHER3, V_ACCIDENT, V_ACCIDENT_TYPE, V_ACCIDENT_PARTIES_INVOLVED, NULL, NULL); END LOOP; CLOSE DATA_CURSOR; END;
Deanna,
Question, I don't understand why you're selecting in import_legacy_pursuit and insertion in the same table?
It would be wonderful if you can display the structure of the table and 1 or 2 fictitious example of records.
cursor cr is SELECT * FROM import_legacy_pursuit; ... ... INSERT INTO import_legacy_pursuit ( case_number, officer_lname, .... .. ) values (..... ...);
In any case, I made some changes to the procedure, you must replace the Insert with your statement and post if it worked for you.
DECLARE CURSOR data_cursor IS SELECT * FROM import_legacy_pursuit; cr data_cursor%ROWTYPE; v_pursuit_date DATE; v_roadway_type VARCHAR2 (15); v_traffic_flow VARCHAR2 (18); v_reason_for_initiation VARCHAR2 (16); v_vehicle_marking VARCHAR2 (18); v_vehicle_lights_on VARCHAR2 (11); v_vehicle_siren_on VARCHAR2 (11); v_aircraft_available VARCHAR2 (11); v_aircraft_involved VARCHAR2 (11); v_other_agency_involved VARCHAR2 (11); v_other_agency_status VARCHAR2 (18); v_other_agency_count NUMBER (4, 0); v_suspect_vehicle_type VARCHAR2 (20); v_suspect_race VARCHAR2 (11); v_suspect_ethnicity VARCHAR2 (11); v_suspect_id_known VARCHAR2 (11); v_suspect_possess_weapon VARCHAR2 (11); v_reason_for_termination VARCHAR2 (11); v_reason_for_flight VARCHAR2 (11); v_accident VARCHAR2 (11); v_accident_type VARCHAR2 (18); v_accident_parties_involved VARCHAR2 (18); v_lo_number VARCHAR2 (50); v_case_count NUMBER; BEGIN OPEN data_cursor; LOOP FETCH data_cursor INTO cr; EXIT WHEN data_cursor%NOTFOUND; --PURSUIT DATE -- IF CR.PURSUIT_DATE = 0 THEN -- V_PURSUIT_DATE :=NULL; -- ELSE -- V_PURSUIT_DATE :=TO_DATE(CR.PURSUIT_DATE,CONCAT('MONTH'/'DAY'/'YEAR'); -- END IF; --ROADWAY TYPE CASE WHEN cr.roadway = 1 THEN v_roadway_type := 'URBAN'; WHEN cr.roadway = 2 THEN v_roadway_type := 'RURAL'; ELSE v_roadway_type := NULL; END CASE; --TRAFFIC FLOW CASE WHEN cr.trafficflo = 1 THEN v_traffic_flow := 'LIGHT'; WHEN cr.trafficflo = 2 THEN v_traffic_flow := 'MODERATE'; WHEN cr.trafficflo = 3 THEN v_traffic_flow := 'HIGH'; ELSE v_traffic_flow := NULL; END CASE; --INITIATION CODES CASE WHEN cr.initreason = 1 THEN v_reason_for_initiation := 'SUSACT'; WHEN cr.initreason = 2 THEN v_reason_for_initiation := 'TRAFVI'; WHEN cr.initreason = 3 THEN v_reason_for_initiation := 'MISCCR'; WHEN cr.initreason = 4 THEN v_reason_for_initiation := 'FELONY'; WHEN cr.initreason = 5 THEN v_reason_for_initiation := 'DUIARR'; WHEN cr.initreason = 6 THEN v_reason_for_initiation := 'NCICHT'; WHEN cr.initreason = 7 THEN v_reason_for_initiation := 'OTHERR'; ELSE v_reason_for_initiation := NULL; END CASE; --VEHICLE MARKING CASE WHEN cr.carmarks = 1 THEN v_vehicle_marking := 'MRKLIGHT'; WHEN cr.carmarks = 2 THEN v_vehicle_marking := 'MRKCLEAN'; WHEN cr.carmarks = 3 THEN v_vehicle_marking := 'UNMARKED'; ELSE v_vehicle_marking := NULL; END CASE; --LIGHTS CASE WHEN cr.lights_on = 1 THEN v_vehicle_lights_on := 'Y'; WHEN cr.lights_on = 2 THEN v_vehicle_lights_on := 'N'; ELSE v_vehicle_lights_on := NULL; END CASE; --SIREN CASE WHEN cr.siren_on = 1 THEN v_vehicle_siren_on := 'Y'; WHEN cr.siren_on = 2 THEN v_vehicle_siren_on := 'N'; ELSE v_vehicle_siren_on := NULL; END CASE; --AIRCRAFT AVAILABLE CASE WHEN cr.aircraftav = 1 THEN v_aircraft_available := 'Y'; WHEN cr.aircraftav = 2 THEN v_aircraft_available := 'N'; WHEN cr.aircraftav = 3 THEN v_aircraft_available := 'U'; ELSE v_aircraft_available := NULL; END CASE; --AIRCRAFT INVOLVED CASE WHEN cr.aircraftin = 1 THEN v_aircraft_involved := 'Y'; WHEN cr.aircraftin = 2 THEN v_aircraft_involved := 'N'; ELSE v_aircraft_involved := NULL; END CASE; --AGENCY INVOLVED CASE WHEN cr.othragency = 1 THEN v_other_agency_involved := 'Y'; WHEN cr.othragency = 2 THEN v_other_agency_involved := 'N'; ELSE v_other_agency_involved := NULL; END CASE; --AGENCY STATUS CASE WHEN cr.status = 1 THEN v_other_agency_status := 'INITIATE'; WHEN cr.status = 2 THEN v_other_agency_status := 'ASSISTED'; ELSE v_other_agency_status := NULL; END CASE; --SUSPECT VEHICLE TYPE CASE WHEN cr.vehicletyp = 1 THEN v_suspect_vehicle_type := 'SD'; WHEN cr.vehicletyp = 2 THEN v_suspect_vehicle_type := 'MC'; WHEN cr.vehicletyp = 3 THEN v_suspect_vehicle_type := 'VN'; WHEN cr.vehicletyp = 4 THEN v_suspect_vehicle_type := 'PK'; WHEN cr.vehicletyp = 5 THEN v_suspect_vehicle_type := 'DS'; WHEN cr.vehicletyp = 6 THEN v_suspect_vehicle_type := 'OT'; ELSE v_suspect_vehicle_type := NULL; END CASE; --SUSPECT RACE AND ETHNICITY IF cr.race = 'H' THEN v_suspect_race := 'W'; ELSE v_suspect_race := cr.race; END IF; --SUSPECT ETHNICITY IF cr.race = 'H' THEN v_suspect_ethnicity := 'H'; ELSE v_suspect_ethnicity := NULL; END IF; --SUSPECT ID CASE WHEN cr.id_known = 1 THEN v_suspect_id_known := 'Y'; WHEN cr.id_known = 2 THEN v_suspect_id_known := 'N'; ELSE v_suspect_id_known := NULL; END CASE; --SUSPECT WEAPON CASE WHEN cr.weapon = 1 THEN v_suspect_possess_weapon := 'Y'; WHEN cr.weapon = 2 THEN v_suspect_possess_weapon := 'N'; ELSE v_suspect_possess_weapon := NULL; END CASE; --TERMINATION REASON CASE WHEN cr.termreason = 1 THEN v_reason_for_termination := 'DVRVOL'; WHEN cr.termreason = 2 THEN v_reason_for_termination := 'ALATER'; WHEN cr.termreason = 3 THEN v_reason_for_termination := 'VEHDIS'; WHEN cr.termreason = 4 THEN v_reason_for_termination := 'VEHWRK'; WHEN cr.termreason = 5 THEN v_reason_for_termination := 'ROADBL'; WHEN cr.termreason = 6 THEN v_reason_for_termination := 'STOPST'; WHEN cr.termreason = 7 THEN v_reason_for_termination := 'RAMMED'; WHEN cr.termreason = 8 THEN v_reason_for_termination := 'WEAPON'; WHEN cr.termreason = 9 THEN v_reason_for_termination := 'DVRINJ'; WHEN cr.termreason = 10 THEN v_reason_for_termination := 'OFFTER'; WHEN cr.termreason = 11 THEN v_reason_for_termination := 'SUPTER'; WHEN cr.termreason = 12 THEN v_reason_for_termination := 'PATDIS'; WHEN cr.termreason = 13 THEN v_reason_for_termination := 'PATWRK'; WHEN cr.termreason = 14 THEN v_reason_for_termination := 'LOSTEM'; WHEN cr.termreason = 15 THEN v_reason_for_termination := 'FLEDAB'; WHEN cr.termreason = 16 THEN v_reason_for_termination := 'FLEDWK'; WHEN cr.termreason = 17 THEN v_reason_for_termination := 'OFFINJ'; WHEN cr.termreason = 18 THEN v_reason_for_termination := 'OTHAGY'; ELSE v_reason_for_termination := NULL; END CASE; --FLIGHT REASON CASE WHEN cr.fli_reason = 1 THEN v_reason_for_flight := 'SUMMON'; WHEN cr.fli_reason = 2 THEN v_reason_for_flight := 'DUIARR'; WHEN cr.fli_reason = 3 THEN v_reason_for_flight := 'FELONY'; WHEN cr.fli_reason = 4 THEN v_reason_for_flight := 'STOLEN'; WHEN cr.fli_reason = 5 THEN v_reason_for_flight := 'MISDEM'; WHEN cr.fli_reason = 6 THEN v_reason_for_flight := 'DRUGAR'; WHEN cr.fli_reason = 7 THEN v_reason_for_flight := 'FEARPO'; WHEN cr.fli_reason = 8 THEN v_reason_for_flight := 'NODVRL'; WHEN cr.fli_reason = 9 THEN v_reason_for_flight := 'NOINSU'; WHEN cr.fli_reason = 10 THEN v_reason_for_flight := 'PARENT'; WHEN cr.fli_reason = 11 THEN v_reason_for_flight := 'MENTAL'; WHEN cr.fli_reason = 12 THEN v_reason_for_flight := 'OTHERR'; ELSE v_reason_for_flight := NULL; END CASE; --ACCIDENT CASE WHEN cr.accident = 1 THEN v_accident := 'Y'; WHEN cr.accident = 2 THEN v_accident := 'N'; ELSE v_accident := NULL; END CASE; --ACCIDENT TYPE CASE WHEN cr.accdnttype = 1 THEN v_accident_type := 'PROPERTY DAMAGE'; WHEN cr.accdnttype = 2 THEN v_accident_type := 'INJURY'; WHEN cr.accdnttype = 3 THEN v_accident_type := 'FATALITY'; ELSE v_accident_type := NULL; END CASE; --ACCIDENT PARTIES INVOLVED CASE WHEN cr.accparties = 1 THEN v_accident_parties_involved := 'SUSPONLY'; WHEN cr.accparties = 2 THEN v_accident_parties_involved := 'THRDONLY'; WHEN cr.accparties = 3 THEN v_accident_parties_involved := 'POLIONLY'; WHEN cr.accparties = 4 THEN v_accident_parties_involved := 'POLISUSP'; WHEN cr.accparties = 5 THEN v_accident_parties_involved := 'POLITHRD'; WHEN cr.accparties = 6 THEN v_accident_parties_involved := 'SUSPTHRD'; WHEN cr.accparties = 7 THEN v_accident_parties_involved := 'ALLPARTY'; ELSE v_accident_parties_involved := NULL; END CASE; SELECT COUNT ( * ) INTO v_case_count FROM import_legacy_pursuit WHERE case_number = cr.loccasenum; IF v_case_count = 0 THEN DBMS_OUTPUT.put_line ('DONE'); -- PLEASE assign all cursor values to some variables ; e.g v_lo_number := cr.loccasenum; INSERT INTO import_legacy_pursuit ( case_number, fli_reason ) VALUES (v_lo_number, v_reason_for_flight); ELSE DBMS_OUTPUT.put_line ('Nothing inserted'); END IF; END LOOP; COMMIT; EXCEPTION WHEN OTHERS THEN ROLLBACK; DBMS_OUTPUT.put_line (SUBSTR (SQLERRM, 1, 300)); RAISE; END;
Concerning
Maybe you are looking for
-
iPhone 6 will not register in iTunes
My iphone 6 will not enroll in itunes. No doubt connects with the PC (Dell Inspiron 23 model 5348). Think that there is problem with the Apple driver. Can anyone help?
-
Firefox is my main browser. I have often to create and share spreadsheets Google Doc. All of a sudden, when I run one of my Google Docs, I can see the data but cannot make changes. Even an attempt to click a cell and type something (or change a forma
-
No matter if it's a video on YouTube or it's a video of youtube placed on another site, the result is the same: If the site does not use the secure protocol (https) video player do not appear yet. I searched for this issue and found that some people
-
Hello. I just got the Virtualbench and it has not evaluated with labview 2014. For my system, when it is to the current around 6uA, sleep. On the asset, it attracts around 12mA. A multimeter using normal, it could be measured Download the standard VI
-
Problem: Only tracks from the first album of my first artist will play
OK, I just got the Sport Clip MP3 player this Christmas... a 'red'... holds 4 GB.(1000 songs). I am trying to charge about 25% as many files as one. This post is about my SECOND problem with this device: So I have a group of music CD that I recently