Crosstab with date values
I need to create a crosstab report that has date values in the cells not numbers but the report is displaying NaN. Is it possible to display a char or date value ?
This forum is for Oracle SQL and PL/SQL, not for Microsoft Excel (.xls files).
If you have an issue relating to SQL or PL/SQL please be clear in your requirements and what the issue is.
{message:id=9360002}
Similar Messages
-
Report data binding error with date values
I have CF7.02 with a Microsoft Visual FoxPro 9.0 SP1 Database
that I connect to using ODBC (FoxPro Driver 6.01.8630.01). I send
my sql results to a CF Report Builder 7.02 PDF report and it works
fine. If I dump the date values before I change them, they look
like the following: {ts '2004-12-20 00:00:00'} . However I have
tried a number of ways of manipulating the date before sending it
to the report, but I continue to get errors. I don't care what
format they go to the report in, since the report reformats them
anyway. I checked to make sure that none of the dates were null.
For example <cfset ReportQuery.PrcInputDate[lcCurRow] =
CreateODBCDateTime(#ldCFPrcInputDate#) /> yields values in the
{ts '2004-12-20 00:00:00'} format when I dump the query results to
screen. Where:
ldCFPrcInputDate = 12/20/2004
CreateODBCDateTime(ldCFPrcInputDate) = {ts '2004-12-20
00:00:00'}
ReportQuery.PrcInputDate[lcCurRow] = {ts '2004-12-20
00:00:00'}
I get the error:
Report data binding error Unable to get value for field
'prcinputdate' of class 'java.util.Date'.
coldfusion.runtime.OleDateTime -> Date
Not using the CreateODBCDate function for example <cfset
ReportQuery.PrcInputDate[lcCurRow] = #ldCFPrcInputDate# /> I
get:
Report data binding error Unable to get value for field
'prcinputdate' of class 'java.util.Date'.
java.lang.String -> Date
Here are some of my failed attempts:
<cfset ReportQuery.PrcInputDate[lcCurRow] =
CreateODBCDateTime(#ldCFPrcInputDate#) />
<cfset ReportQuery.PrcInputDate[lcCurRow] =
#ldCFPrcInputDate# />
<cfset ReportQuery.PrcInputDate[lcCurRow] =
DateFormat(CreateODBCDate(#ldCFPrcInputDate#),'mm/dd/yyyy') />
<cfset ReportQuery.PrcInputDate[lcCurRow] =
CreateODBCDate(DateFormat(#ldCFPrcInputDate#,'mm/dd/yyyy') />
<cfset ReportQuery.PrcInputDate[lcCurRow] =
CreateODBCDate(DateFormat(#ldCFPrcInputDate#,'mm-dd-yyyy') />
<cfset ReportQuery.PrcInputDate[lcCurRow] =
Trim(createODBCDateTime(ldtmpdate)) />
<cfset ReportQuery.PrcInputDate[lcCurRow] =
CreateODBCDate({05-07-2006}) />
<cfset ReportQuery.PrcInputDate[lcCurRow] =
CreateODBCDate('{05-07-2006}') />
<cfset ReportQuery.PrcInputDate[lcCurRow] =
CreateODBCDate(05/07/2006) />
<cfset ReportQuery.PrcInputDate[lcCurRow] =
CreateODBCDate('05/07/2006')/>
<cfset ReportQuery.PrcInputDate[lcCurRow] =
CreateODBCDate(parseDateTime('05/07/2006')) />
<cfset ReportQuery.PrcInputDate[lcCurRow] =
parseDateTime(CreateODBCDateTime(05/07/2006)) />
<cfset ReportQuery.PrcInputDate[lcCurRow] =
parseDateTime(CreateODBCDateTime('#ldCFPrcInputDate#')) />
<cfset ReportQuery.PrcInputDate[lcCurRow] = '{05-07-2006}'
/>
<cfset ReportQuery.PrcInputDate[lcCurRow] = '{05/07/2006}'
/>
<cfset ReportQuery.PrcInputDate[lcCurRow] = '05/07/2006'
/>
I also did some googling without success. Any help is
appreciated.You may want to make sure that the column is not included in
the query variable list in your report cfr file.
The newest version of the Report Builder, which may be
installed on the server, no longer tolerates vars appearing in that
list of they are not in the query itselft. -
Apex flash charts with date values on the x axis
I am playing around in Apex 4 using flash charts and having a bit of troubles playing with dates on the x axis on a 2d line chart.
What I am trying to achive is a values plotted across the chart and the date/time values are not a constent (ie not continually say 1 hour apart) hence why I want to use a datatype of date.
In the SQL below:
select null as link, sysdate -2 as value, 0 as label from dual
union
select null , sysdate -2+1/24 , 1 from dual
union
select null , sysdate -2+2/24 , 2 from dual
union
select null , sysdate -2+5/48, 1 from dual
union
select null , sysdate -2+3/24, 0 from dual;I get a 2D Line chart but each date/time value is equally space apart (ie sysdate -2, sysdate -2+1/24, sysdate -2+2/24 and sysdate -2+3/24 should be 1 unit apart and sysdate -2+5/48 should be half way between sysdate -2+2/24 and sysdate -2+3/24).
I think I have to use custom xml. Using http://www.anychart.com/products/anychart/docs/xmlReference/index.html and http://www.anychart.com/products/anychart/docs/users-guide/DateTime-Axes.html I edited the XML and changed:
<?xml version = "1.0" encoding="utf-8" standalone = "yes"?>
<anychart>
<settings>
<animation enabled="false"/>
<no_data show_waiting_animation="False">
<label>
<text></text>
<font family="Verdana" bold="yes" size="10"/>
</label>
</no_data>
</settings>
<margin left="0" top="" right="0" bottom="0" />
<charts>
<chart plot_type="CategorizedVertical" name="chart_1614502819445708">
<chart_settings>
<title enabled="False" />
<chart_background>
<fill type="Solid" color="0xffffff" opacity="0" />
<border enabled="false"/>
<corners type="Square"/>
</chart_background>
<data_plot_background>
</data_plot_background>
<axes>
<y_axis >
<scale mode="Normal" />
<title enabled="false" />
<labels enabled="true" position="Outside">
<font family="Tahoma" size="10" color="0x" />
<format><![CDATA[{%Value}{numDecimals:0,decimalSeparator:.,thousandsSeparator:\,}]]></format>
</labels>
<major_grid enabled="False"/>
<minor_grid enabled="False"/>
</y_axis>
<x_axis>
<scale mode="Normal" />
<title enabled="false"/>
<labels enabled="true" position="Outside">
<font family="Tahoma" size="10" color="0x" />
<format><![CDATA[{%Value}{numDecimals:0,decimalSeparator:.,thousandsSeparator:\,}]]></format>
</labels>
<major_grid enabled="True" interlaced="false">
<line color="Black" />
</major_grid>
<minor_grid enabled="True">
</minor_grid>
</x_axis>
</axes>
</chart_settings>
<data_plot_settings enable_3d_mode="false" >
<line_series>
<tooltip_settings enabled="true">
<format><![CDATA[{%Name}{enabled:False} - {%Value}{numDecimals:0,decimalSeparator:.,thousandsSeparator:\,}]]></format>
<font family="Tahoma" size="10" color="0x" />
<position anchor="Float" valign="Top" padding="10" />
</tooltip_settings>
<label_settings enabled="true" mode="Outside" multi_line_align="Center">
<format><![CDATA[{%Value}{numDecimals:0,decimalSeparator:.,thousandsSeparator:\,}]]></format>
<background enabled="false"/>
<font family="Tahoma" size="10" color="0x" />
</label_settings>
<line_style>
<line enabled="true" thickness="1" opacity="1" />
</line_style>
<marker_settings enabled="True" >
<marker type="Circle" />
</marker_settings>
</line_series>
</data_plot_settings>
#DATA#
</chart>
</charts>
</anychart>to
<?xml version = "1.0" encoding="utf-8" standalone = "yes"?>
<anychart>
<settings>
<animation enabled="false"/>
<no_data show_waiting_animation="False">
<label>
<text></text>
<font family="Verdana" bold="yes" size="10"/>
</label>
</no_data>
<locale>
<date_time_format>
<format>%HH:%mm:%ss %dd/%MM/%yyyy</format>
</date_time_format>
</locale>
</settings>
<margin left="0" top="" right="0" bottom="0" />
<charts>
<chart plot_type="CategorizedVertical" name="chart_1614502819445708">
<chart_settings>
<title enabled="False" />
<chart_background>
<fill type="Solid" color="0xffffff" opacity="0" />
<border enabled="false"/>
<corners type="Square"/>
</chart_background>
<data_plot_background>
</data_plot_background>
<axes>
<y_axis >
<scale mode="Normal" />
<title enabled="false" />
<labels enabled="true" position="Outside">
<font family="Tahoma" size="10" color="0x" />
<format><![CDATA[{%Value}{numDecimals:0,decimalSeparator:.,thousandsSeparator:\,}]]></format>
</labels>
<major_grid enabled="False"/>
<minor_grid enabled="False"/>
</y_axis>
<x_axis>
<scale mode="Normal" type="DateTime" />
<title enabled="false"/>
<labels enabled="true" position="Outside">
<font family="Tahoma" size="10" color="0x" />
<format><![CDATA[{%Value}]]></format>
</labels>
<major_grid enabled="True" interlaced="false">
<line color="Black" />
</major_grid>
<minor_grid enabled="True">
</minor_grid>
</x_axis>
</axes>
</chart_settings>
<data_plot_settings enable_3d_mode="false" >
<line_series>
<tooltip_settings enabled="true">
<format><![CDATA[{%Name}{enabled:False} - {%Value}{numDecimals:0,decimalSeparator:.,thousandsSeparator:\,}]]></format>
<font family="Tahoma" size="10" color="0x" />
<position anchor="Float" valign="Top" padding="10" />
</tooltip_settings>
<label_settings enabled="true" mode="Outside" multi_line_align="Center">
<format><![CDATA[{%Value}{numDecimals:0,decimalSeparator:.,thousandsSeparator:\,}]]></format>
<background enabled="false"/>
<font family="Tahoma" size="10" color="0x" />
</label_settings>
<line_style>
<line enabled="true" thickness="1" opacity="1" />
</line_style>
<marker_settings enabled="True" >
<marker type="Circle" />
</marker_settings>
</line_series>
</data_plot_settings>
#DATA#
</chart>
</charts>
</anychart>and change the SQL series to:
select link, to_char(value, 'HH24:MI:SS DD/MM/YYYY') as value, label from
select null as link, sysdate -2 as value, 0 as label from dual
union
select null , sysdate -2+1/24 , 1 from dual
union
select null , sysdate -2+2/24 , 2 from dual
union
select null , sysdate -2+5/48, 1 from dual
union
select null , sysdate -2+3/24, 0 from dual)But the chart changes from a line chart to a bar chart with each value being equally spaced.
Can anyone see what I am doing wrong or point me in the right direction? Thanks in advance.This will be a little bit lengthy answer, but I guess it will be easier to understand what I meant to say.
I created a table that contains values you used as a data source (just to make my life easier):
SQL> alter session set nls_date_format = 'dd.mm.yyyy hh24:mi:ss';
Session altered.
SQL> select * from test;
VALUE LABEL
12.10.2010 09:03:45 0
12.10.2010 10:03:45 1
12.10.2010 11:03:45 2
12.10.2010 11:33:45 1
12.10.2010 12:03:45 0
SQL> alter session set nls_date_format = 'hh24:mi';
Session altered.From now on, we'll see only hours and minutes.
Step 1: current and previous values - difference in number of MINUTES
SQL> select t.value,
2 lag(t.value) over (order by t.value) previous_value,
3 (t.value - lag(t.value) over (order by t.value)) * 24 * 60 minutes_diff
4 from test t;
VALUE PREVI MINUTES_DIFF
09:03
10:03 09:03 60
11:03 10:03 60
11:33 11:03 30
12:03 11:33 30Step 2: a little bit of calculation:
- TIME_SPAN: how many minutes are there between MIN and MAX date?
- MIN_DIFF: what is the minimum time difference (minutes)?
- SLICES: how many time slices do we want on the x-axis?
SQL> select
2 min(x.value) min_val,
3 max(x.value) max_val,
4 min(x.minutes_diff) min_diff,
5 (max(x.value) - min(x.value)) * 24 * 60 time_span,
6 (max(x.value) - min(x.value)) * 24 * 60 / min(x.minutes_diff) slices
7 from (select t.value,
8 lag(t.value) over (order by t.value) previous_value,
9 (t.value - lag(t.value) over (order by t.value)) * 24 * 60 minutes_diff
10 from test t
11 ) x;
MIN_V MAX_V MIN_DIFF TIME_SPAN SLICES
09:03 12:03 30 180 6There's 180 minutes between 09:03 and 12:03; minimum time difference in our TEST table is 30 minutes, so - we want to have 6 time slices on the x-axis (180 / 30).
Step 3: row generator technique: let's create time values that are missing:
SQL> select y.min_val + (level - 1) * y.min_diff / (24 * 60) val
2 from (select
3 min(x.value) min_val,
4 max(x.value) max_val,
5 min(x.minutes_diff) min_diff,
6 (max(x.value) - min(x.value)) * 24 * 60 time_span,
7 (max(x.value) - min(x.value)) * 24 * 60 / min(x.minutes_diff) slices
8 from (select t.value,
9 lag(t.value) over (order by t.value) previous_value,
10 (t.value - lag(t.value) over (order by t.value)) * 24 * 60 minutes_diff
11 from test t
12 ) x
13 ) y
14 connect by level <= y.slices + 1;
VAL
09:03
09:33
10:03
10:33
11:03
11:33
12:03
7 rows selected.OK, now we have 30 minutes between every time value.
Step 4: join newly generated time values with the original table. Use OUTER JOIN; missing labels will be 0 (zero):
SQL> select
2 null link,
3 to_char(z.val, 'hh24:mi') new_value,
4 nvl(t1.label, 0) new_label
5 from (select y.min_val + (level - 1) * y.min_diff / (24 * 60) val
6 from (select
7 min(x.value) min_val,
8 max(x.value) max_val,
9 min(x.minutes_diff) min_diff,
10 (max(x.value) - min(x.value)) * 24 * 60 time_span,
11 (max(x.value) - min(x.value)) * 24 * 60 / min(x.minutes_diff) slices
12 from (select t.value,
13 lag(t.value) over (order by t.value) previous_value,
14 (t.value - lag(t.value) over (order by t.value)) * 24 * 60 minutes_diff
15 from test t
16 ) x
17 ) y
18 connect by level <= y.slices + 1
19 ) z,
20 test t1
21 where t1.value (+) = z.val
22 order by z.val;
L NEW_V NEW_LABEL
09:03 0
09:33 0
10:03 1
10:33 0
11:03 2
11:33 1
12:03 0
7 rows selected.Cool, so we have them all. Now, go to Apex and create a chart using a query from step #4.
I tested it - it displays something which means that it should work for you too (unfortunately, this forum doesn't accept attachments so that you could see it). Now, I can't tell whether that's what you need or not, but - if the idea itself is OK, it can be adjusted (I hope so). -
Had a hard time setting up a bar chart with date value
Just wanted to achieve this simple chart with a date value instead of text string or numbers, which is quite simple to achieve in Excel see screenshot.
With flex 4, here's my code snippet, what do I missed? Please give me a hand, thanks alot.
[Bindable]
private var scheduledata:ArrayList = new ArrayList([
{name: "ward1", meeting: "1/1/2008", seminar: "8/12/2008"},
{name: "ward2", meeting: "2/1/2009", seminar: "9/24/2009"},
{name: "ward3", meeting:"3/1/2011", seminar: "10/30/2011"}
<mx:BarChart id="bar" height="100%"
showDataTips="true" dataProvider="{scheduledata}">
<mx:verticalAxis>
<mx:CategoryAxis categoryField="name"/>
</mx:verticalAxis>
<mx:series>
<mx:BarSeries yField="name" xField="meeting" displayName="meeting" />
<mx:BarSeries yField="name" xField="seminar" displayName="seminar"/>
</mx:series>
</mx:BarChart>Thank you all for those who tried to help. I figured it out by picking it up from (http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf65a29-7ffb.html). Just need to add a DateTimeAxis to it! Though there's bug to it that the datetimeaxis format will only display mm/yy regardless you chose Days, Weeks or Months. Somehow I will need to tackle that.
<mx:horizontalAxis>
<mx:DateTimeAxis dataUnits="Days""/>
</mx:horizontalAxis> -
Crosstab with char values doesn't work
I am using Template Builder for Word 5.6.2 to create a crosstab report. I need to create a crosstab table that has char values in the cells not numbers as is expected by the wizard. Because the sum command expectes a number it displays the NaN not a number error in the cell if I try to display a char value. I tried changing the sum to max in the cell:
<?max ($G1[(./CRITERIA_ID=current()/CRITERIA_ID)]/THRESHOLD)?>
but this gives an error.
Is is possible to display a char value?I ran into a similar problem before and worked around it by moving the query to a pipelined function in the database as described at WITH clause unexpectedly causes ORA-00942 in Reports Builder
Hope this helps. -
How to compare Date in the TextField or DateTime with Date/Time field?
Hi All,
I am facing an issue with respect Date comparinson. I tried to look into entire discussions but failed to get the answer.
My issue is: I wanted to comparet Date/time field value with Date value which is in TextField.
The functionality of my form is:
I have dropdown list which lists the registered customer ids binded to XML Datasource. On selection of the customer id from the dropdown I am displaying customer registration date in the TextField or say Date/Time field as below code in dropdown change event.
RegistrationDetails.PurchaseEntry.txtRegDate.rawValue = regDataNode.CREATION_DATE.value; (this is TextField control)
In form I have an Date/Time field in which use will select the date of item purchase. In the validation part I want to make sure that, the purchase date selected in Date/Time field must be greater than the Customer Registraiton Date. I able to compare if the customer selects the date from two different Date/Time fields. But how to compare the dates which one is in Date/Time field and Date is in TextField?
I have tried using Num2Date and Date2Num with "YYYY-MM-DD" format to compare but not succeed!
Can you guys help me in this? Thanks in advance
Regards.Hi,
Yes, I am able to display the date which I have assigned to the text box. In the message box it show the value as '31/05/2009', since in this format i am assigining the date in the text box.
Here is the code which I am assigning the value:
RegistrationDetails.PurchaseEntry.txtRegDate.rawValue = regDataNode.CREATION_DATE.value;
Do I need to change the format while assigning value in text box?
You have told that, you have attached your test form, nothing is the reply. Can you repost the file?
Regards. -
How to show data value labels in the charts without moving my mouse on the data point?
Sometimes I need to show a chart with data value labels which is not necessary to move my mouse on the data points. However, it seems Xcelsius does not support this simple feature. Any alternative ways?
Many thanks!Currently, Xcelsius does not support display of labels at data points. It would be difficult to move and update labels on a chart with dynamically updated data. However, a work around for a static chart would be to add a Label component in the desired location. This can be done for multiple static charts by using dynamic visibility.
-
How to use aggregate function with Date
Hi All,
I have a group of date from that is it possible to Max and Min of date.
I have tried like this but its errored out <?MIN (current-group()/CREATION_DATE)?>.
I have also tried like this but it doesnt works
<?xdoxslt:minimum(CREATION_DATE)?>
Is it possible to use aggregate function with date values.
Thanks & Regards
SrikkanthHi KAVI PRIYA,
if date is not in cannonical format, how can we change it in BI publisher, then how to calcualte minimum and as well as maximum.
please advise me,
Thanks,
Sri -
Crosstab or Crosstabs with different date ranges not lining up.
I have a crosstab with a dimension (item) in the vertical axis, and different date ranges on the Horizontal (top) axis.
I want to display counts of a measure over specific ranges of time. For instance, count of items sold for weeks 1,2,3,4, horizontally, then count of items sold for months 1,2,3,4 horizontally, next to each other.
Problem is that count rows by item do not line up. Count by week has fewer items, so it has fewer rows than the counts by month. I need it to have the same number of rows, and just show 0 or blank in that row, instead of just not being there. I need all rows to line up by item.
Its like there needs to be an outer join, but I haven't been able to make it work. What am I missing?
Does that make sense?
Any ideas welcome. Thank you!Wavery,
You are looking to display a grid with a high degree of consistency, regardless of the data present. There is no "single" step capability provided by WebI to achieve this, so it requires creativity on your part. A second data provider (DP) for your report is necessary and can be either a view in your database, a custom SQL, or some folks have even built a derived table in their universe to accommodate. At any rate, there are one of two ways to achieve. If you are familar with SQL and the "union" statement, you would run the basic SQL, then via union, dummy up a second query that has all the requisite columns, but for the measures you would use a value of zero so as not to affect the generated facts. For example, suppose you had a report for a hardware store, and you wanted to track the following items: Nails, Flashlights, and Screws. Your basic query might look like this:
select item,sum(inventory) from inventory_table where item in ('nail','flashlight','screw') group by item
Then your next portion of code:
union select 'Nail',0 union select 'Flashlight',0 union select 'Screw',0
See how the union is providing "dummy" info? To do this in WebI with a second DP, you would not use union, but a separate view perhaps, then in WebI apply Merge Dimensions on the item column (and the equivalent of an outer join).
Thanks,
John -
JDBC MS Access--- cannot extract entry with null value with data type Meta
I'm trying to extract a data entry with null value by using JDBC. The database is MS Access.
The question is how to extract null entry with data type memo? The following code works when the label has data type Text, but it throws sqlException when the data type is memo.
Any advice will be appreciated! thanks!
Following are the table description and JDBC code:
test table has the following attributes:
Field name Data Type
name Text
label Memo
table contents:
name label
me null
you gates
Code:
String query = "SELECT name, label FROM test where name like 'me' ";
ResultSet rs = stmt.executeQuery(query);
while (rs.next())
String name = rs.getString("name");
rs.getString("val");
String label = rs.getString("label");
System.out.println("\t"+name+"\t"+label);
catch (SQLException ex)
System.out.println(ex.getSQLState());
System.out.println(ex.getErrorCode());
System.out.println("in sqlexception");
output:
C:\Temp\SEFormExtractor>java DBTest
yet SELECT name, label FROM test
null
0
in sqlexceptionThe question is how to extract null entry with data type memo?Okay, what you need to do is this:
if (rs.getString("val") == null)
// do something
}This way, when it's a null value, you can check it first, and then handle it how you want, rather than getting an exception. -
Dynamic action with set value on date field
Hi,
I'm using APEX 4.02
I'm trying to calculate the age based on the date of birth dynamically on a form. I'm trying to do this with a (advanced)dynamic action with set value.
I'm able to get this kind of action working based on a number field etc, but NEVER on a date field.
I've read all posts on this subject but so far no solution. Even if I try to simply copy the value over to another date field or typecast it to a string ( to_char function ) it does not work. So for me the problem seems to be in the source field being a date field.
I've tried using the source value as is in a select statement :
select :P33_GEBOORTEDATUM from dual;
and also type casted based on the date format :
select TO_DATE(:P33_GEBOORTEDATUM,'DD-MON-YYYY') from dual
but still no luck.
On the same form I don't have any issues as long as the calculation is based on number fields, but as soon as I start using dates all goes wrong.
Any suggestions would be greatly appreciated. If you need any extra info just let me know.
Cheers
Bas
b.t.w My application default date format is DD-MON-YYYY, maybe this has something to do with the issue .... ?
Edited by: user3338841 on 3-apr-2011 7:33Hi,
Create a dynamic action named "set age" with following values.
Event: Change
Selection Type: Item(s)
Item(s): P1_DATE_OF_BIRTH
Action: Set value
Fire on page load: TRUE
Set Type: PL/SQL Expression
PL/SQL Expression: ROUND( (SYSDATE - :P1_DATE_OF_BIRTH)/365.24,0)
Page items to submit: P1_DATE_OF_BIRTH
Selection Type: Item(s)
Item(s): P1_AGE
Regards,
Kartik Patel
http://patelkartik.blogspot.com/
http://apex.oracle.com/pls/apex/f?p=9904351712:1 -
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 -
Hi ,
We have enabled context sensitive DFF in Bank Branch Page for HZ_PARTIES DFF , We have created Flex Map so that only bank branch context fields are only displayed in the bank branch page and as we know party information DFF is shared by supplier and Customer Page so we dint want to see any Bank Branch fields or context information in those pages.
We have achieved the requirement but when open existing branches bank branch update is throwing below error message :
"The value in flexfield context reference web bean does not match with the value in the context of the Descriptive flexfield web bean BranchDescFlex. If this in not intended, please go back to correct the data or contact your Systems Administrator for assistance."
this error is thrown only when we open existing branches, if we save existing branch and open then it is not throwing any error message.
Please let us know reason behind this error message.
Thanks,
MrudualaYou are kidding? It took me about 3 minutes to scroll down on my tab to get to the triplex button!
Habe you read the error message?
Quote:
java.sql.SQLSyntaxErrorException: ORA-04098: trigger 'PMS.PROJECT_SEQ' is invalid and failed re-validation
Check the trigger and it should work again.
Timo -
Asset Acquisition with Asset Value Date earlier than GI post.date
Dear all,
I am curently using SAP ECC 6.0. We are not creating AuC assets but directly capitalizing assets from investment accounts.
If a material is issued with a date in March and i try to acquire it with asset value date from a previous period, for example in February, the system doesnt issue any message and lets me post the transaction. The accountants claim that this hadnt been possible in the earlier version of SAP 4.6 that we had been using and that the system had issued an error message - "Posting not possible (Value date earlier than capitalization date)"
The accounting logic is that you cant capitalize an asset with a date earlier than the date when it has been in use, i.e. in our case it`s the date the material has been issued from the warehouse.
Does someone know what logic does SAP follow in this case - and if i can set a validation control that will check and compare the two dates?
Any opinion would be appreciated
KR
Severina KolevaWe are on ECC 5.0 and we do get that message, but it is a warning.
AA348...
that said, you can setup a validation using GGB0 and asset accounting -
Pre-populating a date/time column with the value entered in the last added item
I have a list with a column called "expected finish date". Whenever the user adds the very first item in a list, he/she should have to enter a value for this column.
I want to make all new item entries to pre-poplate this field with the value entered in the previously added item. This way, he/she wont have to re-enter the date every time (which rarely changes). How can this be done?could create a second list ("state") with column ("default finish date")...
create a workflow on main list... if column is blank/empty, pull from second list... otherwise, update second list with the value that was entered.
Or, customize the form (InfoPath or JavaScript)
Scott Brickey
MCTS, MCPD, MCITP
www.sbrickey.com
Strategic Data Systems - for all your SharePoint needs
Maybe you are looking for
-
Changing from continuous to finite sampling
Hi All, I'm programming the 6602 with DAQmx 7.4 Ansi C API. This is pretty small issue, but since it might be a bug I thought I'd post it anyway. When I run a counter input task with implicit timing (say period or frequency measurement) in continuo
-
Installed LR4 on a clean new HD / OS (Win7 Pro) computer, imported 90k + images from a 4 disk JBOD using a Library copied from the old C Drive, which was placed in My Pictures. Now I have no history (DNG) or any User (develop or import) Presets, plus
-
Hell Experts, I have done desgin and configuration from Idoc to File Scenario in XI Intergration server. Source is R/3 and Target system is File. I have successfully configured each and every step. Send Idoc from R/3 to Intergration server and run sx
-
GL acct change to Open Item management (with archived docu.)
Dear all, When we use program ZRFSEPA02(copy from RFSEPA02) to switch on OI mang for GL acct,but program prompt this acct have documents were<b> archived and NOT allow to execute!</b> I know SAP announced RFSEPA02 was not usable since 4.5A,but use
-
HT201077 Photo stream group not showing up
I was invited to a photo stream and I clicked join, but when the link takes me to my photo streams that stream does not show up no matter how long I wait