Query on date
Hi All
Well i want to display a date in "delivery date" field in purchase order to be 20 days more then what we are selecting in "posting date", can you please suggest me some query which will solve my problem
Andy.
There are 2 ways to get data from fields:
1. You can refer to fields in a screen template using the syntax, $[Table name.Field name]. The table name is the name of the table belonging to the screen template, for example, OINV for the invoice entry screen.
2. The system is able to uniquely identify each field of a document via the field index and the field column.
The syntax is then $[$Field index.Field column.NUMBER/CURRENCY/DATE/0]
You use the NUMBER parameter if the field concerned contains an amount and a currency key, and you want to extract the amount only.
You use the CURRENCY parameter if the field concerned contains an amount and a currency key, and you want to extract only the currency key.
You use the DATE parameter if the field concerned is a date field and you want to use it for calculations.
(Thus for our example "10" is the field ID of the posting date field (on the order form), and "0" is the column ID - seeing as this is a edit field and not matrix there is no columns - thus 0 is the default)
Similar Messages
-
How to compare result from sql query with data writen in html input tag?
how to compare result
from sql query with data
writen in html input tag?
I need to compare
user and password in html form
with all user and password in database
how to do this?
or put the resulr from sql query
in array
please help me?Hi dejani
first get the user name and password enter by the user
using
String sUsername=request.getParameter("name of the textfield");
String sPassword=request.getParameter("name of the textfield");
after executeQuery() statement
int exist=0;
while(rs.next())
String sUserId= rs.getString("username");
String sPass_wd= rs.getString("password");
if(sUserId.equals(sUsername) && sPass_wd.equals(sPassword))
exist=1;
if(exist==1)
out.println("user exist");
else
out.println("not exist"); -
How can I do for a row of a query be data provider for a variable?
Hi friends, I have a problem !
How can I do for a row of a query be data provider for a variable?
I need that a value of variable be stored when the user select a row in a query. At the BPS we can do this configuring the variable selector in WIB, and in a WAB how I can do this ?
Best regards,
Gustavo LiberadoIn this case when I press the key to call other forms I need to wait for the response in the secondary form and then process the result.That is exactly what a "modal JDialog" (or JOptionPane) are used for.
Try it. Create a short demo program. All you need is a JFrame with a single button to show the modal dialog. All you modal dialog needs is a single button to close the dialog. After you show the modal dialog add a System.out.println(...) statement in your code and you will see that it is not executed until the dialog is closed.
Then once you understand the basics you add the code to your real program.
If you need further help then you need to create a [Short, Self Contained, Compilable and Executable, Example Program (SSCCE)|http://homepage1.nifty.com/algafield/sscce.html], that demonstrates the incorrect behaviour.
Don't forget to use the Code Formatting Tags so the posted code retains its original formatting. That is done by selecting the code and then clicking on the "Code" button above the question input area. -
An error occurred querying a data source - with REST services
Hi,
I have a SharePoint 2013 form library library with an info-path form. I need to get the logged in user's 'Display Name' on my form load automatically.
I used REST service to fetch the current user details. In the preview mode of the form, its showing the right name. But when I publish this form to library I am getting the following error.
REST Service --> http://site url/_api/SP.UserProfiles.PeopleManager/GetMyProperties
Please help me to resolve this issue.
Thanks in advance for your time and reply :)Hi,
According to your post, my understanding is that an error occurred querying a data source with REST services.
It is defiantly permission issue with GetUserProfileByName service
and could be many reasons of this problem. You first try with UDCX file and make sure that UPS is running.
Here are some similar threads for your reference:
http://social.technet.microsoft.com/Forums/en-US/b8c668ea-7511-4657-a1a8-08fb4a6bd53d/info-path-an-error-occurred-querying-a-data-source?forum=sharepointcustomizationprevious
http://social.technet.microsoft.com/Forums/en-US/46866ac2-da09-4340-a86a-af72cbb2c8d7/info-path-an-error-occurred-querying-a-data-source-?forum=sharepointcustomization
http://blogs.msdn.com/b/russmax/archive/2012/08/17/want-to-call-sharepoint-2010-web-services-within-browser-based-infopath-2010-forms.aspx
Best Regards,
Linda Li
Linda Li
TechNet Community Support -
Error occurred querying a data source in office 365.
I have created a simple infopath form and in one of my dropdown box i am receiving the REST services.
when i run the infopath form 2013 in preview it was running good but when i upload it on to office 365 cloud it's showing me error. i had converted the services into UDL and save it on Data connection Library and it's approved.
Warning
Click OK to resume filling out the form. You may want to check your form data for errors.
The entry has been added to the Windows event log of the server.
log ID:5566
Correlation ID:feb08a9c-9d47-30f5-5d89-60340242d6d1.Hi,
According to your post, my understanding is that you got error when querying a data source in office 365.
Per my knowleadge, we cannot connect to SharePoint Web Services from InfoPath Forms within SharePoint Online.
Loopback protection is enabled on the SharePoint Online environment and will block calls to SOAP and REST from InfoPath Form Services.
For more information, you can refer to:
Error message when you connect an InfoPath form to a SharePoint Online web service: "An error occurred while connecting to a Web Service"
As a workaround, to look up data for some dropdowns from several external REST Web Services, we need to have a Data Connection library in your Site Collection in which to store the UDCX files.
The steps seem to be:
Create a Data Connection Library in your Site Collection
In the InfoPath ribbon, go to Data, then Data Connections. Your existing data connections should be listed.
Choose the data connection which is hosted on a different domain.
Clink the
Convert to Connection File… button
In the location selector, specify the path to the Data Connection Library you created above.
Leave the
Relative to site collection (recommended) radio button selected.
Click OK
Here is a great blog for your reference:
InfoPath 2013 Forms on Office365 with External REST DataSources
Best Regards,
Linda Li
Linda Li
TechNet Community Support -
Query xml data from a CLOB datatye
All,
I read in an oracle white paper that is is possible to query XML data from CLOB datatype using oracle text index using operators HASPATH() and INPATH(). I am not able to find any example on how to do this. Can someone please post a simple example here.
Thank You very much!SCOTT@10gXE> CREATE TABLE your_table (id NUMBER, xml_data CLOB)
2 /
Table created.
SCOTT@10gXE> INSERT INTO your_table (id, xml_data)
2 SELECT t.deptno,
3 DBMS_XMLGEN.GETXML
4 ('SELECT d.dname,
5 CURSOR (SELECT e.ename, e.job
6 FROM emp e
7 WHERE e.deptno = d.deptno) emp_data
8 FROM dept d
9 WHERE d.deptno = ' || t.deptno)
10 FROM dept t
11 /
5 rows created.
SCOTT@10gXE> COMMIT
2 /
Commit complete.
SCOTT@10gXE> begin
2 ctx_ddl.create_section_group('xmlpathgroup', 'PATH_SECTION_GROUP');
3 end;
4 /
PL/SQL procedure successfully completed.
SCOTT@10gXE> CREATE INDEX myindex
2 ON your_table(xml_data)
3 INDEXTYPE IS ctxsys.context
4 PARAMETERS ('datastore ctxsys.default_datastore
5 filter ctxsys.null_filter
6 section group xmlpathgroup'
7 )
8 /
Index created.
SCOTT@10gXE> SELECT * FROM your_table
2 WHERE CONTAINS (xml_data, 'PERSONNEL INPATH (//DNAME)') > 0
3 /
ID XML_DATA
50 <?xml version="1.0"?>
<ROWSET>
<ROW>
<DNAME>PERSONNEL</DNAME>
<EMP_DATA>
</EMP_DATA>
</ROW>
</ROWSET>
SCOTT@10gXE> SELECT * FROM your_table
2 WHERE CONTAINS (xml_data, 'HASPATH (//DNAME="PERSONNEL")') > 0
3 /
ID XML_DATA
50 <?xml version="1.0"?>
<ROWSET>
<ROW>
<DNAME>PERSONNEL</DNAME>
<EMP_DATA>
</EMP_DATA>
</ROW>
</ROWSET>
SCOTT@10gXE> SELECT * FROM your_table
2 WHERE CONTAINS (xml_data, 'CLARK INPATH (//ENAME)') > 0
3 /
ID XML_DATA
10 <?xml version="1.0"?>
<ROWSET>
<ROW>
<DNAME>ACCOUNTING</DNAME>
<EMP_DATA>
<EMP_DATA_ROW>
<ENAME>CLARK</ENAME>
<JOB>MANAGER</JOB>
</EMP_DATA_ROW>
<EMP_DATA_ROW>
<ENAME>KING</ENAME>
<JOB>PRESIDENT</JOB>
</EMP_DATA_ROW>
<EMP_DATA_ROW>
<ENAME>MILLER</ENAME>
<JOB>CLERK</JOB>
</EMP_DATA_ROW>
</EMP_DATA>
</ROW>
</ROWSET>
SCOTT@10gXE> SELECT * FROM your_table
2 WHERE CONTAINS (xml_data, 'HASPATH (//ENAME="CLARK")') > 0
3 /
ID XML_DATA
10 <?xml version="1.0"?>
<ROWSET>
<ROW>
<DNAME>ACCOUNTING</DNAME>
<EMP_DATA>
<EMP_DATA_ROW>
<ENAME>CLARK</ENAME>
<JOB>MANAGER</JOB>
</EMP_DATA_ROW>
<EMP_DATA_ROW>
<ENAME>KING</ENAME>
<JOB>PRESIDENT</JOB>
</EMP_DATA_ROW>
<EMP_DATA_ROW>
<ENAME>MILLER</ENAME>
<JOB>CLERK</JOB>
</EMP_DATA_ROW>
</EMP_DATA>
</ROW>
</ROWSET>
SCOTT@10gXE> -
5200: Error executing query: The data form grid is invalid.
Hi,
I am getting this error " 5200: Error executing query: The data form grid is invalid. Verify that all members selected are in Essbase. Check log for details.
com.hyperion.planning.HspException;hasPovDims=1;povXML=<?xml version="1.0"?><datasources><datasource name="Profit " dsid="228af2c3_129ca3dd85c_-77b1" allowEdit="1"><dim name="Period" dimIndex="1" dsName="Profit " keyDimName="Period" memberName="Apr" displayName="Period: Apr"/><dim name="Year" dimIndex="2" dsName="Profit " keyDimName="Year" memberName="FY10" displayName="Year: FY10"/><dim name="Entity" dimIndex="5" dsName="Profit " keyDimName="Entity" memberName="9999" displayName="Entity: 9999"/></datasource></datasources>"
I have checked that both the systems essbase and planning are same. nothing's different. still i cannot find the exact reason why the report is not working.
can any please help me.
btw, i am using Hyperion Planning 9.3.1
Thanks,
BIMSHi
You probably deleted some members from outline that are used by report
I would recommend you to open you report/grid via rep.client and try to find which elements are abcent
Regards
Alexander
Edited by: Softperson on 19/8/2010 17:38 -
Error when querying OLAP data with BI answers
Have been doing all the Lessons in "Using Oracle OLAP With Oracle BI Enterprise Edition 10g Release 3". Got till lesson 3 where I'm supposed to query the data with Answers but If I add any of the facts to the report, I get the following error:
Odbc driver returned an error (SQLExecDirectW).
Error Details
Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 17003] Oracle gateway error: Unsupported data type 101. (HY000)
SQL Issued: SELECT Customer."Ship To" saw_0, Measures.COST saw_1 FROM Global ORDER BY saw_0
So I was wondering if anyone knows what the catch could be.
Thanks in advance!Yes. Me too. I have the same issue and I don't find any information about it. Could anyone help ?
-
I need to pass a query in form of string to DBMS_XMLQUERY.GETXML package...the parameters to the query are date and varchar ..please help me build the string .Below is the query and the out put. ( the string is building fine except the parameters are with out quotes)
here is the procedure
create or replace
procedure temp(
P_MTR_ID VARCHAR2,
P_FROM_DATE IN DATE ,
P_THROUGH_DATE IN DATE ) AS
L_XML CLOB;
l_query VARCHAR2(2000);
BEGIN
l_query:= 'SELECT
a.s_datetime DATETIME,
a.downdate Ending_date,
a.downtime Ending_time,
TO_CHAR(ROUND(a.downusage,3),''9999999.000'') kWh_Usage,
TO_CHAR(ROUND(a.downcost,2),''$9,999,999.00'') kWh_cost,
TO_CHAR(ROUND(B.DOWNUSAGE,3),''9999999.000'') KVARH
FROM
(SELECT s_datetime + .000011574 s_datetime,
TO_CHAR(S_DATETIME ,''mm/dd/yyyy'') DOWNDATE,
DECODE(TO_CHAR(s_datetime+.000011574 ,''hh24:'
||'mi''), ''00:'
||'00'',''24:'
||'00'', TO_CHAR(s_datetime+.000011574,''hh24:'
||'mi'')) downtime,
s_usage downusage,
s_cost downcost
FROM summary_qtrhour
WHERE s_mtrid = '
||P_MTR_ID||
' AND s_mtrch = ''1''
AND s_datetime BETWEEN TO_DATE('
||P_FROM_DATE||
',''DD-MON-YY'') AND (TO_DATE('
||P_THROUGH_DATE||
',''DD-MON-YY'') + 1)
) a,
(SELECT s_datetime + .000011574 s_datetime,
s_usage downusage
FROM summary_qtrhour
WHERE s_mtrid = '
||P_MTR_ID||
' AND s_mtrch = ''2''
AND s_datetime BETWEEN TO_DATE('
||P_FROM_DATE||
',''DD-MON-YY'') AND (TO_DATE('
||P_THROUGH_DATE||
','' DD-MON-YY'') + 1)
) B
where a.S_DATETIME = B.S_DATETIME(+)';
SELECT DBMS_XMLQUERY.GETXML('L_QUERY') INTO L_XML FROM DUAL;
INSERT INTO NK VALUES (L_XML);
DBMS_OUTPUT.PUT_LINE('L_QUERY IS :'||L_QUERY);
END;
OUTPUT parameters are in bold (the issue is they are coming without single quotes otherwise th equery is fine
L_QUERY IS :SELECT
a.s_datetime DATETIME,
a.downdate Ending_date,
a.downtime Ending_time,
TO_CHAR(ROUND(a.downusage,3),'9999999.000') kWh_Usage,
TO_CHAR(ROUND(a.downcost,2),'$9,999,999.00') kWh_cost,
TO_CHAR(ROUND(B.DOWNUSAGE,3),'9999999.000') KVARH
FROM
(SELECT s_datetime + .000011574 s_datetime,
TO_CHAR(S_DATETIME ,'mm/dd/yyyy') DOWNDATE,
DECODE(TO_CHAR(s_datetime+.000011574 ,'hh24:mi'), '00:00','24:00', TO_CHAR(s_datetime+.000011574,'hh24:mi')) downtime,
s_usage downusage,
s_cost downcost
FROM summary_qtrhour
WHERE s_mtrid = N3165 AND s_mtrch = '1'
AND s_datetime BETWEEN TO_DATE(01-JAN-13,'DD-MON-YY') AND (TO_DATE(31-JAN-13,'DD-MON-YY') + 1)
) a,
(SELECT s_datetime + .000011574 s_datetime,
s_usage downusage
FROM summary_qtrhour
WHERE s_mtrid = N3165 AND s_mtrch = '2'
AND s_datetime BETWEEN TO_DATE(01-JAN-13,'DD-MON-YY') AND (TO_DATE(31-JAN-13,' DD-MON-YY') + 1)
) B
where a.S_DATETIME = B.S_DATETIME(+)The correct way to handle this is to use bind variables.
And use DBMS_XMLGEN instead of DBMS_XMLQUERY :
create or replace procedure temp (
p_mtr_id in varchar2
, p_from_date in date
, p_through_date in date
is
l_xml CLOB;
l_query VARCHAR2(2000);
l_ctx dbms_xmlgen.ctxHandle;
begin
l_query:= 'SELECT
a.s_datetime DATETIME,
a.downdate Ending_date,
a.downtime Ending_time,
TO_CHAR(ROUND(a.downusage,3),''9999999.000'') kWh_Usage,
TO_CHAR(ROUND(a.downcost,2),''$9,999,999.00'') kWh_cost,
TO_CHAR(ROUND(B.DOWNUSAGE,3),''9999999.000'') KVARH
FROM
(SELECT s_datetime + .000011574 s_datetime,
TO_CHAR(S_DATETIME ,''mm/dd/yyyy'') DOWNDATE,
DECODE(TO_CHAR(s_datetime+.000011574 ,''hh24:'
||'mi''), ''00:'
||'00'',''24:'
||'00'', TO_CHAR(s_datetime+.000011574,''hh24:'
||'mi'')) downtime,
s_usage downusage,
s_cost downcost
FROM summary_qtrhour
WHERE s_mtrid = :P_MTR_ID
AND s_mtrch = ''1''
AND s_datetime BETWEEN TO_DATE(:P_FROM_DATE,''DD-MON-YY'')
AND (TO_DATE(:P_THROUGH_DATE,''DD-MON-YY'') + 1)
) a,
(SELECT s_datetime + .000011574 s_datetime,
s_usage downusage
FROM summary_qtrhour
WHERE s_mtrid = :P_MTR_ID
AND s_mtrch = ''2''
AND s_datetime BETWEEN TO_DATE(:P_FROM_DATE,''DD-MON-YY'')
AND (TO_DATE(:P_THROUGH_DATE,'' DD-MON-YY'') + 1)
) B
where a.S_DATETIME = B.S_DATETIME(+)';
l_ctx := dbms_xmlgen.newContext(l_query);
dbms_xmlgen.setBindValue(l_ctx, 'P_MTR_ID', p_mtr_id);
dbms_xmlgen.setBindValue(l_ctx, 'P_FROM_DATE', to_char(p_from_date, 'DD-MON-YY'));
dbms_xmlgen.setBindValue(l_ctx, 'P_THROUGH_DATE', to_char(p_through_date, 'DD-MON-YY'));
l_xml := dbms_xmlgen.getXML(l_ctx);
dbms_xmlgen.closeContext(l_ctx);
insert into nk values (l_xml);
end; -
I have an infopath form that is getting the error when opening an existing form or creating a new form:-
Warning
An error occurred querying a data source.
Click OK to resume filling out the form. You may want to check your form data for errors.
Hide error details
An error occurred while trying to connect to a Web service.
Correlation ID:7ab6be2c-60e1-4025-be1e-1a2fbe00acd3
So I know its a permission issue because full control users have no problem. I have found a suggestion here suggesting making sure the group has "Who can View Membership to the Group" but that didn't work for me - and
my test user is only a member of one group -
http://sharepoint.stackexchange.com/questions/109488/usergroup-asmx-returns-unauthorized-for-some-groups
How can I get around this without provding users Full Control?So I fixed this with exactly what I mentioned above by adding "everyone" "Who can View Membership to the Group" permission. My error initially was that I was looking at the incorrect security group.
-
Problem inserting and querying XML data with a recursive XML schema
Hello,
I'm facing a problem with querying XML data that is valid against a recursive XML Schema. I have got a table category that stores data as binary XML using Oracle 11g Rel 2 on Windows XP. The XML Schema is the following:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexType name="bold_type" mixed="true">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="bold" type="bold_type"/>
<xs:element name="keyword" type="keyword_type"/>
<xs:element name="emph" type="emph_type"/>
</xs:choice>
</xs:complexType>
<xs:complexType name="keyword_type" mixed="true">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="bold" type="bold_type"/>
<xs:element name="keyword" type="keyword_type"/>
<xs:element name="emph" type="emph_type"/>
<xs:element name="plain_text" type="xs:string"/>
</xs:choice>
</xs:complexType>
<xs:complexType name="emph_type" mixed="true">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="bold" type="bold_type"/>
<xs:element name="keyword" type="keyword_type"/>
<xs:element name="emph" type="emph_type"/>
</xs:choice>
</xs:complexType>
<xs:complexType name="text_type" mixed="true">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="bold" type="bold_type"/>
<xs:element name="keyword" type="keyword_type"/>
<xs:element name="emph" type="emph_type"/>
</xs:choice>
</xs:complexType>
<xs:complexType name="parlist_type">
<xs:sequence>
<xs:element name="listitem" minOccurs="0" maxOccurs="unbounded" type="listitem_type"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="listitem_type">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="parlist" type="parlist_type"/>
<xs:element name="text" type="text_type"/>
</xs:choice>
</xs:complexType>
<xs:element name="category">
<xs:complexType>
<xs:sequence>
<xs:element name="name"/>
<xs:element name="description">
<xs:complexType>
<xs:choice>
<xs:element name="text" type="text_type"/>
<xs:element name="parlist" type="parlist_type"/>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="id"/>
</xs:complexType>
</xs:element>
</xs:schema>I registered this schema and created the category table. Then I inserted a new row using the code below:
insert into category_a values
(XMlElement("category",
xmlattributes('categoryAAA' as "id"),
xmlforest ('ma categ' as "name"),
(xmlelement("description", (xmlelement("text", 'find doors blest now whiles favours carriage tailor spacious senses defect threat ope willow please exeunt truest assembly <keyword> staring travels <bold> balthasar parts attach </bold> enshelter two <emph> inconsiderate ways preventions </emph> preventions clasps better affections comes perish </keyword> lucretia permit street full meddle yond general nature whipp <emph> lowness </emph> grievous pedro')))
The row is successfully inserted as witnessed by the results of row counting. However, I cannot extract data from the table. First, I tried using SqlPlus* which hangs up and quits after a while. I then tried to use SQL Developer, but haven't got any result. Here follow some examples of queries and their results in SQL Developer:
Query 1
select * from category
Result : the whole row is returned
Query 2
select xmlquery('$p/category/description' passing object_value as "p" returning content) from category
Result: "SYS.XMLTYPE"
now I tried to fully respect the nested structure of description element in order to extract the text portion of <bold> using this query
Query 3
select xmlquery('$p/category/description/text/keyword/bold/text()' passing object_value as "p" returning content) from category_a
Result: null
and also tried to extract the text portion of element <text> using this query
Query 4
select xmlquery('$p/category/description/text/text()' passing object_value as "p" returning content) from category_a
Result: "SYS.XMLTYPE".
On the other hand, I noticed, from the result of query 1, that the opening tags of elements keyword and bold are encoded as the less than operator "<". This explains why query 3 returns NULL. However, query 4 should display the text content of <text>, which is not the case.
My questions are about
1. How to properly insert the XML data while preserving the tags (especially the opening tag).
2. How to display the data (the text portion of the main Element or of the nested elements).
The problem about question 1 is that it is quite unfeasible to write a unique insert statement because the structure of <description> is recursive. In other words, if the structure of <description> was not recursive, it would be possible to embed the elements using the xmlelement function during the insertion.
In fact, I need to insert the content of <description> from a source table (called category_a) into a target table (+category_b+) automatically .
I filled category_a using the Saxloader utility from an flat XML file that I have generated from a benchmark. The content of <description> is different from one row to another but it is always valid with regards to the XML Schema. The data is properly inserted as witnessed by the "select * from category_a" instruction (500 row inserted). Besides, the opening tags of the nested elements under <description> are preserved (no "<"). Then I wrote a PL/SQL procedure in which a cursor extracts the category id and category name into varchar2 variables and description into an XMLtype variable from category_a. When I try to insert the values into a category_b, I get the follwing error:
LSX-00213: only 0 occurrences of particle "text", minimum is 1which tells that the <text> element is absent (actually it is present in the source table).
So, my third question is why are not the tags recognized during the insertion?
Can anyone help please?Hello,
indded, I was using an old version of Sqlplus* (8.0.60.0.0) because I had a previous installation (oracle 10g XE). Instead, I used the Sqlplus* shipped with the 11g2database (version 11.2.0.1.0). All the queries that I wrote work fine and display the data correctly.
I also used the XMLSERIALIZE function and can now display the description content in SQL Developer.
Thank you very much.
To answer your question Marco, I registered the XML Schema using the following code
declare
doc varchar2(4000) := '<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexType name="bold_type" mixed="true">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="bold" type="bold_type"/>
<xs:element name="keyword" type="keyword_type"/>
<xs:element name="emph" type="emph_type"/>
</xs:choice>
</xs:complexType>
<xs:complexType name="keyword_type" mixed="true">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="bold" type="bold_type"/>
<xs:element name="keyword" type="keyword_type"/>
<xs:element name="emph" type="emph_type"/>
<xs:element name="plain_text" type="xs:string"/>
</xs:choice>
</xs:complexType>
<xs:complexType name="emph_type" mixed="true">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="bold" type="bold_type"/>
<xs:element name="keyword" type="keyword_type"/>
<xs:element name="emph" type="emph_type"/>
</xs:choice>
</xs:complexType>
<xs:complexType name="text_type" mixed="true">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="bold" type="bold_type"/>
<xs:element name="keyword" type="keyword_type"/>
<xs:element name="emph" type="emph_type"/>
</xs:choice>
</xs:complexType>
<xs:complexType name="parlist_type">
<xs:sequence>
<xs:element name="listitem" minOccurs="0" maxOccurs="unbounded" type="listitem_type"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="listitem_type">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="parlist" type="parlist_type"/>
<xs:element name="text" type="text_type"/>
</xs:choice>
</xs:complexType>
<xs:element name="category">
<xs:complexType>
<xs:sequence>
<xs:element name="name"/>
<xs:element name="description">
<xs:complexType>
<xs:choice>
<xs:element name="text" type="text_type"/>
<xs:element name="parlist" type="parlist_type"/>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="id"/>
</xs:complexType>
</xs:element>
</xs:schema>';
begin
dbms_xmlschema.registerSchema('/xmldb/category_auction.xsd', doc, LOCAL => FALSE,
GENTYPES => FALSE, GENBEAN => FALSE, GENTABLES => FALSE,
FORCE => FALSE,
OPTIONS => DBMS_XMLSCHEMA.REGISTER_BINARYXML,
OWNER => USER);
end;then, I created the Category table as follows:
CREATE TABLE category_a of XMLType XMLTYPE store AS BINARY XML
XMLSCHEMA "xmldb/category_auction.xsd" ELEMENT "category";Now, there still remains a problem of how to insert the "description" content which I serialized as a CLOB data into another table as XML. To this purpose, I wrote a view over the Category_a table as follows:
CREATE OR REPLACE FORCE VIEW "AUCTION_XWH"."CATEGORY_V" ("CATEGORY_ID", "CNAME", "DESCRIPTION") AS
select category_v."CATEGORY_ID",category_v."CNAME",
XMLSerialize(content ( xmlquery('$p/category/description/*' passing object_value as "p" returning content)) as clob) as "DESCRIPTION"
from auction.category_a p,
xmltable ('$a/category' passing p.Object_Value as "a"
columns category_id varchar2(15) path '@id',
cname varchar2(20) path 'name') category_v;Then, I wrote a procedure to insert data into the Category_xwh table (the source and target tables are slightly different: the common elements are just copied wereas new elements are created in the target table). The code of the procedure is the following:
create or replace PROCEDURE I_CATEGORY AS
v_cname VARCHAR2(30);
v_description clob ;
v_category_id VARCHAR2(15);
cursor mycursor is select category_id, cname, description from category_v;
BEGIN
open mycursor;
loop
/*retrieving the columns*/
fetch mycursor into v_category_id, v_cname, v_description ;
exit when mycursor%notfound;
insert into category_xwh values
(XMlElement("category",
xmlattributes(v_category_id as "category_id"),
xmlelement("Hierarchies", xmlelement("ObjHierarchy", xmlelement ("H_Cat"),
xmlelement ("Rollsup",
(xmlelement("all_categories",
xmlattributes('allcategories' as "all_category_id")))
xmlforest (
v_cname as "cat_name",
v_description as "description")
end loop;
commit;
close mycursor;
END I_CATEGORY;When I execute the procedure, I get the following error:
LSX-00201: contents of "description" should be elements onlyso, I just wonder if this is because v_description is considered as plain text and not as XML text, even if its content is XML. Do I need to use a special function to cast the CLOB as XML?
Thanks for your help.
Doulkifli -
How can I make a query by date with several TDMS files?
Hi,
I have a project that can write and read TDMS files everyday (a file for each day with date and time). There, I can import those files to excel (I choose a file and load it). But, I have a question: How can I make a query by date with those TDMS files? I'd like make a time stamp for start date and stop date, where I could compare the TDMS file dates and sum the values that are in the channels where these files are similar. For example, I save a file with "02/01/2013" name, in other day "03/01/2013", in other day "04/01/2013"... so, i'd like put in time stamp for start date "02/01/2013" file and to stop date "04/01/2013" file, than, sum all values that range with my TDMS files existing. How can I make that?
Thanks all,
ValHello Val_Auto.
You're Brazilian, no? Me too. = ^ - ^ =
I converted VI to version of your LabVIEW (8.5). Is attached in this reply.
This VI search all your TDMS in a range of dates and join them in a single TDMS. I hope this is what you wanted.
Query TDMS is the main VI. The TDMS VI Search changes the date format that out from calendar control (which is DD / MM / YYYY) to DD-MM-YYYY. This is because you can't name files using "/". I chose "-" but, if necessary, you should change to keep the same format of your TDMS files.
If you have any doubt as to its operation or how to make changes to adapt VI for your application, keep at your disposal.
Thank you for your contact; I hope have helped you and succeed in your application.
Wesley Rocha
Application Engineer
National Instruments Brazil
Visite a nossa comunidade em PORTUGUÊS!!!
Attachments:
Query TDMS.vi 62 KB
tdms search.vi 24 KB -
Oracle 10g Query on Date Column
Hello -
What is the most efficient way to query on a date column to get all dates within the last 2 months? I use something like the following in the WHERE clause:
billing_date >= to_date(add_months(sysdate, -2))
However, I can't ever get the index on billing_date to be used.
Any help is greatly appreciated...
Thanks!!This is a perfectly valid way to query the data. Here's an example on my own production tables. This one has about 300 million rows:
select *
from prod.tran_history
where tran_date >= to_date(add_months(sysdate, -2))
| Id | Operation | Name | Rows | Bytes | Cost |
| 0 | SELECT STATEMENT | | 11M| 863M| 146K|
| 1 | TABLE ACCESS BY INDEX ROWID| TRAN_HISTORY | 11M| 863M| 146K|
|* 2 | INDEX RANGE SCAN | TRAN_HIST_DATE_IDX | 2144K| | 2098 |
-------------------------------------------------------------------------------------------- -
" Query regarding Data transfer from Bi to BO Tool "
Dear Friends,
I am having a query. I have created a Info-cube and established the universe on the top of the Info-cube.The Dat is coming in the Bi system. When I created a new Webi-report the Data from the ino-cube in the universe is not reflecting the Webi-report .
Can anyone tell me the solution for the Data Load in the Webi-report .Hi,
There are two ways to design universe on top of cube/Query.
1)Olap Universe :Please go through by below link for how to create mdx universe.by this way create one connection and select cube or query and by default designer will replicate cube/query in the universe.
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/903a7fc7-19e8-2d10-fa95-b050de946b61?quicklink=index&overridelayout=true
2) Create Data federator project on top of Cube and then design universe.
To pull data in the webi report create universe then select objects and run the query.If data is available in the cube or query that will come in the webi report.
I have already said webi report pull data at run time.there is no need or no way to load data in the universe or webi.
Design a universe and create webi or deski report on top of universe.
For more information you can search on net can be found documents how to create report.
Hope this helps you.
Thanks,
Amit -
In Query mode, date items does not accepts more than 10 characters..Why?
Dear All,
In my form, While querying my date items, it does not accepts more than 10 Characters. Could it be changeable.
Actually i want to search like greater than specified date( >01/01/2007 ).
But i can specify like >01/01/07. After tabbing out from that item, it displays like >01/01/200.
How to overcome this issue.
Please help.
Regards,
BalajiYou are absoletely correct Francois!
Previously i have made a mistake that both of my maximum length and query length property to 20. That time it was not worked. Now i changed my maximum length to the old one like 11 and i changed only the query length to 20.
Now it is working. I understood the concept wrongly.
Thanks Francois! -
Can we create range variable for Query Key Date
Hello Gurus,
Can we create a range variable for Query Key Date ? when I tried to give a range of values for Query Key Date, I am unable to find Range Values option. I found only Single Values.
so, Please let me know if we can use Range variables for Query Key Date ??
Thanks in advance,
Regards,
AarthiHi Aarthi,
This is relevant for the time dependant master data that is being pulled in thw query. Like if you are using a nav attr in the query and this nav attr is time dependant, then which record (from the char master data) is to be pulled into the report, depends upon the key date that you specify.
The default key date value is the date on which the query is executed, that is <Today>.
Hope this helps...
Maybe you are looking for
-
can somebody please tell me how to fix this. when i try to install appleworks this pops up so please help me i need to get this on my mac
-
IPod mini 6GB not recognized by PC or iTunes
I am unable to get my daughter's iPod mini 6GB to be recognized on any of our three PCs or laptop. The iPod has been working fine with all of them the past 1.5 years. All PCs are running Windows XP SP2. Initially, the iPod appeared to be dead, but th
-
My Experience w/Pristine Locked 1.1.1 Failure
I updated my pristine, unhacked, locked iPhone shortly after the update came out. I encountered an error, which forced my phone suddenly and irreversably into a complete restore mode. I called Apple, got through quickly to a rep, quickly got accelera
-
Im copying some old movies I have on VHS to DVD using my Panasonic DVD recorder..I want now convert these movies for my Ipod touch,,but when I open the burned disc on my mac...There's like 0 files empty..but when I play it in the DVD player it plays
-
How do I set up ntlworld email that goes through windows live
Trying to configure my mother in laws email. She uses an NTWWorld email account but through a windows live account on her PC. For some reason they don't work the same, she has different folders in her windows live to when she opens it through the bro