Read statement to read data and display in output table
hi
consider a scenerio as below
int table in which data i already tehre gt_sagmeld (here primary key is guid_lclic)
and matching field for next select is guid_mobj
not corpar table is joined to butoo by parno.
and primary key of corpar is guid_corpar which has no link to gt_sagmeld
and primary key of but00 is partner and it isjoined to corpar by but00-partner = corpar-parno
adn i need to read but00-bpext
pls see the below seelct statment for it
gt_Saglemd has data...
data: gt_sagmeld_temp like gt_sagmeld.
gt_sagmeld_temp[] = gt_sagmeld[].
delete adjacent duplicates from gt_sagmeld_temp[] comparing guid_mobj
select corpar~PAFCT
corpar~parno
into table gt_corpar
from corpar
for all entries in gt_sagmeld_temp
where /sapsll/corpar~guid_mobj = gt_sagmeld_temp-guid_mobj
and /sapsll/corpar~PAFCT = 'SH'.
sort gt_corpar by parno.
delete adjacent duplicates from gt_corpar comparing parno.
select but000~partner
but000~bpext
from but000 into table gt_but001
for all entries in gt_corpar
where but000~partner = gt_corpar-parno.
now the table gt_but001 contans the required bpext
and i want to read it to outtab
reading...
loop at gt_satmeld into wa_gt_sagmeld
some field selection....
now how to read the bpext in this loop from but001
as there is table corpar also and then but001
read table gt_but000 into wa_but000
with key partner = corpar-parno
...but this will not work as firs i need to read corpar also so how to use the loop or what is procedure to read ...
pls suggest
Hi,
It is very much possible.
1. You can create a new table in SE11/SE12 and u can create this table as a maintainable table( able to maintain entries). An ABAPer can help you to enable this table as maintainable one.
2. If you know the name of the maintainable table, you can maintain entries directly in SM30. If you need a tcode for this, you can also do this by creating a tcode in SE91 for the table.
3. If you know the tcode, you can directly view and download the entries using the tcode itself.
Similar Messages
-
How to read data and load into a table
Hi,
I have a client requirement as below.
Client will send the xmlpayload, based on this xml I want to read the data and store it into a database table. Could you please let me know how to achieve this functionality.
sample xmlpayload:
<gesws:localeAndSend xmlns:gesws="https://services.gmail.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://services.gmail.com docs/xsd/localeandsend.xsd" schemaVersion="1.0">
<gesws:localer>
<gesws:divisionstate>localeD</gesws:divisionstate>
<gesws:division>Retail</gesws:division>
<gesws:attributes>
<gesws:attribute>
<gesws:name>email</gesws:name>
<gesws:value>[email protected]</gesws:value>
</gesws:attribute>
<gesws:attribute>
<gesws:name>firstName</gesws:name>
<gesws:value>Robin</gesws:value>
</gesws:attribute>
<gesws:attribute>
<gesws:name>lastName</gesws:name>
<gesws:value>Dan</gesws:value>
</gesws:attribute>
<gesws:attribute>
<gesws:name>postalCode</gesws:name>
<gesws:value>56302</gesws:value>
</gesws:attribute>
<gesws:attribute>
<gesws:name>Mobileapp</gesws:name>
<gesws:value>-6</gesws:value>
</gesws:attribute>
<gesws:attribute>
<gesws:name>CodedString</gesws:name>
<gesws:value>1550</gesws:value>
</gesws:attribute>
<gesws:attribute>
<gesws:name>CodedBoolean</gesws:name>
<gesws:value>true</gesws:value>
</gesws:attribute>
</gesws:attributes>
</gesws:localer>
<gesws:localerMessage>
<gesws:mId>120098</gesws:mId>
</gesws:localerMessage>
</gesws:localeAndSend>
Thanks in advanceYou can use XMLTABLE to extract data from your XMLTYPE datatype...
SQL> ed
Wrote file afiedt.buf
1 with t as (select xmltype('<gesws:localeAndSend xmlns:gesws="https://services.gmail.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2 xsi:schemaLocation="https://services.gmail.com docs/xsd/localeandsend.xsd" schemaVersion="1.0">
3 <gesws:localer>
4 <gesws:divisionstate>localeD</gesws:divisionstate>
5 <gesws:division>Retail</gesws:division>
6 <gesws:attributes>
7 <gesws:attribute>
8 <gesws:name>email</gesws:name>
9 <gesws:value>[email protected]</gesws:value>
10 </gesws:attribute>
11 <gesws:attribute>
12 <gesws:name>firstName</gesws:name>
13 <gesws:value>Robin</gesws:value>
14 </gesws:attribute>
15 <gesws:attribute>
16 <gesws:name>lastName</gesws:name>
17 <gesws:value>Dan</gesws:value>
18 </gesws:attribute>
19 <gesws:attribute>
20 <gesws:name>postalCode</gesws:name>
21 <gesws:value>56302</gesws:value>
22 </gesws:attribute>
23 <gesws:attribute>
24 <gesws:name>Mobileapp</gesws:name>
25 <gesws:value>-6</gesws:value>
26 </gesws:attribute>
27 <gesws:attribute>
28 <gesws:name>CodedString</gesws:name>
29 <gesws:value>1550</gesws:value>
30 </gesws:attribute>
31 <gesws:attribute>
32 <gesws:name>CodedBoolean</gesws:name>
33 <gesws:value>true</gesws:value>
34 </gesws:attribute>
35 </gesws:attributes>
36 </gesws:localer>
37 <gesws:localerMessage>
38 <gesws:mId>120098</gesws:mId>
39 </gesws:localerMessage>
40 </gesws:localeAndSend>') as xml from dual)
41 --
42 -- end of test data
43 --
44 select x.mID, x.divisionstate, x.division
45 ,y.att_name, y.att_val
46 from t
47 ,xmltable(xmlnamespaces('https://services.gmail.com' as "g")
48 ,'g:localeAndSend'
49 passing t.xml
50 columns mID number path './g:localerMessage/g:mId'
51 ,divisionstate varchar2(10) path './g:localer/g:divisionstate'
52 ,division varchar2(10) path './g:localer/g:division'
53 ,atts xmltype path './g:localer/g:attributes'
54 ) x
55 ,xmltable(xmlnamespaces('https://services.gmail.com' as "g")
56 ,'g:attributes/g:attribute'
57 passing x.atts
58 columns att_name varchar2(20) path './g:name'
59 ,att_val varchar2(20) path './g:value'
60* ) y
SQL> /
MID DIVISIONST DIVISION ATT_NAME ATT_VAL
120098 localeD Retail email [email protected]
120098 localeD Retail firstName Robin
120098 localeD Retail lastName Dan
120098 localeD Retail postalCode 56302
120098 localeD Retail Mobileapp -6
120098 localeD Retail CodedString 1550
120098 localeD Retail CodedBoolean true
7 rows selected.
SQL>Once you're getting the data out, you can do what you want with it, e.g. pivot it to a single row...
SQL> ed
Wrote file afiedt.buf
1 with t as (select xmltype('<gesws:localeAndSend xmlns:gesws="https://services.gmail.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2 xsi:schemaLocation="https://services.gmail.com docs/xsd/localeandsend.xsd" schemaVersion="1.0">
3 <gesws:localer>
4 <gesws:divisionstate>localeD</gesws:divisionstate>
5 <gesws:division>Retail</gesws:division>
6 <gesws:attributes>
7 <gesws:attribute>
8 <gesws:name>email</gesws:name>
9 <gesws:value>[email protected]</gesws:value>
10 </gesws:attribute>
11 <gesws:attribute>
12 <gesws:name>firstName</gesws:name>
13 <gesws:value>Robin</gesws:value>
14 </gesws:attribute>
15 <gesws:attribute>
16 <gesws:name>lastName</gesws:name>
17 <gesws:value>Dan</gesws:value>
18 </gesws:attribute>
19 <gesws:attribute>
20 <gesws:name>postalCode</gesws:name>
21 <gesws:value>56302</gesws:value>
22 </gesws:attribute>
23 <gesws:attribute>
24 <gesws:name>Mobileapp</gesws:name>
25 <gesws:value>-6</gesws:value>
26 </gesws:attribute>
27 <gesws:attribute>
28 <gesws:name>CodedString</gesws:name>
29 <gesws:value>1550</gesws:value>
30 </gesws:attribute>
31 <gesws:attribute>
32 <gesws:name>CodedBoolean</gesws:name>
33 <gesws:value>true</gesws:value>
34 </gesws:attribute>
35 </gesws:attributes>
36 </gesws:localer>
37 <gesws:localerMessage>
38 <gesws:mId>120098</gesws:mId>
39 </gesws:localerMessage>
40 </gesws:localeAndSend>') as xml from dual)
41 --
42 -- end of test data
43 --
44 select mID, divisionstate, division
45 ,max(decode(att_name, 'email', att_val)) as email
46 ,max(decode(att_name, 'firstName', att_val)) as firstname
47 ,max(decode(att_name, 'lastName', att_val)) as lastname
48 ,max(decode(att_name, 'postalCode', att_val)) as postalcode
49 ,max(decode(att_name, 'CodedString', att_val)) as codedstring
50 ,max(decode(att_name, 'CodedBoolean', att_val)) as codedboolean
51 from (
52 select x.mID, x.divisionstate, x.division
53 ,y.att_name, y.att_val
54 from t
55 ,xmltable(xmlnamespaces('https://services.gmail.com' as "g")
56 ,'g:localeAndSend'
57 passing t.xml
58 columns mID number path './g:localerMessage/g:mId'
59 ,divisionstate varchar2(10) path './g:localer/g:divisionstate'
60 ,division varchar2(10) path './g:localer/g:division'
61 ,atts xmltype path './g:localer/g:attributes'
62 ) x
63 ,xmltable(xmlnamespaces('https://services.gmail.com' as "g")
64 ,'g:attributes/g:attribute'
65 passing x.atts
66 columns att_name varchar2(20) path './g:name'
67 ,att_val varchar2(20) path './g:value'
68 ) y
69 )
70 group by mID, divisionstate, division
71* order by 1
SQL> /
MID DIVISIONST DIVISION EMAIL FIRSTNAME LASTNAME POSTALCODE CODEDSTRING CODEDBOOLEAN
120098 localeD Retail [email protected] Robin Dan 56302 1550 true -
Add text item data and display the output in another text item
Hi! All,
I have four text item. like HA,DA,basic_salary and total_sal.I want to add the data entered in the text item in HA,DA,basic_salary and display in total_sal text item.How can I do this.Please help in this matter.
Thanks,
Abha1.Select the text item TOTAL_SAL
2.Open property palette
3.Under Calculation node
Set calculation mode as Formula
Set Formula as nvl(:ha,0)+nvl(:da,0)+nvl(:basic_salary,0) -
How to Read the one Source Column data and Display the Results
Hi All,
I have one PR_ProjectType Column in my Mastertable,Based on that Column we need to reed the column data and Display the Results
Ex:
Pr_ProjectType
AD,AM
AD
AM
AD,AM,TS,CS.OT,TS
AD,AM
like that data will come now we need 1. Ad,AM then same we need 2. AD also same we need 3. AM also we need
4.AD,AM,TS,CS.OT,TS in this string we need AD,AM only.
this logic we need we have thousand of data in the table.Please help this is urgent issue
vasuHi Vasu,
Based on your description, you want to eliminate the substrings (eliminated by comma) that are not AD or AM in each value of the column. Personally, I don’t think this can be done by just using an expression in the Derived Column. To achieve your goal, here
are two approaches for your reference:
Method 1: On the query level. Replace the target substrings with different integer characters, and create a function to eliminate non-numeric characters, then replace the integer characters with the corresponding substrings. The statements
for the custom function is as follows:
CREATE FUNCTION dbo.udf_GetNumeric
(@strAlphaNumeric VARCHAR(256))
RETURNS VARCHAR(256)
AS
BEGIN
DECLARE @intAlpha INT
SET @intAlpha = PATINDEX('%[^0-9]%', @strAlphaNumeric)
BEGIN
WHILE @intAlpha > 0
BEGIN
SET @strAlphaNumeric = STUFF(@strAlphaNumeric, @intAlpha, 1, '' )
SET @intAlpha = PATINDEX('%[^0-9]%', @strAlphaNumeric )
END
END
RETURN ISNULL(@strAlphaNumeric,0)
END
GO
The SQL commands used in the OLE DB Source is like:
SELECT
ID, REPLACE(REPLACE(REPLACE(REPLACE(dbo.udf_GetNumeric(REPLACE(REPLACE(REPLACE(REPLACE([ProjectType],'AD,',1),'AM,',2),'AD',3),'AM',4)),4,'AM'),3,'AD'),2,'AM,'),1,'AD,')
FROM MyTable
Method 2: Using a Script Component. Add a Derived Column Transform to replace the target substrings as method 1, use Regex in script to remove all non-numeric characters from the string, add another Derived Column to replace the integer
characters to the corresponding substring. The script is as follows:
using System.Text.RegularExpressions;
Row.OutProjectType= Regex.Replace(Row.ProjectType, "[^.0-9]", "");
References:
http://blog.sqlauthority.com/2008/10/14/sql-server-get-numeric-value-from-alpha-numeric-string-udf-for-get-numeric-numbers-only/
http://labs.kaliko.com/2009/09/c-remove-all-non-numeric-characters.html
Regards,
Mike Yin
TechNet Community Support -
// Code Help need .. in Reading CSV file and display the Output.
Hi All,
I am a new Bee in code and started learning code, I have stared with Console application and need your advice and suggestion.
I want to write a code which read the input from the CSV file and display the output in console application combination of first name and lastname append with the name of the collage in village
The example of CSV file is
Firstname,LastName
Happy,Coding
Learn,C#
I want to display the output as
HappyCodingXYZCollage
LearnC#XYXCollage
The below is the code I have tried so far.
// .Reading a CSV
var reader = new StreamReader(File.OpenRead(@"D:\Users\RajaVill\Desktop\C#\input.csv"));
List<string> listA = new List<string>();
while (!reader.EndOfStream)
var line = reader.ReadLine();
string[] values = line.Split(',');
listA.Add(values[0]);
listA.Add(values[1]);
listA.Add(values[2]);
// listB.Add(values[1]);
foreach (string str in listA)
//StreamWriter writer = new StreamWriter(File.OpenWrite(@"D:\\suman.txt"));
Console.WriteLine("the value is {0}", str);
Console.ReadLine();
Kindly advice and let me know, How to read the column header of the CSV file. so I can apply my logic the display combination of firstname,lastname and name of the collage
Best Regards,
Raja Village Sync
Beginer CoderVery simple example:
var column1 = new List<string>();
var column2 = new List<string>();
using (var rd = new StreamReader("filename.csv"))
while (!rd.EndOfStream)
var splits = rd.ReadLine().Split(';');
column1.Add(splits[0]);
column2.Add(splits[1]);
// print column1
Console.WriteLine("Column 1:");
foreach (var element in column1)
Console.WriteLine(element);
// print column2
Console.WriteLine("Column 2:");
foreach (var element in column2)
Console.WriteLine(element);
Mark as answer or vote as helpful if you find it useful | Ammar Zaied [MCP] -
Select RTF Data and display in PDF Document
Hi all,
I have a simple table:
CONTENT_ID - NUMBER
CONTENT - VARCHAR2(4000)
On top of this table I have a form that allows the user to enter / update data. The 'CONTENT' field is a Rich Text Editor (ApEx 4.0 - CKEditor 3). This allows the user to enter and format their text as they require.
I need to be able to select this data and display it in a PDF Document (via BI Publisher).
I therefore have a simple query
select content from content_table where content_id = 1;and a simple template that processes the resulting xml:
<?xml version="1.0" encoding="UTF-8"?>
<ROWSET>
<ROW>
<CONTENT>& lt;h2& gt;
This is a heading& lt;/h2& gt;
& lt;p& gt;
This is the text& lt;/p& gt;
</CONTENT>
</ROW>
</ROWSET>(There is not really a space between the & and 'lt' etc but I had to add this to get it to display correctly here).
Where I run this past my template I get a PDF with:
<h2>
This is a heading</h2>
<p>
This is the text</p>I get the same if I generate HTML.
but what I want to see is the text formatted as the user has entered in the RTF editor.
Can this be done?
Many thanks,
MartinI think your mixing 2 technologies.
At 1 side you have xml in combination with xsl (style sheets used in BI Publisher and FOP) to generate your pdf. And at the other side you have HTML...
XML and HTML are 2 entirely different technologies which you can not mix this simple. I investigated the same problem as you had, and in the end I ended up using jasperreports instead of FOP.
Maybe BI Publisher has some html regions which you could insert into your word document but I doubt it cause more people have asked the same question on this board...
So my advice: use jasperreports (also it is free for commercial usage)
Success
Br,
Nico -
Accessing sap tables data and display in webi
Hi all,
i installed business objects edge series.
i want to access SAP tables data and display in webi for adhoc reporting.
Is there any process to achieve this.Hi
currently (April 2010) you have the following options:
1. You load your R/3 data into an SAP BW and use universes based on BEx queries to create WebI reports
2. You can use SAP rapid marts. They contain Data integrator mappings (you need an installation of the DI for this) to extract and load your SAP R/3 data into a relational database. Additionally they provide universes (based on a relational schema) hich ill allo you to build WebI reports.
3. You can use the R/3 connector for the Data Federator (You need a DF installation for this). Please note that the R/3 connector is not yet a product rather just a PROTOTYPE. Take a look here: SAP BusinessObjects Web Intelligence Reporting for SAP ERP [original link is broken]
4. You can try to access the underlying database directly using the appropriate DB drivers. Please note that this is NOT RECOMMENDED. This way you cannot leverage security defined on the R/3 side in your WebI reports and you will not be able to access all data as available in R/3 since some of them are stored encoded/compressed in the underlying tables.
5. Instead of WebI you can use Crystal Reports and the R/3 drivers (eg. SAP Tables, Functions, Cluster) provided when installing the integration kit for SAP.
Regards,
Stratos -
Find record insert date and time in a table
Hi All,
I want to get record insert date and time in a table. There is no datetime column in my table. Are there any possibility to get date and time for each record?
Thank YouThats not easy. If your transaction info still resides on active portion of the log you can use fn_dblog to read out the time at which the transactions occurs. This is useful only if you try it shortly after transaction.
the code would look like this
SELECT *
FROM fn_dblog(null,null)
WHERE [Transaction Name] LIKE 'INSERT%'
OR [Transaction Name] LIKE 'UPDATE%'
Also see
http://www.mssqltips.com/sqlservertip/3076/how-to-read-the-sql-server-database-transaction-log/
http://solutioncenter.apexsql.com/read-a-sql-server-transaction-log/
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
Diference between DATA: and TYPES: on internal tables
Hi people,
Can somebody help me. I wanna know whats the diference between DATA: and TYPES: on internal tables
and whitch has the best performance, here is a eg:
DATA: BEGIN OF ti_sbook occurs 0,
carrid LIKE sbook-carrid,
fldate LIKE sbook-fldate,
customid LIKE sbook-customid,
loccuram LIKE sbook-loccuram,
END OF ti_sbook.
AND
TYPES: BEGIN OF ti_sbook ,
carrid LIKE sbook-carrid,
fldate LIKE sbook-fldate,
customid LIKE sbook-customid,
loccuram LIKE sbook-loccuram,
END OF ti_sbook.
DATA: gw_sbook TYPE TABLE OF ti_sbook,
gs_sbook TYPE ti_sbook.
witch of both types is better?
thanks.Hi Marcelo,
For compatibility matters is better to create internal tables with a work area separately. So yes it's better to use types. When you work with Object Oriented coding you will need to use internal tables defined with types. Also when defining tables with types is the new way of coding, the another coding is getting obsolete defined by SAP. That's why when working in ABAP with OO (Object Oriented) code you'll have to define tables with types and not the other way.
Hope it helps.
Regards,
Gilberto Li -
How to "group by" and display in separated table views
What cloud be the approach to the following scenario:
1) A RFC returns a list of lot of invoices.
2 How to group by "customer code" and display in separated table views for each customer "group of invoices" ?
Is there a way to do this using VC or only using WebDynpro ?
thanksIssac,
you dont hv to do this using dynpro. you can achieve this in vc by using the 'Filter' operator. from the output port of the rfc, feed the results to multiple filters. hv one filter for each segregation (for eg for each customer code). Then feed these filtered entries to the table views.
prachi -
Want to Read BLOB data and display on Oracle form
Hi All,
I have a table with a BLOB field and there is blob data saved here against a account id.
I want to display the blob data on the oracle forms front end for the queried account id
Any one to help me out how to read and display blob data in Oracle and display the same
Tksthis is a commoon request please try to search the forum.
-
How would you read in each line of data and display them to message box?
How would you read in each line of data from the _.txt file_ and display the whole data using an information-type message box?
I know how to display each line of the .txt file data, but I do not know how to display the whole thing.
Here is how I did to display each line of data using the message box:
import javax.swing.JOptionPane; // Needed for the JOptionPane class
import java.io.*; // Needed for file classes
public class problem3
public static void main(String[] args) throws IOException
String filename; // Needed to read the file
String categories; // Needed to read the categories
// Get the filename.
filename = JOptionPane.showInputDialog("Enter the filname.");
// Open the file.
FileReader freader = new FileReader(filename);
BufferedReader inputFile = new BufferedReader(freader);
// Read the categories from the file.
categories = inputFile.readLine();
// If a category was read, display it and
// read the remainig categories.
while(categories != null)
// Display the last category read.
JOptionPane.showMessageDialog(categories);
// Read the next category.
categories = inputFile.readLine();
// Close the file.
inputFile.close();
}I think I need to change here:
// If a category was read, display it and
// read the remainig categories.
while(categories != null)
// Display the last category read.
JOptionPane.showMessageDialog(categories);
// Read the next category.
categories = inputFile.readLine();
}but I don't know how to.
Could you please help me?
Thank you.kyorochan wrote:
jverd wrote:
What is not understood about your question is which part of "read a bunch of lines and display them in a textbox" do you not understand.
First thing's first though: You do recognize that "read a bunch of lines and display them in a textbox" has a few distinct and completely independent parts, right?I'm sorry. I'm not good at English, so I do not understand what you said...
What I was trying to say is "How to display the whole lines of .txt file in single dialog box."We know that.
Do you understand that any problem can be broken down into smaller pieces?
Do you understand that your problem has the following pieces?
1. Read lines from the file.
2. Put the lines together into one String.
3. Put the String into the message box.
and maybe
4. Make sure the message box contents are split into lines exactly as the file was.
(You didn't make it clear if that last one is a requirement.)
Do you understand that 1-4 are completely independent problems and can be solved separately from each other?
Do you understand that you have stated that you already know how to do 1 and 3?
Therefore, you are NOT asking "How to display the whole lines of .txt file in single dialog box." Rather, you ARE asking either #2 or #4 or both.
If you say once more "display all the lines of the file in one dialog box," then it is clear that we are unable to communicate with you and we cannot help you. -
Reading XML file into Dynamic Node and Display its output as Table.
Hi All,
Following is the output of XML file:
<Company>
<Employee>
<Name>John</Name>
<Age>23</Age>
<***>Male</***>
<Location>Frankfurt</Location>
</Employee>
<Employee>
<Name>Tina</Name>
<Age>21</Age>
<***>Female</***>
<Location>Boston</Location>
</Employee>
<Department>
<Name>Sales</Name>
<HQ>Chicago</HQ>
<Emplyoees>2300</Employees>
</Department>
I'm able to read the output through DOM parser. But How do I convert this into dynamic node and display this in Web dynpro as Table?
Any pointers in this regard will be great help?
Thanks
SrikantHi Maksim,
I've used your example and its now helping as there is kind of agreement on that I'll be knowing the structure of Xml and I can fill the nodes.
But suppose if you have Xml has following structure :
<?xml version="1.0" encoding="utf-8"?><DATA>
<item><MAILERID TYPE="C" SIZE="000030">21</MAILERID><ORG_CODE TYPE="C" SIZE="000004">1232</ORG_CODE><EVENTID TYPE="C" SIZE="000015">CONTRACT</EVENTID><SUBSCR_VALUE TYPE="C" SIZE="000001">0</SUBSCR_VALUE></item>
<item><MAILERID TYPE="C" SIZE="000030">21</MAILERID><ORG_CODE TYPE="C" SIZE="000004">1232</ORG_CODE><EVENTID TYPE="C" SIZE="000015">CREDIT</EVENTID><SUBSCR_VALUE TYPE="C" SIZE="000001">0</SUBSCR_VALUE></item>
<item><MAILERID TYPE="C" SIZE="000030">21</MAILERID><ORG_CODE TYPE="C" SIZE="000004">1232</ORG_CODE><EVENTID TYPE="C" SIZE="000015">EMPRESS</EVENTID><SUBSCR_VALUE TYPE="C" SIZE="000001">0</SUBSCR_VALUE></item>
<item><MAILERID TYPE="C" SIZE="000030">21</MAILERID><ORG_CODE TYPE="C" SIZE="000004">1232</ORG_CODE><EVENTID TYPE="C" SIZE="000015">PAYMENT</EVENTID><SUBSCR_VALUE TYPE="C" SIZE="000001">0</SUBSCR_VALUE></item>
<item><MAILERID TYPE="C" SIZE="000030">21</MAILERID><ORG_CODE TYPE="C" SIZE="000004">1232</ORG_CODE><EVENTID TYPE="C" SIZE="000015">PRICE</EVENTID><SUBSCR_VALUE TYPE="C" SIZE="000001">0</SUBSCR_VALUE></item>
</DATA>
How we will do in this case?
Can we have something similar using DOM? Also what is the best method for displaying data being sent in form of XML. And generalize it for cases like this.
Thanks
Srikant -
How to read date and time with Oracle_Loader (10g)
ip pc username date time
1.1.1.1 WS1 test 2000/01/01 01:01:01
I am trying to read the date and time from data formatted as above from a .txt file.
create TABLE test (IP char(20), OCID char(15), ID char(30), date_logon date, time_logon date)
ORGANIZATION EXTERNAL (TYPE ORACLE_loader DEFAULT DIRECTORY phonebook
ACCESS PARAMETERS (FIELDS TERMINATED BY WHITESPACE
(IP char(20),
OCID char(15),
ID char(30),
date_logon char(30) DATE_FORMAT DATE MASK "yyyy/mm/dd",
time_logon char(30) date_FORMAT date MASK "hh24:mi:ss"))
LOCATION ('test.log'));
However, my external table returns a date (2007-05-01) AND the time for the time_logon column (e.g. 2007-05-01 01:01:01) . I just want the time (e.g. 01:01:01).
What am I doing wrong?
*I tried: date_logon char(30) DATE_FORMAT DATE MASK "yyyy/mm/dd hh24:mi:ss", reading both the date and time at the same time, but it doesn't work.
Thanks.Justin, thank you so much for your help.
When I try:
SELECT a.ip, a.ocid, a.id, TO_CHAR( a.date_logon, 'DD-MON-YYYY HH24:MI:SS' )
FROM test a
date_logon entries are all dd-mon-yyyy and 00:00:00 (i.e. no time was stored).
I don't have control over the text file, so I don't think I can make any changes to the formatting.
I tried to declare the column as 'timestamp':
date_logon char(60) DATE_FORMAT timestamp MASK "yyyy/mm/dd hh24:mi:ss",
but time is still displayed as 00:00:00:000.... which leads me to suspect that the culprit is the space between date and time in the text file.
Say if I have 2007/05/25 and 2007/05/01 16:19:23 in two separate date columns. Is it possible to grab the time from the second column and append it to the first column (while still retaining the DATE property, i.e. 2007/05/25 16:19:23).
Thanks! -
Reading Dates and Timestamps created by PL/SQL
Hello,
This is probably a FAQ (or stating the obvious) but I want to make sure I've got the right idea about things...
I recently noticed that our Java app reads dates/timestamps incorrectly from the database. Any date set using 'SYSDATE' in PL/SQL is an hour out when read by Java. This is because we are now in BST and the object read back by the JDBC driver thinks the timezone is GMT.
From reading around it seems that the DATE and TIMESTAMP types in Oracle don't persist timezone information. Fair enough, but to me this makes it dangerous to use SYSDATE at all in PL/SQL procedures.
Previously I've never relied on the database itself to generate timestamps so dates have always been stored as UTC. I'm currently using SYS_EXTRACT_UTC(SYSTIMESTAMP) when inserting data in to tables and basically wondering if this is the common way of achieving accuracy.
(using types such as "TIMESTAMP WITH LOCAL TIME ZONE" seem to have their own annoyances in JDBC so I've opted to avoid those)
Thanks.Tom,
This may be helpful...
http://www.javaworld.com/javaworld/jw-10-2003/jw-1003-time.html
Good Luck,
Avi.
Maybe you are looking for
-
<p>Hello,</p><p>I hope I'm in the correct section and that someone will be able to help me.</p><p>I run a web application (within Weblogic 8.1 sp5) which allows the direct generation of reports in PDF.<br />Each report has a unique name and I want th
-
Cant connect with a Socket.
Hi, I am trying to establich a connection but I cant. The server is listenig on the 7980 port, I am trying to establish a connection from a servlet to the app on another machine. The problem is that the socket just dont want to work. The server machi
-
Material Column invisible in Purchase Order Screen after Upgrade
Hi Freinds, Subject: MEPO1211-EMATN field invisible in Purchase Order (ME21N) We are doing an SAP Technical upgrade project from 4.6C to ECC6.0. The 4.6C developement box is upgraded to ECC6.0. I found that the Material Column is missing from the Pur
-
PO date and Omaterial should display in the ascending order
Hi experts, When i excute the rep0rt the POdate and Material is not displaying in asending order, based on this order am caluculating some other key feild. Back ground this was a Function Module datasource whichwas extraced into BI , Until PSA am ge
-
Satellite not showing wireless networks, adapter seems ok
my satellite is not showing wireless networks and i can't figure out what networks are available. the adapter seems to be working properly according to windows device manager. i had to uninstall configfree, although i'm not sure that caused any probl