Selecting data from a RDBMS table using connector framework, JDBC-Connector
Hi Experts,
I'm trying to select data from a mysql database that is connected via the BI-JDBC System in the portal (EP 7 SP 11).
The connection (using the Connector Gateway Service) is set up, but selecting data fails.
Can you please give me a code example how to select data from a table using INativeQuery or IOperation / IExcecution ?? IQuery is depracted...
Here my piece of code, actually method "connection.newNativeQuery()" throws exception "BICapabilityNotSupportedException: Operation is not supported":
IConnection connection = null;
public void connectToJDBCSystem(String jdbcSystem) {
// open a connection
try { // get the Connector Gateway Service
Object connectorservice =
PortalRuntime.getRuntimeResources().getService(IConnectorGatewayService.KEY);
IConnectorGatewayService cgService =
(IConnectorGatewayService) connectorservice;
if (cgService == null) {
response.write("Error in get Connector Gateway Service <br>");
try {
ConnectionProperties prop =
new ConnectionProperties(request.getLocale(), request.getUser());
connection = cgService.getConnection(jdbcSystem, prop);
} catch (Exception e) {
response.write("Connection to JDBC system " + jdbcSystem + " failed <br>");
response.write((String)e.getMessage() + "<br>");
e.printStackTrace();
if (connection == null) {
response.write("No connection to JDBC system " + jdbcSystem + "<br>");
} else {
response.write("Connection to JDBC system " + jdbcSystem + " successful <br>");
} catch (Exception e) {
response.write("Exception occurred <br>");
// up to this point it works fine...
// build query using an IExecution object obtained from the Connection object
response.write("prepare query 'SELECT idArt, art FROM art' <br>");
String qstr = "SELECT idArt, art FROM art";
INativeQuery query = null;
try {
query = connection.newNativeQuery();
response.write("execute query...<br>");
ResultSet rs = (ResultSet)query.execute(qstr);
while (rs.next()) {
response.write("<th>" + rs.getString(1) + "</th>");
} catch(Exception e)
response.write("connection.newNativeQuery() failed <br>");
response.write((String)e.getMessage() + "<br>");
e.printStackTrace();
} finally {
if( connection != null )
try {connection.close();}
catch(Exception ee){}
Many thanks in advance, Monika
Edited by: Monika Verwohlt on Jan 26, 2010 9:49 AM
However this doesn't affect the XML encoding in data retrieved from XMLType using PL/SQL or programs (but it does work OK for SQLPlus SELECT).When performing an explicit serialization, with getClobVal method or XMLSerialize function, the database character set is used :
NLS_LANG = FRENCH_FRANCE.WE8MSWIN1252
NLS_CHARACTERSET = AL32UTF8
SQL> select * from v$version;
BANNER
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for 32-bit Windows: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
SQL> create table test_nls of xmltype;
Table créée.
SQL> insert into test_nls values(xmltype('<?xml version="1.0" encoding="UTF-8"?><root/>'));
1 ligne créée.
SQL> select * from test_nls;
SYS_NC_ROWINFO$
<?xml version="1.0" encoding="WINDOWS-1252"?>
<root/>
SQL> select t.object_value.getclobval() from test_nls t;
T.OBJECT_VALUE.GETCLOBVAL()
<?xml version="1.0" encoding="UTF-8"?><root/>
SQL> select xmlserialize(document object_value as clob) from test_nls;
XMLSERIALIZE(DOCUMENTOBJECT_VALUEASCLOB)
<?xml version="1.0" encoding="UTF-8"?><root/>
Similar Messages
-
Hi Friends,
I am using Oracle 8.1.6 Server, & facing problems while retrieving data from a PL/SQL Table:
CREATE or REPLACE PROCEDURE test_proc IS
TYPE tP2 is TABLE of varchar2(10); --declared a collection
dt2 tP2 := tP2('a','b','c');
i NUMBER(8);
begin
SELECT COUNT(*) INTO i FROM TABLE(CAST(dt2 as tP2));
DBMS_OUTPUT.PUT_LINE('**'||i);
end;
While executing the above procedure, I encountered foll. error:
ERROR at line 1:
ORA-00600: internal error code, arguments: [15419], [severe error during PL/SQL execution], [], [],
ORA-06544: PL/SQL: internal error, arguments: [pfrrun.c:pfrbnd1()], [], [], [], [], [], [], []
ORA-06553: PLS-801: internal error [0]
Can anyone please help me, where the problem is??
Is it Possible to retrieve data from PL/SQL TABLE using SELECT statement? & How ?
Thanks in advance.
Best Regards,
Jay Raval.Thanks Roger for the Update.
It means that have to first CREATE TYPE .. TABLE in database then only I can fire a Select statement on that TYPE.
Actually I wanted to fire a Select statement on the TABLE TYPE, defined & declared in PLSQL stored procedure using DECLARE TYPE .. TABLE & not using CREATE TYPE .. TABLE.
I was eager to know this, because my organization is reluctant in using CREATE TYPE .. TABLE defined in the database, so I was looking out for another alternative to access PL/SQL TABLE using Select statement without defining it database. It would have been good if I could access a PLSQL TABLE using Select statement Declared locally in the stored procedure.
Can I summarize that to access a PL/SQL TABLE using SELECT statement, I have to first CREATE TYPE .. TABLE?
If someone have any other idea on this, please do let me know.
Thanks a lot for all help.
Best Regards,
Jay Raval.
You have to define a database type...
create type tP2 is table of varchar2(10)
CREATE OR REPLACE PROCEDURE TEST_PROC
IS
dt2 tP2 := tP2('a','b','c');
i NUMBER(8);
begin
SELECT COUNT(*) INTO i FROM TABLE(CAST (dt2 AS tP2));
DBMS_OUTPUT.PUT_LINE('**'||i);
end;
This will work.
Roger -
Select Data from 2 intern tables
Hi Experts,
how I can select Data from 2 intern Tables into another intern table?
For Example:
My Result Table has the fields: mandt, user, ID, ID_Name.
My select table no. 1 has the fields mandt, XYZ (like A_Name), ID, ID_Name, ...
My select table no. 2 has the fields mandt, A_Name, User, ...
I want to search for all entries in select table no. 1 and 2. where are a_name have the same worth.
How I can select my Dates?
Regards,
Mikehii
you can do it by using for all entries and with READ statement ..do like follow code
IF i_marc[] IS NOT INITIAL.
SELECT matnr " Material Number
werks " Plants
lgort " Storage Location
FROM mard
INTO TABLE i_mard
FOR ALL ENTRIES IN i_marc
WHERE matnr EQ i_marc-matnr
AND werks EQ i_marc-werks
AND lgort IN s_lgort.
ENDIF. " IF i_mara[] IS NOT INITIAL
IF sy-subrc EQ 0.
LOOP AT i_output INTO wa_output.
READ TABLE i_mard INTO wa_mard WITH KEY matnr = wa_output-matnr.
wa_output-lgort = wa_mard-lgort.
MODIFY i_output FROM wa_output.
CLEAR wa_output.
ENDLOOP. " LOOP AT i_output
ENDIF. " IF sy-subrc EQ 0
regards
twinkal -
How to select data from one nested table and into another nested table
create or replace
TYPE ctxt_code_rec as object
ctxt_header varchar2(10),
header_description varchar2(300),
status varchar2(30),
adjacent_code varchar2(300),
adjacent_desc Varchar2(400),
adjacent_flag varchar2(4000),
adjacent_text_href varchar2(4000)
create or replace
type ctxt_code_table as table of CTXT_CODE_REC
d_table ctxt_code_table ;
v_tab ctxt_code_table ;
Iam trying to select data from d_table to v_tab
using and bulk collect into
select m.*
bulk collect into p_code_result
from table(l_loop_diag_code_table1)m
order by 1;
Receiving error:
ora 94007 : not enoughvalues
Could you please let me know how to solve it?
Thanks,
in advance>
create or replace
TYPE ctxt_code_rec as object
ctxt_header varchar2(10),
header_description varchar2(300),
status varchar2(30),
adjacent_code varchar2(300),
adjacent_desc Varchar2(400),
adjacent_flag varchar2(4000),
adjacent_text_href varchar2(4000)
create or replace
type ctxt_code_table as table of CTXT_CODE_REC
d_table ctxt_code_table ;
v_tab ctxt_code_table ;
Iam trying to select data from d_table to v_tab
using and bulk collect into
select m.*
bulk collect into p_code_result
from table(l_loop_diag_code_table1)m
order by 1;
Receiving error:
ora 94007 : not enoughvalues
Could you please let me know how to solve it?
>
Not unless you provide the code you are actually using.
There is no definition of 'p_code_result' in your post and you say you 'trying to select data from d_table' but there is no code that loads 'd_table' in what you posted.
And the SELECT query you posted actuall selects from an object named 'l_loop_idag_code_table1' which isn't mentioned in your code.
Post the actual code you are using and all of the structures being used.
Also explain why you even need to use nested tables and PL/SQL for whatever it is you are really doing. -
Select data from all the table names in the view
Hi,
"I have some tables with names T_SRI_MMYYYY in my database.
I created a view ,Say "Summary_View" for all the table names
with "T_SRI_%".
Now i want to select data from all the tables in the view
Summary_View.
How can i do that ? Please throw some light on the same?
Thanks and Regards
Srinivas CheboluSrinivas,
There are a couple of things that I am unsure of here.
Firstly, does your view definition say something like ...
Select ...
From "T_SRI_%"
If so, it is not valid. Oracle won't allow this.
The second thing is that your naming convention for the
tables suggests to me that each table is the same except
that they store data for different time periods. This would be
a very bad design methodology. You should have a single
table with an extra column to state what period is referred to,
although you can partition it into segments for each period if
appropriate.
Apologies if i am misinterpreting your question, but perhaps
you could post your view definition and table definitions
here. -
How to select data from an internal table
material norm date last modified
B2-SP HEAT 50.000 20090420
BF COKE 575.000 20090419
GROSS COKE 200.000 20090419
B2-SP HEAT 100.000 20090419
TWT 33.000 20090330
B7-SP HEAT 2.000 20090310
B1-SP HEAT 1.000 20090309
B7-SP HEAT 615.000 20090308
B2-SP HEAT 585.000 20090308
B1-SP HEAT 100.000 20090308
B3-SP HEAT 610.000 20090308
BF COKE 68.500 20090308
GROSS COKE 72.600 20090308
B8-SP HEAT 600.000 20090308
B9-SP HEAT 625.000 20090308
BX-SP HEAT 615.000 20090308
B9-SP HEAT 58.000 20090307
B1-SP HEAT 100.000 20090307
B6-SP HEAT 350.000 20090306
B2-SP HEAT 888.000 20090306
Like above there r numerous data in a table :
how will i select data into another internal table where material above is not repeated with latest modified date.please help.Hi Sonu,
The main task is to move the contents of the one internal table to another with some condition.
First sort and delete the duplicate entries from the First Internal table like below :
sort it_tab by material ascending date_modified descending.
delete adjacent duplicates from it_tab.
Then move that Internal table contents to another internal table.
Define another internal table with the same structure as you have first internal table and then
Second Step :
it_itab1 = it_itab.
If you are using seperate Header line and Body then you can do like below :
it_itab1[] = it_itab[].
This will fix the issue.
Please let me know if you need any further explonation.
Regards,
Kittu
Edited by: Kittu on Apr 24, 2009 12:21 PM -
Selecting data from two different tables.
Do we need to use join two tables with primary/foreign key while trying to use select statement for getting data from those to table.? If no who can i go about do it.
872959 wrote:
If i am using From clause to get data from two different tables, is it necessary that both tables have column of identical data in them.In general, they ought to (or you need to join in a third table that tells you how to map rows from one table to rows of the other table).
It is not strictly necessary that there be any join condition between tables. If you don't provide a join condition, Oracle has to do a Cartesian product. That means that if there are n rows in one table and m rows in the other, the result set will have n * m rows. It is very rarely a good idea to write queries that do Cartesian products but it does occasionally happen.
Justin -
How to fetch data from single database table using 2 internal tables.
Hi friends,
i am a new user of ABAP and also SDN.
i need a help.
i want to fetch data from one database table based on primary keys of 2 internal tables. how to put in where clause.
Thanks in advance.hii
refer to following code ..i hope it will help you
SELECT matnr " Material Number
FROM mara
INTO TABLE i_mara
WHERE matnr IN s_matnr.
IF i_mara[] IS NOT INITIAL.
SELECT matnr " Material Number
werks " Plants
prctr " Profit Center
FROM marc
INTO TABLE i_marc
FOR ALL ENTRIES IN i_mara
WHERE matnr = i_mara-matnr
AND werks IN s_werks.
ENDIF. " IF i_mara[] IS NOT INITIAL
i_output = i_marc.
IF i_marc[] IS NOT INITIAL.
SELECT matnr " Material Number
werks " Plants
lgort " Storage Location
FROM mard
INTO TABLE i_mard
FOR ALL ENTRIES IN i_marc
WHERE matnr EQ i_marc-matnr
AND werks EQ i_marc-werks
AND lgort IN s_lgort.
ENDIF. " IF i_mara[] IS NOT INITIAL
regards
twinkal -
Select records from MS Access tables using multiple conditions
Hi,
I am trying to build s select list of team names for a
sporting club website. The select list should include teams if the
currently logged in user is a coach, team manager, assistant coach,
player or a parent of a player.
When I have only one group of conditions in the where clause
it works fine. But that only accounts for one of the above roles.
As soon as I ad an OR and another set of criteria my CF7 server's
swsoc.exe goes into an permanent loop (well, at least 10 minutes, I
reboot after that :-)
For example, this works fine ...
<!--- select teams I coach, assistant coach, manage, am a
parent of a player, or am a player --->
<cfquery name="teams"
Datasource="#Application.Datasource#">
SELECT distinct teams.uid_team, team_name, uid_coach,
uid_team_manager, uid_coordinator, team_asst
from teams, player_agegroups, players
where
(player_agegroups.uid_team=teams.uid_team and
players.uid_user=player_agegroups.uid_user
and teams.uid_season=#session.season# and
players.uid_invoice_to=#session.userid#)
Order by team_name
</cfquery>
But as soon as I add another condition cf7 goes into a
loop...
<!--- select teams I coach, assistant coach, manage, am a
parent of a player, or am a player --->
<cfquery name="teams"
Datasource="#Application.Datasource#">
SELECT distinct teams.uid_team, team_name, uid_coach,
uid_team_manager, uid_coordinator, team_asst
from teams, player_agegroups, players
where
(player_agegroups.uid_team=teams.uid_team and
players.uid_user=player_agegroups.uid_user
and teams.uid_season=#session.season# and
players.uid_invoice_to=#session.userid#) or
(player_agegroups.uid_team=teams.uid_team and
players.uid_user=player_agegroups.uid_user
and teams.uid_season=#session.season# and
players.uid_user=#session.userid#) or
(player_agegroups.uid_team=teams.uid_team and
players.uid_user=player_agegroups.uid_user
and teams.uid_season=#session.season# and
teams_uid_coach=#session.userid#) or
(player_agegroups.uid_team=teams.uid_team and
players.uid_user=player_agegroups.uid_user
and teams.uid_season=#session.season# and
teams.team_asst=#session.userid#) or
(player_agegroups.uid_team=teams.uid_team and
players.uid_user=player_agegroups.uid_user
and teams.uid_season=#session.season# and
teams.uid_team_manager=#session.userid#)
Order by team_name
</cfquery>
Any combination hangs CF7, whether it be two, three or all
conditions, and any combination of conditions..
The teams table stores team name, coach, team manager,
assistant coach and coordinator. Players table stores the player
records, and the parent (uid_invoice_to), is part of the player
record. player agegroups has the teams, with a record for each
player in a team. The whole system is based around seasons, hence
the #session.season# variable.
What should happen is I get a very short list of teams. When
I select a team from the select list I then go and grab all the
player records from the player_agegroups table joined to the users
table to get their names, date of birth etc...
Can anyone see what I am doing wrong?
thanks
TanyaYou might try to change your query using a SQL JOIN command,
so you can link the appropriate tables independently from the WHERE
selection criteria. You could use Access to create the query and
then go to the SQL command view to get the correct synyax. -
How to retrieve data from a DB table USING BPEL.
hi ,
suppose i have a table XXLOANS in DB so i want to retrive data from db table,so for that i created a DB connection on BPEL and then a DB adapter and then through a INVOKE process i attached with that adapter and then assinging two ASSIGN.
but i am not getting the output.
can any body help me regarding this.
can any body guide me by STEP BY STEP procedure,i think i am doing some thing wrong in ASSIGN.
Thanks,
PrakashHey hi..
create a partner link with a db adapter..
write a query what you want from the table.
create a invoke process and just create one assign activity where you can assign the output of the invoke activity into any variable of your choice..and the required datas from the table may be fetched into the variable ..this is db read functionality..
thanks -
How to read the hierarchy data from the same table using loop in AMDP method
Hi All,
We have a requirement to get the top partner from BUT050 table.
Here the Top parent is nothing but the top most in the hierarchy of the partners from BUT050.
Example:
For partner 1234 (BUT050-PARTNER1) there is partner 3523(BUT050-PARTNER2) one level above
For partner 3523(BUT050-PARTNER1) there is partner 4544 (BUT050-PARTNER2) last level .
so in this case for the partner 1234 the Top parent is 4544 .
I have created AMDP Procedure method to get the top-parnet and below given is the logic implemented in AMDP method.
Here i have implemented a recursive logic with the WHILE loop to get the top most hierarchy partner from the same table BUT050
IV_Parent is the input partner and ev_top_parent is the output value.
AMDP Procedure Method:
DECLARE lv_date VARCHAR(8) := TO_VARCHAR (current_date, 'YYYYMMDD');
DECLARE found INT := 1;
iv_partner1 = SELECT partner1 FROM but050
WHERE partner2 = iv_partner
AND reltyp = :iv_hierarchy
AND date_to >= :lv_date
AND date_from <= :lv_date;
WHILE found <> 0 do
select partner1 into ev_top_parent from :iv_partner1;
iv_partner1 = SELECT partner1 FROM but050
WHERE partner2 in ( select partner1 from :iv_partner1 where partner1 is not null)
AND reltyp = 'ZBP004'
AND date_to >= :lv_date
AND date_from <= :lv_date;
select COUNT ( partner1 ) INTO found FROM :IV_PARTNER1;
END WHILE;
This method is working fine, but here it is only taking one single partner and getting the top parent as output.
Now i would like to convert this mehtod so as to accept n number of partners (not one single partner) as input and should process each partner to get the top parent.
Could anyone guide me how can i handle the given AMDP method further so as to work some how it is within another loop from other AMDP method.
Thanks.
Regards,
Laxman.PHi
Go to SE11 and enter the hierarchy table name.
/BIC/H....(infoobject name)...and execute the table and select table entry and delete all....
Thanks
TG -
How to retrieve the data from MDM hierarchy table using MDM Java API
Hi,
I had a hierarchy table in MDM. This table had some column say x. I want to retrieve the values of this x column and need to show them in a drop down using MDM Java API.
Can anyone help me to solve this?
Regards
VallabhaneniHi,
Here is your code...
TableId Hier_TId = repository_schema.getTableId(<hierarchy table id>);
java.util.List list = new ArrayList();
ResultDefinition Supporting_result_dfn = null;
FieldProperties[] Hier_Field_props =rep_schema.getTableSchema(Hier_TId).getFields();
LookupFieldProperties lookup_field = null;
TableSchema lookupTableSchema = null;
FieldId[] lookupFieldIDs = null;
for (int i = 0, j = Hier_Field_props.length; i < j; i++) {
if (Hier_Field_props<i>.isLookup()) {
lookup_field = (LookupFieldProperties) Hier_Field_props<i>;
lookupTableSchema =repository_schema.getTableSchema(lookup_field.getLookupTableId());
lookupFieldIDs = lookupTableSchema.getFieldIds();
Supporting_result_dfn = new ResultDefinition(lookup_field.getLookupTableId());
Supporting_result_dfn.setSelectFields(lookupFieldIDs);
list.add(Supporting_result_dfn);
com.sap.mdm.search.Search hier_search =new com.sap.mdm.search.Search(Hier_TId);
ResultDefinition Hier_Resultdfn = new ResultDefinition(Hier_TId);
Hier_Resultdfn.setSelectFields(rep_schema.getTableSchema(Hier_TId).getDisplayFieldIds());
ResultDefinition[] supportingResultDefinitions =
(ResultDefinition[])list.toArray(new ResultDefinition [ list.size() ]);
RetrieveLimitedHierTreeCommand retrieve_Hier_tree_cmd =
new RetrieveLimitedHierTreeCommand(conn_acc);
retrieve_Hier_tree_cmd.setResultDefinition(Hier_Resultdfn);
retrieve_Hier_tree_cmd.setSession(Auth_User_session_cmd.getSession());
retrieve_Hier_tree_cmd.setSearch(hier_search);
retrieve_Hier_tree_cmd.setSupportingResultDefinitions(supportingResultDefinitions);
try {
retrieve_Hier_tree_cmd.execute();
} catch (CommandException e5) {
// TODO Auto-generated catch block
e5.printStackTrace();
HierNode Hier_Node = retrieve_Hier_tree_cmd.getTree();
print(Hier_Node,1);
//method print()
static private void print(HierNode node, int level) {
if (!node.isRoot()) {
for (int i = 0, j = level; i < j; i++) {
System.out.print("\t");
System.out.println(node.getDisplayValue());
HierNode[] children = node.getChildren();
if (children != null) {
level++;
for (int i = 0, j = children.length; i < j; i++) {
print(children<i>, level);
//end method print()
Best regards,
Arun prabhu S
Edited by: Arun Prabhu Sivakumar on Jul 7, 2008 12:19 PM -
Select data from database tables with high performance
hi all,
how to select data from different database tables with high performance.
im using for all entries instead of inner joins, even though burden on data base tables is going very high ( 90 % in se30)
hw to increase the performance.
kindly, reply.
thnksAlso Check you are not using open sql much like distict order by group by , use abap techniques on internal table to acive the same.
also Dont use select endselect.
if possible use up to n rows claus....
taht will limit the data base hits.
also dont run select in siode any loops.
i guess these are some of the trics oyu can use to avoid frequent DATA BASE HITS AND ABVOID THE DATA BASE LAOD. -
Selecting datas from tables where tbale name is store in a row
Hi
I need to select datas from several different table (QE01, QE02, QE06, QEXXetc.).
The code of the tables I need to select from is store in another table.
Here's an example:
In the table JOURNAL, I have several entries:
01
06
21
31
These are the codes of the tables I need to select datas from:
QE01
QE06
QE21
QE31
I can't use variables in here, how could that be done ?Hi,
This should not be a question on how to query data, but rather on how to store them.
You did not mention any version, but I suggest you read about partitioning,
http://download.oracle.com/docs/cd/E11882_01/server.112/e25789/schemaob.htm#CNCPT112
Could be that especially exchange partition is interesting.
My guess is that these tables are created on the fly as part of data loads?
If so, complete that ETL process by exchanging the just loaded data into a partioned table. And your problem of what to query has disappeared.
Regards
Peter -
Selecting data from external table
Hi there
I was wondering if somebody could assist me. When I try to select data from an external table, no data is displayed, and in my log file I receive the following error:
KUP-04026: field too long for datatype. Please find attached my external table script.
CREATE TABLE DEMO_FILE_EXT
MACODE NUMBER(7),
MANO NUMBER(7),
DEPNO VARCHAR2(2 BYTE),
DEPTYPE NUMBER(5),
STARTDATE NUMBER(8),
ENDDATE NUMBER(8),
OPTIONSTART NUMBER(8),
BENEFITSTART NUMBER(8),
STARTSUSPEND NUMBER(8),
ENDSUSPEND NUMBER(8),
INITIALS VARCHAR2(5 BYTE),
FIRSTNAME VARCHAR2(20 BYTE),
SURNAME VARCHAR2(25 BYTE),
STR1 VARCHAR2(30 BYTE),
STR2 VARCHAR2(30 BYTE),
STR3 VARCHAR2(30 BYTE),
STR4 VARCHAR2(30 BYTE),
SCODE VARCHAR2(6 BYTE),
POS1 VARCHAR2(30 BYTE),
POS2 VARCHAR2(30 BYTE),
POS3 VARCHAR2(30 BYTE),
POS4 VARCHAR2(30 BYTE),
PCODE VARCHAR2(6 BYTE),
TELH VARCHAR2(10 BYTE),
TELW VARCHAR2(10 BYTE),
TELC VARCHAR2(10 BYTE),
IDNUMBER VARCHAR2(13 BYTE),
DOB NUMBER(8),
GENDER VARCHAR2(1 BYTE),
EMPLOYER_CODE VARCHAR2(10 BYTE),
EMPLOYER_NAME VARCHAR2(900 BYTE)
ORGANIZATION EXTERNAL
( TYPE ORACLE_LOADER
DEFAULT DIRECTORY DEMO_FILES
ACCESS PARAMETERS
( RECORDS DELIMITED BY newline
BADFILE 'Tinusb.txt'
DISCARDFILE 'Tinusd.txt'
LOGFILE 'Tinusl.txt'
SKIP 1
FIELDS TERMINATED BY '|'
MISSING FIELD VALUES ARE NULL
(MACODE,
MANO,
DEPNO,
DEPTYPE,
STARTDATE,
ENDDATE,
OPTIONSTART,
BENEFITSTART,
STARTSUSPEND,
ENDSUSPEND,
INITIALS,
FIRSTNAME,
SURNAME,
STR1,
STR2,
STR3,
STR4,
SCODE,
POS1,
POS2,
POS3,
POS4,
PCODE,
TELH,
TELW,
TELC,
IDNUMBER,
DOB,
GENDER,
EMPLOYER_CODE,
EMPLOYER_NAME
LOCATION (DEMO_FILES:'Test1.txt')
REJECT LIMIT UNLIMITED
LOGGING
NOCACHE
NOPARALLEL;
I have the correct privileges on the directory, but the error seems to be on the EMPLOYER_NAME field. The file I try to upload is in pipe-delimited format. The last field in the file does not have a pipe-delimiter at the end. Can this be the problem? Must I go and look for any trailing spaces? Can I specify in the external table script how many characters I need for the employer_name field? We receive this file from an external company
Thank you very much for the help
Ferdiecommon mistake, you gave the field sizes in the
column listing of the table, but not in the file
definition. oracle does not apply one to the other.
in the file defintion section, give explict field
sizes.Hi shoblock
Sorry for only coming back to you now, thank you for your help, I had to give the explicit field size for the last column (employer name).
Thank you once again!!
Ferdie
Maybe you are looking for
-
IE 9 - can't sign in to ebay (every other site works fine, as before)
I can't sign in to ebay from my main computer; I can get to the main ebay website (www.ebay.com) and I can get to sign-in page, but when I enter my user ID and password, ebay displays an error page and returns immediately to the sign-in page. The err
-
When you open garageband it comes up with usually a list of what you want to do new music project new podcast and so on. For some reason it wont let me click any of those icons listed. I cant even click the help sign. Well then i tried to click new u
-
Need help in converting string to numeric array
I am trying to convert a string to a numeric array ... the first # in the string gets cut off, the last three seem to come through. This may be fairly simple, but I really haven't worked with the string functions all that much. Help would be appreci
-
IDSC3 Print Booklet Troubles (need help with Teus's rotatepages.js script)
Hi all, I've been reading the original Nov '05 thread on this (http://www.adobeforums.com/webx/.3bbd4bb6/17) but I'm having trouble with the script provided. Very briefly, I'm trying to make a 16-page catalog on letter-sized paper, using half-size 8.
-
I want to write a decent multi-media player in Java so I can run it on both Linux and Windows. As of yet however, I have not come across any support in Java for the mp3 format. It supports .au and .wav files, but I have yet to see mp3 support. Does a