How to create xml file from Oracle and sending the same xml file to an url
How to create xml file from Oracle and sending the same xml file to an url
SQL/XML (XMLElement, XMLForest, XMLAgg, etc) and UTL_HTTP.
Whether that works for you with the version of Oracle you have, your requirements, and needs is another story. A little detail goes a long way.
Similar Messages
-
How to create a procedure in oracle to write the data into file
Hi All,
I am just wondered on how to create a procedure which will do following tasks:
1. Concat the field names
2. Union all the particular fields
3. Convert the date field into IST
4. Prepare the statement
5. write the data into a file
Basically what I am trying to achieve is to convert one mysql proc to oracle. MySQL Proc is as follows:
DELIMITER $$
USE `jioworld`$$
DROP PROCEDURE IF EXISTS `usersReport`$$
CREATE DEFINER=`root`@`%` PROCEDURE `usersReport`(IN pathFile VARCHAR(255),IN startDate TIMESTAMP,IN endDate TIMESTAMP )
BEGIN
SET @a= CONCAT("(SELECT 'User ID','Account ID','Gender','Birthdate','Account Registered On') UNION ALL (SELECT IFNULL(a.riluid,''),IFNULL(a.rilaccountid,''),IFNULL(a.gender,''),IFNULL(a.birthdate,''),IFNULL(CONVERT_TZ(a.creationDate,'+0:00','+5:30'),'') INTO OUTFILE '",pathFile,"' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '' LINES TERMINATED BY '\n' FROM account_ a where a.creationDate>='",startDate,"' and a.creationdate <='",endDate,"')");
PREPARE stmt FROM @a;
EXECUTE stmt;
DEALLOCATE PREPARE stmt ;
END$$
DELIMITER ;
Regards,
Vishal G1. Concat the field names
Double Pipe (||) is the concatenation operator in Oracle. There is also a function CONCAT for this purpose
2. Union all the particular fields
Not sure what do you mean by UNION ALL particular fields? UNION ALL is a set operation applied on two different result sets that have the same projection.
3. Convert the date field into IST
SQL> select systimestamp "Default Time"
2 , systimestamp at time zone 'Asia/Calcutta' "IST Time"
3 from dual;
Default Time IST Time
05-05-15 03:14:52.346099 AM -04:00 05-05-15 12:44:52.346099 PM ASIA/CALCUTTA
4. Prepare the statement
What do you mean by prepare the statement?
5. write the data into a file
You can use the API UTL_FILE to write to a file. -
Zip'ing files from multiple folders to the same zip file
Could somebody recommend a method to create a zip file with file contents from multiple folders? Or is there an application I can drag and drop a bunch of files to zip em?
First highlight all of the folders or files. If they're not right next to each other, or on the same drives, hold down the Command key while clicking to choose the next without losing previous choices.
Once they're all highlighted, right click on any highlighted item and choose "Compress xxx Items". -
Using XML extraction from Oracle and XSLT data transformation
Hi
How can transfer data ie: Using XML extraction from Oracle and XSLT data transformation with java application?
usually i use to do querying sql, getting data from table assinging to model class then send it to UI. how can i go for XML extraction form oracle?
thanksSorry, I don't understand what exactly you want to do. And I'm under the impression that you might not know exactly what you want to do as well. Could you explain a bit more detailed what you want to achieve?
-
How to create database link from oracle to sql server
Please help with how to create database link from oracle to sql server
Best regards,
VishalPlease help with how to create database link from oracle to sql server
Best regards,
Vishal
Hi Vishal,
I found a lof of information regarding how to create a database link from Oracle to SQL Server, please see:
https://www.google.co.in/?gws_rd=cr&ei=vd3XUvGFO8TgkAXqlYCADg#q=how+to+create+database+link+from+oracle+to+sql+server
We discuss SQL Server related issue in this forum. If you have any more question regarding Oracle, please post it in Oracle communities forum for better support.
Regards,
Elvis Long
TechNet Community Support -
I have installed itunes 11.0.2.26. When I delete a file or podcast I am not being prompted to delete the file from its folder at the same time. How do I restore this facility? I am running a 64bit Windows 7 OS
Is the media files in question in the iTunes library or elsewhere on the computer?
-
I had to reset my Apple password and now my iTunes and iCloud passwords no longer work. How do I get them linked again and under the same password. I've tried my new password on each login screen and it isn't accepted.
Hi skippy2012trev,
Welcome to the Apple Support Communities!
I understand that you updated your Apple Id and password but now you are being prompted for the old information in iCloud. You are on the right track by changing the Apple ID back to the previous email address temporarily so that you can sign out. You should not need to verify the email address. After you edit the Apple ID back to the old email address and then sign out of iCloud on your iPhone, edit the Apple ID back to the address you would currently like to use. There is no need to change the password again, only the email address, unless you prefer to update the password again.
If you're asked for the password to your previous Apple ID when signing out of iCloud - Apple Support
Change your Apple ID temporarily
If signing out and back in to iMessage or FaceTime didn't help, try these steps:
Change your Apple ID to the Apple ID you used previously. You shouldn't need to verify the email address.
Tap Settings > iCloud. Complete these steps only if the Find My [Device] setting is turned on:
Scroll down and tap Sign Out, then tap Sign Out to confirm. If you're using iOS 7 or earlier, tap Delete Account, then tap Delete to confirm.
Tap Keep on My [Device] or Delete from My [Device]. In either case, your data remains in iCloud and will be updated on your device when you sign in to iCloud again.
Enter the password for your previous Apple ID.
Change your Apple ID to the new email address that you want to use. You'll need to verify the email address.
Return to Settings > iCloud and sign in with your new Apple ID.
Cheers,
Joe -
How to create a user y which will have the same content of existing user x
how to create a user y which will have the same content of existing user x ,
like all the tables,procedures,functions and packagesYou can do the following.
1. Use CREATE USER to create the new account/schema
2. Use exp to export old schema
3 Use imp with fromuser=<old user> and touser=<newuser> -
How to assign a button for attachment and send the data through browser ?
Hi friends,
How to convert to browser ?
how to assign a button for attachment and send the data through browser ?
Thanking you.
Regards
Subash.Refer to
How to create a text box in ascreen painter?
where another user (venkateshwar reddy) has asked a very similar question...
Jonathan -
we have three discussions forums with same subject. whenever a post gets new reply in one forum, it should automatically trigger workflow functionality to check conditions and send the same reply to other synchronized forums.
Rajiv KumarHi,
More details about your discussions forum will make others easier to find a corresponding solution on your requirement.
If you mean there are three Discussion Board list waiting for synchronizing, I would suggest you create an Event Receiver for the three Discussion Board list.
Here is a link with code demo about how to copy items from one Discussion Board to another including Replies:
http://spcodes.blogspot.com/2013/03/programmatically-copy-items-from-one.html
Here is a step by step sample on creating a simple Item added event receiver for Custom List in SharePoint 2010:
http://msdn.microsoft.com/en-us/library/ff398052.aspx
More information on Event Receiver for your reference:
http://msdn.microsoft.com/en-us/library/gg749858(v=office.14).aspx
http://msdn.microsoft.com/en-us/library/ff408183(v=office.14).aspx
Feel free to reply if there are still any questions.
Best regards
Patrick Liang
TechNet Community Support -
How to create database link between oracle and SQL Server
Hello Everyone,
Here i have Oracle Database 9i and SQL Server 2005 databases.
I have some tables in sql server db and i want to access from Oracle.
How to create a database link between these two servers
Thanks,Thanks for Everyone,
I was struggle with this almost 10 days....
I created Database link from Oracle to SQL Server
Now it is fine.........
Here i am giving my servers configuration and proceedure how i created the db link...@
Using Generic Connectivity (HSODBC) we can create db link between Oracle and SQL server.
Machine (1)
DB Version : Oracle 9.2.0.7.0
Operating System : HP-UX Itanuim 64 11.23
IP : 192.168.0.31
Host : abcdbt
Machine (2)
Version : SQL Server 2005
Operating System : Windows server 2003 x86
IP : 192.168.0.175
Host : SQLDEV1
User/PW : sa/abc@123! (Connect to database)
Database : SQLTEST (exsisting)
Table : T (“ T “ is the table existing in SQLTEST database with 10 rows)
Prerequisites in Machine (2):
a) Oracle 10g software
b) User account to access SQL Server database (sa/abc@123!)
c) Existing SQL Server Database (SQLTEST)
d) Tables (testing purpose) (T)
Steps:
1) Install Oracle 10.2.0.1 (Only SW,No need of database) *(Machine 2)*
2) Create a DSN where your windows Oracle 10g SW resides *(Machine 2)*
Control panel >> Administrative Tools >> Data Source (ODBC) >> System DSN ADD
You can follow this link also.....
http://www.databasejournal.com/features/oracle/article.php/3442661/Making-a-Connection-from-Oracle-to-SQL-Server.htm
I created DSN as
DSN name : SQLTEST
User : SA/abc@123! (Existing user account)
Host : 192.168.0.175 (machine 2)
Already I have 1 database in SQL Server with the name SQLTEST
You can create DSN with different name also (not same as db name also)
3) Create a hsodbc init file in $ORACLE_HOME\hs\admin *(Machine 2)*
Create init<DSN NAME> file
Ex: initSQLTEST
Copy inithsodbc to initSQLTEST
And edit
initSQLTEST file
HS_FDS_CONNECT_INFO = SQLTEST <DSN NAME>*
HS_FDS_TRACE_LEVEL = OFF*
save the file....@
4) Configure Listener.ora *(Machine 2)*
LISTENER_NEW =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.175)(PORT = 1525))
SID_LIST_LISTENER_NEW =
(SID_LIST =
(SID_DESC =
(SID_NAME = SQLTEST) *+< Here SQLTEST is DSN NAME >+*
(ORACLE_HOME = G:\oracle 10g\oracle\product\10.2.0\db_1)
(PROGRAM = hsodbc))
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = G:\oracle 10g\oracle\product\10.2.0\db_1)
(PROGRAM = extproc) )
:> lsnrctl start LISTENER_NEW
5) Configure tnsname.ora *(Machine 2)*
SQLTEST11 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.175)(PORT = 1525))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = SQLTEST))
(HS=OK)
:> tnsping SQLTEST11
If No errors then conti….
6) Configure a file *(Machine 1)*
Cd $TNS_ADMIN ($ORACLE_HOME/network/admin)
Create a file
$ vi TEST_abcdbt_ifile.ora
something=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST =192.168.0.175) (PORT=1525))
(CONNECT_DATA=
(SID=SQLTEST))
(HS=OK)
$ tnsping something
$ sqlplus system/manager
Your connected to Oracle database *(machine 1)*
create database link xyz connect to “sa” identified by “abc@123!” using ‘SOMETHING’;
select * from t@xyz;10 rows selected.
Thanks,
Edited by: ram5424 on Feb 10, 2010 7:24 PM -
How to get the value from a JavaScript and send the same to Java file?
Hi.
How to get the value from a JavaScript (this JS is called when an action invoked) and send the value from the JS to a Java file?
Thanks and regards,
Leslie VYes, I am trying with web application.
In the below code, a variable 'message' carries the needed info. I would like to send this 'message' variable with the 'request'.
How to send this 'message' with and to the 'request'?
Thanks for the help :-)
The actual JS code is:
function productdeselection()
var i=0;
var j=0;
var deselectedproduct = new Array(5);
var message = "Are you sure to delete Product ";
mvi=document.forms[0].MVI;
mei=document.forms[0].MEI;
lpi=document.forms[0].LPI;
if(null != mvi)
++i;
if(null != mei )
++i;
if(null != lpi)
++i;
if(null != mvi && mvi.checked)
deselectedproduct[++j]="MVI?";
if(null != mei && mei.checked)
deselectedproduct[++j]="GAP?";
if(null != lpi && lpi.checked)
deselectedproduct[++j]="LPI?";
if( 0!=j)
if(i!=j)
for (x=0; x<deselectedproduct.length; x++)
if(null != deselectedproduct[x])
message =message+ "-" +deselectedproduct[x];
alert(message);
else
//alert(" You cannot remove all products!");
return false;
return true;
} -
Import file from Excel and ignoring the headers
Hi all,
is it possible to import files(spreadsheets) from Excel and ignoring the first row that contains the headers? Since headers might contain special characters such as "\n", "&" and "/", i wonder if you can tell me how to load .xlsx files while ignoring the first line that contains description regarding the header.
ThanksPut a filter on one of the fields on the source data store in your interface. It is likely that your header row will have some unique identifying attribute so filter on that e.g. if you are importing nmeric amount data it is unlikely that your header line contains a numeric value in the amount field but a decription such as "amount", put a filter testing if the value of that field is numeric or not
-
Dear Members,
Greetings for the day!
I am working on NWBC for HTML in Plant Maintenance module.
We have configured some changes in SPRO for customizing the UI elements( like visibility, mandatory ) like tabs and fields in transactions like IW21( Create Notification).
As of now separate parallel configuration needs to be carried out in NWBC for HTML in PM module to achieve the same UI features for creating notifications and this is time consuming.
Is there any way to read the configuration done in SPRO for the SAP GUI's and leverage the same in NWBC for HTML.
Appreciate your time in responding to this.
Thanks & Regards,
Ram.>
<IfModule mod_weblogic.c>
WebLogicCluster 127.0.0.1:7005,127.0.0.1:7007,127.0.0.1:7003,127.0.0.1:7103,127.0.0.1:7104
MatchExpression /app1
</IfModule>
<Location /weblogic>
SetHandler weblogic-handler
WebLogicCluster 127.0.0.1:7003,127.0.0.1:7005,127.0.0.1:7007,127.0.0.1:7103,127.0.0.1:7104
DebugConfigInfo ON
PathTrim /weblogic
</Location>
<IfModule mod_weblogic.c>
WebLogicCluster 127.0.0.1:7003,127.0.0.1:7005,127.0.0.1:7007
MatchExpression /app2
</IfModule>
<Location /weblogic>
SetHandler weblogic-handler
WebLogicCluster 127.0.0.1:7003,127.0.0.1:7005,127.0.0.1:7007
DebugConfigInfo ON
PathTrim /weblogic
</Location>
>
This configuration is weird little bit. There is MatchExpression /app1 and MatchExpression /app2 and at the same time two <Location /weblogic> sections. Are you sure you understand what that configuration stands for?
Try something like this ...
<Location /app1>
SetHandler weblogic-handler
WebLogicCluster 127.0.0.1:7003,127.0.0.1:7005,127.0.0.1:7007,127.0.0.1:7103,127.0.0.1:7104
DebugConfigInfo ON
</Location>
<Location /app2>
SetHandler weblogic-handler
WebLogicCluster 127.0.0.1:7003,127.0.0.1:7005,127.0.0.1:7007
DebugConfigInfo ON
</Location>
where /app1 and /app2 are contexts of your weblogic applications.
http://download.oracle.com/docs/cd/E11035_01/wls100/plugins/apache.html
http://httpd.apache.org/docs/2.0/mod/core.html#location -
Create SP that returns value and at the same time displays query result in output window
I would like create an SP which will return the records from the table and also return value to my c# client application.
For Example:
Select * from employee returns all the query results in output window.
Now I want to create an SP
Create procedure Test
As
Declare @ret int,
Select * from employee
set @ret = Select count(*) from employee
if @ret > 0
return 1
else
return 0
The above algo should return 1 0r 0 to c# client application and at the same time display all employees in sql query output window.
Can u pls help in this regard.The above algo should return 1 0r 0 to c# client application and at the same time display all employees in sql query output window.
Why? and No!
Why? Your procedure generates a resultset of some number of rows. You check the resultset for the presence of rows to determine if "anything is there". You don't need a separate value to tell you this. Note that it helps
to post tsql that is syntactically correct. While we're at it, if you just need to know that rows exist there is no need to count them since that does more work than required. Simply test for existence using the appropriately-named function
"exists". E.g., if exists (select * from dbo.employee).
No! A stored procedure does not display anything anywhere. The application which executes the procedures is responsible for the consumption of the resultset; it chooses what to do and what to display.
Lastly, do not get into the lazy habit of using the asterisk in your tsql code. That is not best practice. Along with that, you should also get into the following best practice habits:
schema-qualify your objects (i.e., dbo.employee)
terminate every statement - it will eventually be required.
Maybe you are looking for
-
EPMMaster.rpd Fusion Pack migration from OBIEE 10g to 11g
We have successfully installed OBIEE 10g and 11g on Windows 2008 32bit servers. On the 10g Installation, we have applied the Fusion Pack EPMMaster RPD file and it connects successfully to our EPM warehouse. We want to migrate the Fusion pack to 11g w
-
Digitizing 23.976 footage, but getting some 29.97 clips
Hi everyone, I'm currently digitizing about 20 hours of footage shot on a Panasonic DVX100 at 23.976 fps. I set my capture to remove the Advanced Pulldown, and things are working OK (the normal TC breaks, etc.). I've had two clips that came into my s
-
MRP - Single Purchase requisition for multiple Items
Hi We have recently introduced MRP module in SAP .In some specific scaeanrios , we want to create a single Purchase Requisition for multiple items .Standard SAP generate different Purchase requisition for each item Is there any way out
-
Fusion log: The operation failed. Bind result: hr = 0x80070002. The system cannot find the file specified. Assembly manager loaded from: C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\clr.dll Running under executable C:\PROGRA~1\MICROS~2\Office12\OUTL
-
I am unable to open the album tab when using I tunes
Iam unable to open my album tab when playing I tunes but can open the song and artists tabs. I am a new user