Sqlldr - 6digit date value
i have the problem that i have to load 6 byte date values (yymmdd) into a date-field.
i there any possibility to specify which years are in 20th century an which ones are in 21st century.
sorry - but my english is not the best.
thanks for help
bernhard ehemoser
The The RR Date Format Element may be able to help. Of course the best way to specify the century would be to provide it as part of the date with the extra YY to begin with.
Similar Messages
-
Hi All.
I have a control file which i need to add a column with header data value.
example
data file:
123456;201303
santiago;producto1;100
santiago;producto2;200
valparais;producto1;400
valparais;producto3;900
The control file skip the first column and load the three columns on the table, but, now i need to add other column with 201303 value constant of the first record and load it on the table.
Then
select * from table:
santiago producto1 100 201303
santiago producto2 200 201303
valparais producto1 400 201303
valparais producto3 900 201303
How i do this in the control file?
Regards!SCOTT@orcl_11gR2> host type test.dat
123456;201303
santiago;producto1;100
santiago;producto2;200
valparais;producto1;400
valparais;producto3;900
SCOTT@orcl_11gR2> host type test1.ctl
options (load=1)
load data
infile test.dat
replace
into table onecol_onerow
fields terminated by ';'
trailing nullcols
(filler1 filler, newcol)
SCOTT@orcl_11gR2> host type test2.ctl
options (skip=1)
load data
infile test.dat
append
into table test_tab
fields terminated by ';'
trailing nullcols
(col1, col2, col3,
newcol expression "(select newcol from onecol_onerow)")
SCOTT@orcl_11gR2> create table onecol_onerow
2 (newcol number)
3 /
Table created.
SCOTT@orcl_11gR2> create table test_tab
2 (col1 varchar2(15),
3 col2 varchar2(15),
4 col3 number,
5 newcol number)
6 /
Table created.
SCOTT@orcl_11gR2> host sqlldr scott/tiger control=test1.ctl log=test1.log
SQL*Loader: Release 11.2.0.1.0 - Production on Mon May 6 10:46:44 2013
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Commit point reached - logical record count 1
SCOTT@orcl_11gR2> select * from onecol_onerow
2 /
NEWCOL
201303
1 row selected.
SCOTT@orcl_11gR2> host sqlldr scott/tiger control=test2.ctl log=test2.log
SQL*Loader: Release 11.2.0.1.0 - Production on Mon May 6 10:46:45 2013
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Commit point reached - logical record count 4
SCOTT@orcl_11gR2> select * from test_tab
2 /
COL1 COL2 COL3 NEWCOL
santiago producto1 100 201303
santiago producto2 200 201303
valparais producto1 400 201303
valparais producto3 900 201303
4 rows selected. -
Error While trying to Convert a Date Value to string in POI API (Excel)
Hi
How can I convet a date value in excel to string value ? I am using POI API for excel sheet reading in JSP .Hello Esther,
the problem seems to be that the temp folder of the target Integration Builder system can't be found:
'The system cannot find the path specified
at [..] FileAccess.getTempDirectory([..])'.
You'll experience the same problem if you try a file based import or export within the Integration Builder directly.
I would recommend to continue the search there. You could check if the environment variables (for Windows: TEMP and TMP) of the OS of the system with the target Integration Builder to an existing path. Check also if the WebAs can access this path.
Good luck
Frank -
Error while saving date value in Java dictionary
Hello Everybody,
I got following error while saving date value in one of the fields of the Java table.
Internal error occured in submit request: Error in method updateRequestContact : The object of type java.sql.Date with the value '2005-12-04 08:00:00.0' assigned to host variable 9 is not normalized. It must not contain time components in the time zone running the virtual machine.
I can't find why it is taking time value in the date object.
This value is coming from the RFC as a date value, and I am saving this value in Java dictionary table.
Same code for this was working fine earlier. But, now suddenly it gives error like this.
Even if I provide date on the screen from webdynpro application, this date value can't save in the Java dictionary and gives same error.
What should be the problem behind this?
Regards,
BhavikHi Satyajit,
I am getting date value from the screen of the webdynpro application from date picker control and passing this value in Java dictionary.
More Information:
I have dat value in the Date object: <b>target_date</b>
But Now I have made new Date object as following:
Date target_Date1 = new Date(target_date.getYear(),target_date.getMonth(),target_date.getDate());
Then I am passing this object to Java dictionary. Still it gives same error.
Then I have changed code as following:
int l_year;
int l_month;
int l_days;
l_year = target_Date.getYear();
l_month = target_Date.getMonth();
l_days = target_Date.getDate();
Date target_Date1 = new Date(l_year,l_month,l_days);
Now it works for me.
But I guess this is not the perment solution. It looks very strange. I have used so many date objects at various palces. So, this solution is not the final for me.
I want to findout the main cause of it.
One more thing: This code was working for a mornth or two. But, now suddenly it is giving this error.
Please help me if anybody knows.
Regards,
Bhavik -
Load Rule validates, yet no data values modified
The load rule worked on a server running an NT operating system with essbase version 6.1.3. I rebuilt the application on a server running W2k with an essbase version 6.1.6. The load rule validates on the new server. The load looks as if it is loading correctly. When I check out the log file, it shows a warning number 1003035 with a message stating "No data values modified by load of this data file." Any ideas??? Creating a new load rule from scratch did not work. My next plan of attack is to check out the actual txt file to see if anything looks odd.
Have you got any record select or record reject statements in your rules?
-
Calculating Life to date values
Hi there,
the users are looking to get life to data values for service order. We can do this in the query (on the front end) but the performance takes a big hit due to the volume of records that are retrieved. So we are looking to build this calculation on the backend. Has anyone here done something similar and could share their experience on this? To repeat, the users would like to see the life-to-date value and this will contain any amounts that have been posted to this object. I was thinking about using a standard dso for this solution and use the amounts related cubes as source for this dso. The key figures (or data fields) in the dso would be incremented from the delta loads from the underlying cubes.
Thanks for sharing your thoughts or experience handling this issue.If I am getting you correctly, you are getting the following output(sample) where you are getting few additional orders for which cost$ is zero but we have &cost(life to date value) like 10002563 .
Order# Fiscal period $costs $costs (life-to-date)
10001111 001.2012 5,000 50,000
10001111 002.2012 5,000 50,000
10001112 001.2012 6,000 30,000
10001112 002.2012 7,000 30,000
10001112 003.2012 7,000 30,000
10001113 003.2012 5,000 10,000
10002563 001.2012 0 5000
If this is the issue then you can put a condition on cost& Key figure to be not equal to zero.It would solve the issue.
I would request you to provide us the sample output with both the correct and incorrect orders so that we can further understand the issue. -
How to fetch year till date value for earning for current ,last and year
hi,
how to fetch year till date value for earning for current ,last and year before that from payroll result
plz reply soon,
pratyushDear Pratyush,
Pick this from CRT.
Use LDB PNPCE & Fire event GET PAYROLL &
then you can pick from CRT.
Hope this helps.
Kindly reward in case useful.
Regards & Thanks,
Darshan Mulmule -
ALV Report how to display from and to date values in the header.
I develoeped alv report . i want to display selection screen from and to date values in top of page...
any sample code pls guide me..You have to do many things...
first find the selection details using the FM.
RS_REFRESH_FROM_SELECTOPTIONS
use the Blog to Align/populate the Header from the selection table
/people/community.user/blog/2007/05/07/alignment-of-data-in-top-of-page-in-alv-grid -
Date Picker Doesn't Like Retrieved or Typed In Date Values
I have more than one Region on a page, so I retrieve the column values for a region this way:
(On LOad, Before Header, Once per Page Visit)
BEGIN
EXECUTE IMMEDIATE 'ALTER SESSION SET NLS_DATE_FORMAT='''||:pick_date_format_mask||'''';
FOR request_rec IN (SELECT dev_requested_ind,
dev_requested_dttm,
dev_analyst_seq,
dev_completed_ind,
dev_completed_dttm,
dev_dba_seq,
sit_requested_ind,
sit_requested_dttm,
sit_analyst_seq,
sit_completed_ind,
sit_completed_dttm,
sit_dba_seq,
uat_requested_ind,
uat_requested_dttm,
uat_analyst_seq,
uat_completed_ind,
uat_completed_dttm,
uat_dba_seq,
prd_requested_ind,
prd_requested_dttm,
prd_analyst_seq,
prd_completed_ind,
prd_completed_dttm
FROM request_tbl
WHERE request_seq = :p16_request_seq)
LOOP
:p16_dev_requested_ind := request_rec.dev_requested_ind;
:p16_dev_requested_dttm := request_rec.dev_requested_dttm;
:p16_dev_analyst_seq := request_rec.dev_analyst_seq;
:p16_dev_completed_ind := request_rec.dev_completed_ind;
:p16_dev_completed_dttm := request_rec.dev_completed_dttm;
:p16_dev_dba_seq := request_rec.dev_dba_seq;
:p16_sit_requested_ind := request_rec.sit_requested_ind;
:p16_sit_requested_dttm := request_rec.sit_requested_dttm;
:p16_sit_analyst_seq := request_rec.sit_analyst_seq;
:p16_sit_completed_ind := request_rec.sit_completed_ind;
:p16_sit_completed_dttm := request_rec.sit_completed_dttm;
:p16_sit_dba_seq := request_rec.sit_dba_seq;
:p16_uat_requested_ind := request_rec.uat_requested_ind;
:p16_uat_requested_dttm := request_rec.uat_requested_dttm;
:p16_uat_analyst_seq := request_rec.uat_analyst_seq;
:p16_uat_completed_ind := request_rec.uat_completed_ind;
:p16_uat_completed_dttm := request_rec.uat_completed_dttm;
:p16_uat_dba_seq := request_rec.uat_dba_seq;
:p16_prd_requested_ind := request_rec.prd_requested_ind;
:p16_prd_requested_dttm := request_rec.prd_requested_dttm;
:p16_prd_analyst_seq := request_rec.prd_analyst_seq;
:p16_prd_completed_ind := request_rec.prd_completed_ind;
:p16_prd_completed_dttm := request_rec.prd_completed_dttm;
END LOOP;
END;
p16_dev_requested_dttm is defined as a Date Picker (use application format mask)
The data source is a Date column called dev_requested_dttm. I haven't defined a format mask for it. (I have tried using &PICK_DATE_FORMAT_MASK..)
The Application Format Mask is defined as a Subsitution String called
PICK_DATE_FORMAT_MASK
with a value of
MM/DD/YYYY HH:MI AM
The retrieved column value for p16_dev_requested_dttm looks fine, but when I click the date picker pushbutton, I get this message:
Not Found
The requested URL /pls/htmldb/wwv_flow_utilities.show_as_popup_calendar was not found on this server.
Oracle-Application-Server-10g/10.1.2.0.0 Oracle-HTTP-Server Server at edwdev.dhhs.state.nh.us Port 7779
I also get a line in my log file,
/vg02lvol1/app/oracle/product/htmldb/Apache/Apache/logs/error_log.1133956800:
[Wed Dec 7 16:23:43 2005] [error] [client 172.16.252.76] [ecid: 1133990623:172.17.96.35:1802:0:9870,0] mod_plsql: /pls/htmldb/wwv_flow_util
ities.show_as_popup_calendar HTTP-404 ORA-01849: hour must be between 1 and 12\nORA-06512: at "FLOWS_020000.WWV_FLOW_UTILITIES", line 1801\n
ORA-06512: at line 22\n
This happens with both FireFox and Internet Explorer.
Any ideas what's causing this?
-F
Message was edited by:
Fred C WillinghamFred,
Unfortunately, the answer is no to both of your questions.
There is no way for you as a developer to control which date is highlighted in the popup calendar. It will always highlight the current day (if you're displaying a month that contains the current day). This is an interesting and prudent suggestion, and one which we'll consider for an upcoming release of HTML DB.
With regards to your second point, that also is something we should consider for an upcoming release of HTML DB. This isn't impossible for us to do, it was just designed to work in the current fashion. If you look at the generated HTML for the Date Picker item on the page (not the popup calendar itself, but the page on which the item is rendered), we break out each element of the date value into discrete components. When we instead rely upon the user entered value, garbage or date values not conforming to the date format mask are easily entered. And the question is - what to do then? Raise an error immediately, still popup the calendar and show the current month, etc. So we've tried to be fairly strict about the date values and format masks for the popup calendar, hence the implementation you see.
Thanks again for your comments.
Joel -
How to pass date value to an UDF
Hi,
I am working in SDK UI. I have created a form. In this form there is a edit text box. I have to pass a date value to that object. I have taken a variable and pass a date value in "yyyy/mm/dd" format. When I am assign this variable to the object to pass the date value to that object then I am getting an error. The error is "Unable to cast object of type 'system.string' to 'system.IFormatProvider' ".
I have written the code like this :------>
Dim AtenDate As String
AtenDate = '2007/08/01' ' format "yyyy/mm/dd"
Dim txtEditDt As SAPbouiCOM.EditText
oItem = oForm.Items.Item("11")
txtEditDt = oItem.Specific
txtEditDt.String = AtenDate.ToString("dd/MM/yyyy")
After the last line the error is getting fire.
Please help me how I can pass the date value to that object.
Please help me. It is very urgent.Date and Double conversion is really a confusing thing in B1-SDK programming in the beginning.
But once you got it it's okay.
When working with date-time and doubles (System and SBO-Price/SBO-Quantity), you should always take care about the language of...
...system (windows)
...SBO User Interface
These two formats could make trouble when the programming has been made only for a specific configuration of these two.
The third format for SDK-Programming is
...the SBO-DB-Format, which is language-independent and always a String
Here are some rules:
<b>EditText.String</b> ALWAYS returns the value you see on the SBO GUI. It depends on the SBO Date, Price etc.-Format the USER has configured in the Administration. Consider that the user has (for example) the possibility to choose a "#" (or whatever) as decimal-seperator. Direct (implicit) conversion of such a string to a double will fail at the latest now.
The savest way to get a .NET-Double or DateTime- Value from EditText.String are the conversion methods of SBOBobs-Object (see SDK-help -> BoBridge, Format_MoneyToString...etc.).
I think it's a good idea to write some wrapper functions for that methods, cause they always need a recordset which blows up the code too much.
<b>EditText.Value</b> always (system/sbo-language independent) returns the value as a String in DB-Format (Double as "12345.126700" and date as "20070930".
For that you must asure that the EditText is bounded to a format-corresponding datasource. Price, Quantitiy.... if you need a double.
If your "price"-field would be bound to ShortText and the user wants (assuming the example from above) a "#" for decimal-point, then a GUI-seen value like "12,421#12" is also returned as "12,421#12" by EditText.Value. But If bound to Price-DataSource it's "12421.120000"
=> So always do a DataBind to the Data - Type which is needed is recommended for this to work!
In my case EditText.String and -Value is mostly (only...? needed for B1-System-Forms where using of DataSources is restricted.
The prefered way of read/write values is the
<b>UserDataSource.ValueEx and DBDataSource.GetValue/SetValue</b>-method. It's also always in DB-Format as EditText.Value before, but gives much more performance.
Once you got some conversion-functions for "DB-Format-String" to ".NET-DataType" and vice verca (I've defined some .NET - System.Globalization.XXXFormatInfo-Objects for that) all of your problems are things of the past
Regards,
Roland
null
Message was edited by:
Roland Toschek
Edited by: Roland Toschek on Jan 22, 2008 5:32 PM
Trying to clarify a sentence -
hi,
i have below block,
DECLARE
doc dbms_xmldom.DOMDocument;
node dbms_xmldom.DOMNode;
elem dbms_xmldom.DOMElement;
cur_node dbms_xmldom.DOMNode;
root_elem_data dbms_xmldom.DOMElement;
root_elem_tab dbms_xmldom.DOMElement;
root_node_data dbms_xmldom.DOMNode;
mode_elmn dbms_xmldom.DOMElement;
mode_node dbms_xmldom.DOMNode;
mode_text dbms_xmldom.DOMText;
doc1 DBMS_XMLDOM.DOMDOCUMENT;
root_node_data1 DBMS_XMLDOM.DOMNODE;
child_document DBMS_XMLDOM.DOMDOCUMENT;
child_rootnode DBMS_XMLDOM.DOMNODE;
V_CLOB CLOB;
v_doc CLOB;
v_EMP CLOB;
v_output_filename VARCHAR2(300) := 'SPOOL_DIR/'||'EMP_XML_FILE.xml';
l_xmltype XMLTYPE;
BEGIN
doc := dbms_xmldom.newDOMDocument;
node := dbms_xmldom.makeNode(doc);
dbms_xmldom.setversion(doc, '1.0');
dbms_xmldom.setCharset(doc, 'UTF8');
elem := dbms_xmldom.createElement(doc, 'PartnerInfo');
dbms_xmldom.setAttribute(elem,'xmlns','EMP');
cur_node := dbms_xmldom.appendChild(node, dbms_xmldom.makeNode(elem));
mode_elmn := dbms_xmldom.createElement(doc, 'EMPLOYEE');
mode_node := dbms_xmldom.appendChild(cur_node,dbms_xmldom.makeNode(mode_elmn));
BEGIN
SELECT value(e) INTO l_xmltype
FROM TABLE(XMLSequence(Cursor(SELECT * FROM EMP1 where EMPNO=7501))) e;
child_document := DBMS_XMLDOM.newDOMDocument(l_xmltype);
root_node_data1 := dbms_xmldom.importNode(doc,dbms_xmldom.makeNode(dbms_xmldom.getDocumentElement(child_document)),TRUE);
root_node_data1 := DBMS_XMLDOM.appendChild(root_node_data, root_node_data1);
EXCEPTION
WHEN OTHERS THEN
Dbms_Output.Put_Line('Error in SELECT stmt(UC_PARTNER_MS):::'||'error::'||SQLERRM);
END;
dbms_lob.createtemporary(v_doc, true);
dbms_xmldom.writeToClob(doc,v_doc,'UTF8');
v_EMP:= v_doc;
dbms_xmldom.writeToFile(DOC,v_output_filename,'UTF8');
dbms_xmldom.freeDocument(doc);
--Dbms_Output.Put_Line('THE OUTPUT IS::'||V_EMP);
EXCEPTION
WHEN OTHERS THEN
Dbms_Output.Put_Line('Error in SELECT stmt(UC_PARTNER_MS):::'||'error::'||SQLERRM);
END;
The xml file is 'EMP_XML_FILE.xml'
<empno>U++kYmcVuGchxbh+++++++++++++++1+</empno>
<empname>J</empname>
suppose the empno 7501 is not available in our emp table,
i got error
ORA-03113: end-of-file on communication channel
how to handle xmldom with no data values.
by
sivahi,
please give the solution
by
siva -
Month-to-Date and Year-to-Date values in Query
Hello experts,
One of our BI reports has the following requirement: the user should be asked for the report date. After the user inputs the date, the report shows the key figures in three different "flavors": one is the values for that date, the second one is the cumulate values from the first day of the month of the report date to the report date itself, and the third is the cumulate values from the first day of the year of the report date to the report date itself.
I created my report date variable based on 0CALDAY. Then I searched for SAP-exit variables that would help me achieve this, but could not really find any, except for 0P_ABO10, 0P_ABO11, 0P_ABO12 variables, all of them have as description "Start of Key Date Year". I tried creating a few selections in which the dates taken were defined as a range from each of these variables to the report date variable (for the year-to-date values), but I got the error "Variable 0P_ABO10 could not be substituted". I also got this error for the other two variables. And I could not find any SAP-exit variables like "Start of Key Date Month", in order to do the Month-to-Date part. My next try was to use the field "Key Date" with a variable in it, instead my own report date variable based on 0CALDAY, but it gave me the same errors.
I searched the forums and found a few threads that looked useful, like
First and Last day of month and
1st day of month / 1st day of week variables
However, they require some ABAP coding, and I do not know where to place the code (actually, I do not know where to work with ABAP code), and I also believe that I would have to do some changes to it.
Any suggestions?Hi Pedro,
You have to create customer exit in T_Code: CMOD
1. Create a Z project
2. Select RSR00001 as enhancement type.
3. Go into include ZXRSRU01
4. create a code like
Here A is your variable based on 0calmonth with type customer exit and B is variable for 0calday.
Try to write logic for your case taking this as example.
WHEN 'A'.
IF I_Step = 2.
Loop at I_T_VAR_RANGE into L_T_VAR_RANGE where VNAM = 'B'.
Concatenate L_T_VAR_RANGE-LOW(4) '001' into D1.
Concatenate L_T_VAR_RANGE-LOW(4) '012' into D2.
Clear L_S_Range.
L_S_Range-low = D1.
L_S_RANGE-high = D2.
L_S_RANGE-sign = 'I'.
L_S_RANGE-opt = 'BT'.
Append L_S_Range to E_T_Range.
ENDLOOP.
ENDIF.
If you want exact code I can help you in that.
Thanks,
Kams -
How can I show a 0% range in the data value label on a bar chart thanks?
How can I show a 0% range in the data value label on a bar chart thanks?
I'm not sure what the question is.
I know that if you have a bar chart and one of the categories (X-axis) has bar (Y value) equal to 0%, no bar is plotted for that category. Even the addition of a stroke (line) around the bars doesn't make one appear for 0%. The only automatic way I know of to make it look like there is data in that category is to add the value labels to the bars. Inspector/Chart/Series, select one of the bars on the chart, click on "value labels". Another method that is a workaround is to fudge the number a little in your table so that instead of 0% it is a very small %. This will get you a thin line on the chart.
But if your question is about the value labels (the numbers that display on or in the bars) and you are not getting one for a bar that is supposed to be 0%, it probably means your table doesn't actually have a 0% in the corresponding cell. A blank cell in the table will not get a value label. -
How to enter a date value in a Temporary Table
Hi!
Could anyone explain to me how I can enter a date value (say 26 October 2011) in a Temporary Table?
I tried the simple example below, but it gives the foll. error message:
Conversion failed when converting date and/or time from character string
CREATE TABLE Temp1
Column_A date,
Column_B varchar(max)
Insert into Temp1
values ('26.10.2011', 'bbb')
Thanks
Leon LaiHi,
Try This.....
CREATE TABLE Temp1
Column_A datetime,
Column_B varchar(max)
Insert into Temp1
values ('10/26/2011', 'bbb')
Thanks
Shafi -
How to convert a date value into week value?
How to display the date value like '20010203'
into the week number of the year 2001?
When i type in the following sql
select week(chg_time) from site;
I got this error message
ORA-00904: invalid column nameuse the to_char function, to format the date into a week number (then you might need to convert that to a number using to_number)
select to_char( sysdate, 'WW') from dual`
a description of datetime formats: http://download-west.oracle.com/otndoc/oracle9i/901_doc/server.901/a90125/sql_elements4.htm#48515
Maybe you are looking for
-
Hi Guys, Is it possible for a simple report (NOT an ALV) to be exported into an excel file? Please let me know how... Thanks a lot! Regards, Mark
-
Hey out there! I can't seem to empty trash in Finder (Mt. Lion). It starts deleting 45k items, and then simply quits. I deleted a whole slew of apps and files which were transferred from my really OLD iMac. Did I overload it's capacity? Thank you s
-
Applet with 2 methods with the same name in ie
Hi, I have a problem with the Java 1.5 plugin for Internet Explorer . When my Applet contains 2 methods with the same name but not the same return type, ie does not take the good return type. Here is an exemple : * Class TestApplet package test.apple
-
IMusic does not work correctly following iOS5 upgrade
After updgrade to iOS 5, my iMusic app does not function correctly. The bottom row of buttons do not display (Playlists, Songs, Artists, Albums). The More button will display the options, but when selected, the screen remains blank (black). I can dis
-
How to Copy backup to new ipad
How to Copy backup to new ipad?