How to write a simple select query to get the data of the table as an XML.
How to write a simple select query to get the data of the table as an XML. In the query, I'm just adding items below which i need be there in the XML documentselect '<test_tag>'||EMP_NAME||'</test_tag>','<date>'||sysdate||'</date>'
from temp_table where id_num BETWEEN 1 AND 10;
I have need to add the root tag as well in the beginning and the end of < root > < / root > this xml file. Please advice if this is possible with the select querywithout using XMLGEN, XMLQUERY or any other packages built and function?
I need to URL escapes with the UTF-8 code points that we have already achieved using the utl_http package. Please help how to do that without using the utl_http package.
What is wrong with him?
At present, the only way I can think of to avoid a call to UTL_HTTP. SET_BODY_CHARSET is to write your own little wrapper.
In this way, you can specify the Boolean parameter or omit it if you choose to use named parameters:
SQL> create or replace function my_url_escape (url in varchar2)
2 return varchar2
3 deterministic
4 is
5 begin
6 return utl_url.escape(url, false, 'AL32UTF8');
7 end;
8 /
Function created
SQL> select my_url_escape('http://some.uri.com/param?lang=fr&text=contrôle') from dual;
MY_URL_ESCAPE('HTTP://SOME.URI
--------------------------------------------------------------------------------
http://some.uri.com/param?lang=fr&text=contr%C3%B4le
Tags: Database
Similar Questions
-
How to write 'AND' and 'OR' query
Oracle: 11 GR 2
OS: Linux
Friends, I am rewriting the simple select query that really takes time.
Some experts can let me know how else I can rewrite below for better performance?
SELECT username
To apu app_users
WHERE)
(user_access_pkg.functionRights (apu.username, 'FINANCE') = 'Z'
AND user_access_pkg.functionRights (apu.username, 'NON_FINANCE') = 'Z '.
)
OR user_access_pkg.functionRights (apu.username, 'MAJOR') = 'Z '.
);
Table has 1.5 mil rows with indexes.
I checked explain plan and does Oracle INDEX_FULL_SCAN
Table / index stats are uptodate.
Thanks, Mike
Friends, I am rewriting the simple select query that really takes time.
Sorry - I don't know what "very long" is supposed to mean.
Some experts can let me know how else I can rewrite below for better performance?
SELECT username
To apu app_users
WHERE)
(user_access_pkg.functionRights (apu.username, 'FINANCE') = 'Z'
AND user_access_pkg.functionRights (apu.username, 'NON_FINANCE') = 'Z '.
)
OR user_access_pkg.functionRights (apu.username, 'MAJOR') = 'Z '.
);
Why do you use a function instead of SQL tables?
That each of these predicates mean?
You call the same function THREE times and Oracle has no way of knowing what will be the real function cardinality unless you manually create the appropriate statistics.
The most likely cause of any performance issue is the function and had to call three times.
View code for the function, so we can see what he does.
If you use such a function, you have to set the predicate checks in the function itself, so they can be applied in the execution of the function.
-
I'm new in indesign scripting, please tell me how to write a script to get the contents of an XML element and then sort all the content
Hello
Can the code below is useful for you, but I do not know how to sort.
Change the tag based on your employment application.
-
A select statement to get the current pay rate.
If someone can share with me a select statement to get the current salary?Try the PER_PAY_PROPOSALS table with the fields Pay_xxxx.
See if the following threads help
Query to find the salary of the employee details in HRMS
HR Payroll - how to calculate the average hourly rate for workersSandeep Gandhi
-
How to use tio as textitem operator to get the name
Oracle forms6i
Hai All
I created a form to create a list of hierarchy. I got a Text_item how can I use as an operator to get the name to select it. What trigger, I need to use. When I select the name I need to get his employee ID and other details
Thanks in advance
Srikkanth.MA is the head of Dept 10 and three people are under to know
How will you know that B, C and D are under A is there any child-parent relationship between Manager and employee code? If so, you can then create the relationship between the blocks don't need to programmatically set the where_clause. Thus, the relationship can be as...
leader_block.emp_code = emp_block.leader_code AND leader_blokc.dep_code = emp_block.dep_code
Thus, when you interrogate data in block LEADER it will show employees under CHIEF who ask block LEADER.
Or if there is no relationship then how will you know what employee under what leader?
002 10 1 b
1-10-003 c
1-10-004 d
When I enter the Department name of the corresponding head of other members and you need to display in the
TabularOr if you want to query records only for the service relationship. As you say you create two blocks and then create the relationship using dep_code between blocks.
as...leader.dep_code = emp_block.dep_code
-Clément
-
By using the Microsoft XPS document Writer print driver, I no longer get the XPS files indexed.
Open the file "print" with the XPS Viewer XPS and while trying to search inside, I get this message:The XPS Viewer has finished searching for the document. The search item was not found.
There is no searchable text in this document.I have 'print' some of my pages on the Bank, internet bank that every now and then I get a searchable history on disk, and opening a XPS I created in April (2011), the text is perfectly accessible, and I can select text with the mouse. However, the next printed file may, the entire document more like a picture. Nothing can be selected, and the message shown above, appears when you try to search for in the document.
What could be the error? Can I change something to get back to normal "text printing" or is this a deliberate, change that has been installed from Windows update or even?
Hello
1. what changes have been made to your machine before the problem?
I suggest that you follow the steps below and check if the problem persists.
Step 1:
Refer to this document to ensure that the settings are correct for Microsoft XPS Document Writer.
See also: print in Microsoft XPS Document Writer
Step 2:
Perform the System Restore to the point that your XPS Document Writer worked very well.
-
How do I get the table cells?
It's my get code that any object in propagation.
Int32 childCount = parent-> GetChildCount();
for (int32 /IndexEnfant = 0; childIndex < childCount; /IndexEnfant ++)
{
InterfacePtr < IHierarchy > child (parent-> QueryChild (childIndex));
ChildUIDRef = UIDRef: GetUIDRef (child);
TextFrame table
}
How do I get the table cells?
You can access the table using ITableModel and GridAddresscell.
But to get to the ITableModel since ITextModel implies some complexity.
Few things to understand:
-L'interface that corresponds to the written document is ITextModel
-The recommended method to iterate tables in a story done by ITextStoryThreadDictHier
-Get the ITextStoryThreadDictHier on the history and the main thread as ITextStoryThreadDictHier::NextUID()
-Now get ITextStoryThreadDict for UID and query for ITableModel. If you get ITableModel, then you have found the table.
Once you have ITableModel you can get ITableCell as follows:
ITableModel:QueryCellContentBoss(GridAddress); Give ITableCell
You can refer to SnipperRunner (SnpManipulateTextModel).
Download text template table model:
InterfacePtr
textModel (storyUIDRef, UseDefaultIID()); InterfacePtr
textStoryDictHier (textModel, UseDefaultIID()); NextUID UID = sourceStory.GetUID (); / / Download the main thread dictionary
Now loop the dicthier to iterate through all the threads dicts.
InterfacePtr
textStoryThreadDict (sourceStory.GetDataBase (), nextUID, UseDefaultIID()); InterfacePtr
tableModel (textStoryThreadDict, UseDefaultIID()); If (tableModel) / / the storythreaddict represents a table
{
You are now in a table
}
-
SQL query to get the NULL records after the last matching flag
I have a xx1 table with id and flag columns. So I want the data in this table, after the last flag matched. I want that data to id 7 in the rooms. Even if the id 2,3,5 are null flag 'Y' was at 6. ID so I need a query to get the data of the xx1 table after the last correspondence flag (from 7 to 9 id).
SQL > create table xx1
2 (identification number,
3 flag varchar2 (10));
Table created.
SQL > insert into xx1 values (1, 'Y');
1 line of creation.
SQL > insert into values xx1 (2, null);
1 line of creation.
SQL > insert into values xx1 (3, null);
1 line of creation.
SQL > insert into xx1 values (4, 'Y');
1 line of creation.
SQL > insert into values xx1 (5, null);
1 line of creation.
SQL > insert into xx1 values (6, 'Y');
1 line of creation.
SQL > insert into values xx1 (7, null);
1 line of creation.
SQL > insert into values xx1 (8, null);
1 line of creation.
SQL > insert into values xx1 (9, null);
1 line of creation.
SQL > select * from xx1.
FLAG OF THE ID
---------- ----------
1. IS
2
3
4. IS
5
6. IS
7
8
9
9 selected lines.
SQL >
Hello
user11164339 wrote:
Hi Frank - when I run the query, I don't see the results data.
I get
FLAG OF THE ID
----- ----------
7
8
9
What you do differently?
-
Need a sql query to get several dates in rows
Hi all
I need a query to get the dates of the last 7 days and each dates must be in a line...
but select sysdate double... gives a line...
Output of expexcted
Dates:
October 1, 2013
30 sep-2013
29 sep-2013
28 sep-2013
27 sep-2013
26 sep-2013
Try:
SQL > SELECT sysdate-7 + LEVEL FROM DUAL
2. CONNECT BY LEVEL<=>=>
3 * ORDER BY 1 DESC
SQL > /.
SYSDATE-LEVEL 7 +.
-----------------------------
October 1, 2013 13:04:52
30 - Sep - 2013 13:04:52
29 - Sep - 2013 13:04:52
28 - Sep - 2013 13:04:52
27 - Sep - 2013 13:04:52
26 - Sep - 2013 13:04:52
25 - Sep - 2013 13:04:52
7 selected lines.
-
IOM sql Query to get the status of the failed task
Hello world
We have an obligation as we need to get the status of a particular task (say Create User in OID - Completed\Rejected status resource) for the particular user. We are able to get the status of the provisioed of resources to the user but not the status of the special mission which is trigerred for the user.can someone put some light on it. We must have the SQL query to do this.
Thanks in advance.
Kind regards
MKNHello
Use this query to get the status of the task, also check the coomentsSELECT USR. USR_LOGIN, OSI. SCH_KEY, ANN. SCH_STATUS, STA. STA_BUCKET OF
OSI, CHS, STA, MIL, TOS, PKG, OUEDRAOGO, USR, OBJ, OST
WHERE OSI.MIL_KEY = MIL.MIL_KEY
AND ANN. SCH_KEY = OSI. SCH_KEY
AND STA. STA_STATUS = SCH. SCH_STATUS
AND TOS. PKG_KEY = PKG. PKG_KEY
AND MIL. TOS_KEY = TOS. TOS_KEY
AND OUÉDRAOGO. USR_KEY = USR. USR_KEY
AND OUÉDRAOGO. OST_KEY = OST. OST_KEY
AND OST. OBJ_KEY = OBJ. OBJ_KEY
AND OSI. ORC_KEY = OUEDRAOGO. ORC_KEY
AND OBJ. OBJ_NAME = "User AD".
AND OST. OST_STATUS = "Provisioning" - filter accordinglly
AND STA. STA_BUCKET = 'pending' - filter accordinglly
AND PKG. PKG_NAME = "AD User" - filter accordinglly
AND MIL.MIL_NAME = 'System' - filter accordinglly Validation
;
Thank you
Kuldeep -
Query to get the data of the column and the metadata in the same set of results.
Is it possible to build a query to get the values of the columns in a table and also be able to get some metadata (data type, data_length, data_precision, data_scale) for columns in the same set of results.If I use a join, have a common value to join on the two tables?
you use a cross join, not requiring common values.
create table T (n number, d date, v varchar2(30)); insert into T values (1,sysdate,'ABC'); commit; select C.column_name, c.data_type, c.data_length, case c.column_id when 1 then to_char(T.N) when 2 then to_char(T.D) when 3 then T.V end VALUE from USER_TAB_COLUMNS C, T where C.table_name='T' order by c.column_id;
-
Several feature selection to row in the table
Hello
I have a group with the style of layout table and I want to set the the "multiple" generated table rowSelection property but it seems there is no way to do unless you are using the group as LOV, which is not desirable for me to JHs. The following code shows how to set this property in tableGroup.vm:
#if (! ($JHS.current.group.useAsLov & & $JHS.current.group.multiSelect))
selectionListener = "#{#BINDINGS_TABLE (). collectionModel.makeCurrent}.
rowSelection = 'single '.
#if (! $JHS.current.group.useAsLov)
selectedRowKeys = ' #{#TABLE_BEAN () .selectedRow} ".
#end
#else
rowSelection = "multiple".
selectedRowKeys = ' #{#LOV_PAGE_BEAN () .selectedRowKeySet} ".
selectionListener = "#{#LOV_PAGE_BEAN () .selectionListener}".
#end
Is there a reason for not allowing to have several feature selection of line in the table when it is not in mode LOV?
Thank you
Will doWill do,
No, but if you want to have multiple selection, there is typically a custom action that you want to apply to selected lines, which cannot be defined in the Jheadstart Application definition editor.
However, it is perfectly well use a custom template tableGroup.vm and allow multiple selection.Steven Davelaar,
JHeadstart team. -
Hello
I lost the password I gave to a drive using Bitlocker in Windows 7, how can I return it or I can get the data in the back of the player? Data are very important because by my studies are concerned. Help, please. Thank you!Hello
I lost the password I gave to a drive using Bitlocker in Windows 7, how can I return it or I can get the data in the back of the player? Data are very important because by my studies are concerned. Help, please. Thank you!People like you that encryption data with bitlocker do it because they want their data accessible only by those who have the certificate. The sad news for you is that you have made a good choice with BitLocker: unless you have the certificate, your data remains inaccessible. There is no backdoor. If he had then BitLocker would be useless. -
Everytime I open my site I get this error "MuseJSAssert: Errot calling function selection: TypeError: cannot get the"init"reference to undefined property or null" and I was a newbie am not able to solve this problem.
I did take all measures please help.
Hello
Can try you it on another browser that the problem does not come up on top of our end.?
Kind regards
Akshay
-
How to write this Simple query?
Select * from student
where
(select count (first_name) of student) > 1;
Basically I want a list of student table where the counties of first names are more than 1. However he shows me the output for
Select * from student;
any suggestions?
Hello
2776946 wrote:
Select * from student
where
(select count (first_name) of student) > 1;
Basically I want a list of student table where the counties of first names are more than 1. However he shows me the output for
Select * from student;
any suggestions?
Think about it. The subquery tells you the number of rows in all of the table have a first name. It will always tell you the number of rows in all of the table name. You don't want to know how many rows in the table have a name, you want to know how many rows in the table have the same name.
One way to do is a correlated subquery:
Select *.
student m-m is for hand query
where)
SELECT count (*)
student s-s is for the subquery
where s.first_name = m.first_name
) > 1
;
Maybe you are looking for
-
I have updated to iOS 9.3 and now netflix don't stream.
After update my iOS 9.3.1 netflix iPadto don't broadcast the content. The site is fine and netflix works great on my apple TV, but does not work on my iPad. IPad video stream fine and I've deleted and reinstalled the app, but still only get the spinn
-
Can I use a GPIB PCI instead has a HP 82350
Can I use a card NI PCI-GPIB IEEE 488.2 in instead of a map of 82350 HP. I want to configure a 5890 II to a PC running Windows 2000 with the Chemstation B02.01 software. Sorry - Posted two places.
-
I love to see the name of the folder on the picture, then I remember where the photo was taken.
-
New computer: this copy of Windows is not genuine
Have tried similar displayed using questions-no solutions 2 new computers in December with Win 7 Pro OEM installed. First they say this isn't a real edition ran MGADiag Diagnostic report (1.9.0027.0):-----------------------------------------Validatio
-
Whenever I run a command prompt on my Windows 7 laptop, the only so he can close when I'm done, is to restart the computer. I know there must be a way out of this thing. In addition, I am a blind person, and it is quite possible that I don't see a b