Please hep to generate same line number to print in file
Hi
I am generating file by taking data from few tables. I need to generate file data from below structure data :
i.e In table A for order O having product p1,p2,p3,p4, lines will be wrriten to file in following manner
Line Number
O -p1 - 1
O -p2 - 2
O -p3 - 3
O -p4 - 4
Now another line is from table which will have only two product entries for the order O in below manner
i.e In table B for order O having product p2,p4. so for this lines should be match with above line number of order like this :
Line Number
O - p2 -2
O - p4 -4
First all data from table A will be writeen. Then only from TABLE B data should be wrriten to file.
Can anybody please help how to match line number for both the tables?
Thanks in advance
Perhaps a clearer output would be if we had different descriptions on each of the tables A an B to output with each of the rows..
SQL> ed
Wrote file afiedt.buf
1 with A as (select 1 as order_id, 'p1' as product_id, 'A - order 1 product 1' as descr from dual union all
2 select 1, 'p2', 'A - order 1 product 2' from dual union all
3 select 1, 'p3', 'A - order 1 product 3' from dual union all
4 select 1, 'p4', 'A - order 1 product 4' from dual union all
5 select 2, 'p1', 'A - order 2 product 1' from dual union all
6 select 2, 'p2', 'A - order 2 product 2' from dual union all
7 select 2, 'p3', 'A - order 2 product 3' from dual)
8 ,B as (select 1 as order_id, 'p2' as product_id, 'B - order 1 product 2' as descr from dual union all
9 select 1, 'p4', 'B - order 1 product 4' from dual union all
10 select 2, 'p3', 'B - order 2 product 3' from dual)
11 -- end of test data
12 select order_id
13 ,product_id
14 ,row_number() over (partition by order_id order by product_id) as line_number
15 ,descr
16 from A
17 union all
18 select order_id, product_id, line_number, descr
19 from (
20 select b.order_id
21 ,b.product_id
22 ,row_number() over (partition by a.order_id order by a.product_id) as line_number
23 ,b.descr
24 from A left outer join B on (a.order_id = b.order_id and a.product_id = b.product_id)
25 )
26* where order_id is not null
SQL> /
ORDER_ID PR LINE_NUMBER DESCR
1 p1 1 A - order 1 product 1
1 p2 2 A - order 1 product 2
1 p3 3 A - order 1 product 3
1 p4 4 A - order 1 product 4
2 p1 1 A - order 2 product 1
2 p2 2 A - order 2 product 2
2 p3 3 A - order 2 product 3
1 p2 2 B - order 1 product 2
1 p4 4 B - order 1 product 4
2 p3 3 B - order 2 product 3
10 rows selected.
SQL>
Similar Messages
-
Print line number on print layout
Hi all,
Is there a way to print the line number on the print layout?
Thanks,
JaneHi,
Try this, you will get Line Number in Print.
1st Method,
->> Open your PLD. Create 1 System Variable Field in Repetetive Area.
->> Put Variable No. - 77
Else, 2nd Method,
->> Open your PLD. Create 1 Formula Field in Repetetive Area.
->> Put this Formula LineNum().
Regards,
Madhan. -
Line number in a *.class file, please help, advanced language guys
dear all,
i use c++ to open a *.class file and try to read line number of code in the file, i have 2 questions:
1. i read line number in a method successfully, but i can not understand the meaning of start_pc, following are one of those data, please explain:
s = start_pc,n = line_number
s , n
0 , 123
8 , 125
23 , 126
29 , 127
34 , 129
38 , 130
2. i can not find where the class's line number are, i.e. class start line and class end line, or field's line number.
does these info exist inside a *.class file?
thx for any lightjdb gets line number of fields from class file, not
source file definitely.I'm not really sure how you tested this, but here's my test, and JDB definitely gets its listing from the source file.
First, I created and compiled class Tester:
public class Tester
public static void main( String[] argv )
throws Exception
Tester x = new Tester();
System.out.println(x.toString());
int x;
int y;
private Tester()
x = 0;
y = 1;
}Then, I ran this in JDB. Note lines 16 and 17 in the output from "list":
H:\Workspace>jdb Tester
Initializing jdb ...
stop in Tester.mainDeferring breakpoint Tester.main.
It will be set after the class is loaded.
runrun Tester
Set uncaught java.lang.Throwable
Set deferred uncaught java.lang.Throwable
>
VM Started: Set deferred breakpoint Tester.main
Breakpoint hit: "thread=main", Tester.main(), line=12 bci=0
12 Tester x = new Tester();
main[1] list
8 {
9 public static void main( String[] argv )
10 throws Exception
11 {
12 => Tester x = new Tester();
13 System.out.println(x.toString());
14 }
15
16 int x;
17 int y;
main[1] quit
Tester@b82368Then I edited the source file. Again, look at lines 16 and 17:
H:\Workspace>jdb Tester
Initializing jdb ...
stop in Tester.mainDeferring breakpoint Tester.main.
It will be set after the class is loaded.
runrun Tester
Set uncaught java.lang.Throwable
Set deferred uncaught java.lang.Throwable
>
VM Started: Set deferred breakpoint Tester.main
Breakpoint hit: "thread=main", Tester.main(), line=12 bci=0
12 Tester x = new Tester();
main[1] list
8 {
9 public static void main( String[] argv )
10 throws Exception
11 {
12 => Tester x = new Tester();
13 System.out.println(x.toString());
14 }
15
16 int a;
17 int b;
main[1] -
How to find dynamically the current line number in the source file
Is there a mechanism like __LINE__ and __FILE__ macro in C to get dynamically
the current line number and file name of a source file?Don't know - but others have asked too. Have you searched the forum? For example:
http://forum.java.sun.com/thread.jsp?forum=31&thread=210496 -
Netweaver not showing line number in the error file.
Hi All,
I am working on SAP NetWeaver 2.
I am having a serious problem in here.
What is happening is, In my code there is a Null pointer exception occurring frequently.
In my log file I can see the file in which it is occurring but I cannot see the line no in which the nullpointer exception is coming.
Is there any setting in netweaver which i should turn on to see the line no in which the error is happening.
Thanks in Advance,
MannyHi Sam,
Title means workflow title coming in the inbox or mail subject ?
Anyways both the issues can be fixed in the WF itself.
If you want to change the mail subject check your mail step and provide proper variable.
for the workitem text you can change it form the task.
Regards
Bikas -
WebDAV Query generates a high number of transaction log files
Hi all,
I have a program that launch WebDAV queries to search for contacts on an Exchange 2007 server. The number of contacts returned for each user's mailbox is quite high (about 4500).
I've noticed that each time the query is launched, about 15 transaction log files are generated on the Exchange server (each of them 1Mb). If I ask only for 2 properties on the contacts, this number is reduced to about 8.
This is a problem since our program is supposed to launch often (about every 3/5min) as It will synchronize Exchange mailboxes with a SQL Server DB. The result is that the logs increase very quickly on the server side, even if there are not so many updates.
Any idea why so many transaction logs are generated when doing a WebDAV search returning many items? I would understand that logs are created when an update is done on the server, but here it's only a search with many contacts items returned.
Is there maybe a setting on the Exchange server to control what kind of logs to generate?
Thank for your help,
AlexandreHi Alex,
Actually circular logging/backup was not a solution, I was just explaining that there is an option like that on server but it is not recommended hence not useful in our case :)
- I am not a developer but AFAIK, WebDAV search query shouldn't generate transaction log because it just searches the mailboxes and gives the result in HTTP format and doesn't produce any Exchange transaction.
- I wouldn't open transaction logs since it is being used by Exchange which may generate errors and may corrupt Exchange database sometime too. However it is not readable, as you observed, other than Exchange Information Store service (store.exe).
- You can post this query in development forum to get better idea on this, if any other programmer observed similar symptom while using WebDAV contact search query in Exchange 2007 or can validate your query.
Microsoft TechNet > Forums Home > Exchange Server > Development
Well, I just saw that you are using Exchange 2007, in that case why don't you use Exchange Web Service which is better and improved method to access/query mailboxes where as WebDAV is also de-emphasized in Exchange 2007 and might be disappeared in next version of Exchange. Checkout below article for further detail.
Development: Overview
http://technet.microsoft.com/en-us/library/aa997614.aspx
Amit Tank | MVP - Exchange | MCITP:EMA MCSA:M | http://ExchangeShare.WordPress.com -
Unwanted Horizontal lines in PDF (print to file)
From any other program, printing to Adobe PDF produces a pdf file that contains unwanted horizontal lines, oddly spaced, on entire page. Have tried multiple settings/configs and am unable to stop this annoying behavior. Any tips are appreciated.
Me too! Just yesterday, Aug. 4!
I get horizontal lines about 0.4 inches apart on the prints, but no lines on the PDF on the monitor. They just show up on the print.
It happened the day I ran malware and virus scans in the morning.
It only affects prints from PDFs created by SolidWorks. WORD documents print fine.
I've uninstalled and reinstalled my HP printer software.
I did the repair for Adobe reader 9.3.3
I even changed my ink cartridges that were low.
What else can I try?
What caused this? Is it because our names are Paul?
I tried to contact Adobe without spending $39, but was unsuccessful. I thought maybe they would like to know about problems. Is the forum the only way to do that?
Message was edited by: Boulder Paul -
Issue Related to Billing Document F2 with same Invoice Number.
Hi All,
I have 3 Sales Order with 2 Sales Order belonging to Sales Org A and one belonging to Sales Org B. The Invoice generated for all the deliveries for Sales Order has the same Invoice Number. As per the standard functinality it is not possible to generate same Invoice Number for Sales Order belonging to different Sales Organisation. I have chekced the Table VBFA the preceding document for the Invoice Number I am getting 3 entries. Please could you help me out in analysing his issue. Where the possible error could be ?.
Thanks & Regards,
Sam.Kindly check as it could be due to the Single Invoice generated for collective three Deliveries.
As per the standard functinality it is not possible to generate same Invoice Number for Sales Order belonging to different Sales Organisation
This is not a standard Functionality.But if you have made a Logic in the Copy Control Routine then it could be possible.
Single Invoice Number can be generated for one or more Deliveries if you process it through VF04.
Best Regards,
Ankur -
Price break up lines import - Line number getting updated
Hi All,
I am importing price breakup shipment lines for Blanket agreements.
I need to update the effective from date and to date for the existing line (Update)
And should create a new break up line with some updated prices.
This process is getting imported fine, but for the line which need update of dates, a new line num is getting updated. I mean if existing line is 1 after import the same line number is updated to 2. When I pass the line number to interface table, it is error out.
Finally my requirement is to import new lines with new line number(which is working fine) and Update the existing lines with keeping the line num.
Please let me know if I am not clear.
Thanks.
Edited by: DharV on Sep 20, 2011 8:46 PMHello Sudha ,
I agree with Alex. Value-based commitment indicator has to be set.
I wanna add two notes:
634298 FAQ: Commitment update in the service
433597 Commitment update for services or invoicing plan
If you need to correct commitments, you can use RKANBU01 (as described in note 152571)
Cheers,
Lucas -
Reset file name and line number in preprocessor
We are using Sun Studio 12u1 on Solaris x86 10u9.
For one of our large projects our make file copies many C++ source files into one large allsource.cpp file. This results in significantly faster compilation and better inter-procedural optimizations.
Unfortunately, when the compiler generates warning or error messages they refer to allsource.cpp. Also when it comes time to debug, dbx is looking for debugging information for the original source file instead of looking for allsource.o.
On Windows (MSVC), we use the #line directive to reset the line number and filename so that the error messages point to the correct line and number, and so that the debugger knows that the debugging information for myfile.cpp is actually in allsource.o.
Does the Sun compiler have anything similar to the #line directive?To reset the preprocessor to the start of a new file:
#1 "filename"
where filename is the name or complete path name of the file.
To change the line number within the current file:
#N
or
#line N
where N is an integer
Example:
% cat z.cc
struct S { X x; };
#1 "/foo/bar.h"
Int I;
#500
Float F;
#line 1000
Double D;
88% CC -c z.cc
"z.cc", line 1: Error: Type name expected instead of "X".
"/foo/bar.h", line 1: Error: Int is not defined.
"/foo/bar.h", line 500: Error: Float is not defined.
"/foo/bar.h", line 1000: Error: Double is not defined.
4 Error(s) detected.BTW, you might get a similar improvement in compile time by using precompiled headers.
The -xipo option provide inter-procedural optimization across compilation units. Refer to the C++ Users Guide for details.
We seem to have a bug in the Forum software. My original source code and the compiler output have double quotes ("...") but they show as single quotes in the code brackets.
Edited by: clamage45 on Apr 13, 2010 1:13 PM -
How can I write left and right in the same line of a richtextbox?
I want to write, in the same line, text with a right aligment and other with left aligment. How can I do it?
thanksI want to write, in the same line, text with a right aligment and other with left aligment. How can I do it?
thanks
As
Viorel_ says "Perhaps there are other much easier solutions. For example, create two
RichTextBoxes with no borders (if you only need two columns of text)" but the real issue would be saving the info in the RichTextBox's (RTB's) RTF or Text to two different RTF or TextFiles. Although I suppose if it was just going to
a TextFile then you could somehow use a delimited text file so each same line number of each RTB is appended to the same line and delimited. That way you could probably load a split array with each line from the text file splitting on the delimeter per line
and providing RTB1 with index 0 of the split array and RTB2 with index 1 of the split array. I'm not going to try that.
This is some leftover code from a long time ago. It has three RTB's. RTB1 is there I suppose because the thread asking for this code wanted it. RTB2 is borderless as well as RTB3. The Aqua control in the top image below is the Panel used to cover RTB2's
scrollbar. So RTB3's scrollbar is used to scroll both controls.
I forgot to test if I typed past the scroll position in RTB2 if both would scroll as maybe RTB3 would not since it would not have anything to scroll to I suppose.
Maybe this code can help or maybe not. The bottom two images are the app running and displaying nothing scrolled in RTB2 and RTB3 then the scroll used in the bottom image.
Disregard the commented out code in the code below. It was there so I left it there. I suppose you should delete it. Also I didn't set the RTB's so one was left aligned and the other right aligned. I believe the Panel becomes a control in RTB2's controls
when it is moved to cover RTB2's vertical scrollbar but don't remember although that seems the case since both RTB2 and RTB3 are brought to front so if the Panel was not one of RTB2's controls I would think it would be behind RTB2 and RTB2's vertical scrollbar
would display but don't remember now. In fact I don't really remember how that part works. :)
Option Strict On
Public Class Form1
Declare Function SendMessage Lib "user32.dll" Alias "SendMessageW" (ByVal hWnd As IntPtr, ByVal msg As Integer, ByVal wParam As Integer, ByRef lParam As Point) As Integer
Const WM_USER As Integer = &H400
Const EM_GETSCROLLPOS As Integer = WM_USER + 221
Const EM_SETSCROLLPOS As Integer = WM_USER + 222
Dim FixTheProblem As New List(Of String)
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Me.CenterToScreen()
Panel1.BackColor = Color.White
Panel1.BorderStyle = BorderStyle.Fixed3D
RichTextBox2.BorderStyle = BorderStyle.None
RichTextBox2.ScrollBars = RichTextBoxScrollBars.Vertical
RichTextBox3.BorderStyle = BorderStyle.None
RichTextBox3.ScrollBars = RichTextBoxScrollBars.Vertical
RichTextBox3.Size = RichTextBox2.Size
RichTextBox3.Top = RichTextBox2.Top
RichTextBox3.Left = RichTextBox2.Right - 20
Panel1.Size = New Size(RichTextBox2.Width * 2 - 16, RichTextBox2.Height + 4)
Panel1.Left = RichTextBox2.Left - 2
Panel1.Top = RichTextBox2.Top - 2
RichTextBox2.BringToFront()
RichTextBox3.BringToFront()
FixTheProblem.Add("Curry: £6.50")
FixTheProblem.Add("Mineral Water: £4.50")
FixTheProblem.Add("Crisp Packet: £3.60")
FixTheProblem.Add("Sweat Tea: £2.23")
FixTheProblem.Add("Motor Oil: £12.50")
FixTheProblem.Add("Coca Cola: £.75")
FixTheProblem.Add("Petrol Liter: £3.75")
FixTheProblem.Add("Shaved Ice: £.50")
FixTheProblem.Add("Marlboro: £2.20")
FixTheProblem.Add("Newspaper: £.25")
FixTheProblem.Add("Spice Pack: £.75")
FixTheProblem.Add("Salt: £.50")
FixTheProblem.Add("Pepper: £.30")
For Each Item In FixTheProblem
RichTextBox1.AppendText(Item & vbCrLf)
Next
RichTextBox1.SelectionStart = 0
RichTextBox1.ScrollToCaret()
Dim Fix As String = ""
For Each Item In FixTheProblem
Fix += Item.Replace(":", "^:") & vbCrLf
Next
Fix = Fix.Replace(vbCrLf, "^>")
Dim FixSplit() As String = Fix.Split("^"c)
For i = 0 To FixSplit.Count - 1
If CBool(i Mod 2 = 0) = True Then
RichTextBox2.AppendText(FixSplit(i).Replace(">"c, "") & vbCrLf)
ElseIf CBool(i Mod 2 = 0) = False Then
RichTextBox3.AppendText(FixSplit(i) & vbCrLf)
End If
Next
End Sub
Dim RTB2ScrollPoint As Point
Private Sub RichTextBox2_Vscroll(sender As Object, e As EventArgs) Handles RichTextBox2.VScroll
Dim RTB2ScrollPoint As Point
SendMessage(RichTextBox2.Handle, EM_GETSCROLLPOS, 0, RTB2ScrollPoint)
SendMessage(RichTextBox3.Handle, EM_SETSCROLLPOS, 0, New Point(RTB2ScrollPoint.X, RTB2ScrollPoint.Y))
'Me.Text = RTB2ScrollPoint.X.ToString & " .. " & RTB2ScrollPoint.Y.ToString
End Sub
Private Sub RichTextBox3_Vscroll(sender As Object, e As EventArgs) Handles RichTextBox3.VScroll
Dim RTB3ScrollPoint As Point
SendMessage(RichTextBox3.Handle, EM_GETSCROLLPOS, 0, RTB3ScrollPoint)
SendMessage(RichTextBox2.Handle, EM_SETSCROLLPOS, 0, New Point(RTB3ScrollPoint.X, RTB3ScrollPoint.Y))
'SendMessage(RichTextBox2.Handle, EM_SETSCROLLPOS, 0, New Point(0, 10))
End Sub
End Class
La vida loca -
How to get PL/SQL line number ?
Hello, All !
I have an Error pointing to Line number - "ORA-06512: at "..._PKG", line 295
How do I find out in physical code exactly where this line is ? I used SQL Navigator (it has line count) but It didn't match ! (Function names different in Error message and in Script Editor window and it pointed to a blank line). Does line count start from Package Spec or Body ?
Please Help,
Thanx !The line number is relative to the first line of the body. The most definitive way to identify the exact line would be to use USER_SOURCE ...
SELECT TEXT
FROM USER_SOURCE
WHERE NAME = ...
AND LINE = 295
Richard -
How to find proc/func name from package name and line number?
Hi,
We are using the pl/sql call stack dump (dbms_utility.format_call_stack) for some debugging purposes. But in the case of a package body execution, the dump does not return the name of the procedure/function that is being executed, but only the name of the package and the line number being executed. So, we have a requirement wherein we need to extract the type and name of a package subunit from the package name and line number.
e.g.
From the information package 'A', line number 739
we should be able to deduce that line 739 is a part of *'function A.f'*
Does the oracle database provide any native mechanism (PL/SQL packages or otherwise) to support such functionality? If it does not, how can we achieve the desired result?
Thanks in advance,
ShashankThe approach we are currently planning to take up is this :
1. Write PL/SQL code to parse the entire source (user_source) and build a database table with a structure like this :
PACKAGE_NAME | UNIT_TYPE | UNIT_NAME | START_LINE | END_LINE
=============================================
A | PROCEDURE | P1 | 20 | 345
A | FUNCTION | F1 | 347 | 629
etc..
2. Start PL/SQL package execution.
3. Keep dumping call stack snapshots whenever a custom debug procedure is called.
4. Dump the package name and line number to a log file.
5. Using the package name and line number, query the table built in step 1 and build the final report which shows the control flow in a readable form.
What we want is to get rid of step 5 and by some means get the logic to extract the unit type and name in step 4 itself.
Keep them coming..
Thanks and regards,
Shashank -
To get line number for xml file.
how do u get th line number of a particular node i parse.
is it possible only when error comes the line number and mesage can be displayed.
is it possible when i use xpath expression for a particular node and if that xpath returns boolean false then can i get the line number where the node present..??
plz reply..There are java classes that will give you the line number of records from files you are reading. Names begin with Line...
-
Source line number in exception trace
Excuse me if the question is silly.
When I print the stack trace after an exception has occured, how is it able to display the exact source line number 'cos the source file may or may not be accessible to the jvm. Obviously they don't keep source line-wise info in the class file,right?won't class files be large just because of the debug data?
laurivasko@linux:~/java> javac HelloWorld.java
laurivasko@linux:~/java> ls -la HelloWorld.class
-rw-r--r-- 1 laurivasko users 426 2004-06-26 20:07 HelloWorld.class
laurivasko@linux:~/java> javac -g:none HelloWorld.java
laurivasko@linux:~/java> ls -la HelloWorld.class
-rw-r--r-- 1 laurivasko users 341 2004-06-26 20:07 HelloWorld.classas you see, first case has file size of 426 bytes, and other one has wile size of 341 bytes, and that all with 5 line HelloWorld commandline application.
// hopefully that answers your question.
Maybe you are looking for
-
Z-Button - How to call a Action Profile to Open a PDF-Doc. within an Event?
Hi Experts, we have created a Z-Button that afterwards creates an event. In the coding for the event an Action Profile should be called and a PDF-Document should be opened. We have copied the coding from the standard button 'Print Preview' which is c
-
Syncing Classic with USB killed docking station for my Nano
I have two libraries in Itunes, one for music and one for books. I use my Nano for music. After I organized a second library for books, I bought a Classic. It uses a USB cable. After my first hookup of the Classic, syncing the book library. The firew
-
Hi all, I would appreciate any help for the following problem that I am facing. I have created master-detail pages sharing the same AM. The details page shows details of the request from 3 different VOs. The VOs are entity-based and I modify the VOs
-
BPEL Processes are Hanging.......
Hi, I am using BPEL 10.1.2.0.2 version. The logic am implementing in BPEL process is a frontend application will invoke BPEL process.BPEL will take some inputs from frontend and invokes a procedure in database using DbAdapter.BPEL will pull the outpu
-
The boxes in the right margin of the source editor
I want to know how can I disable the code check that is displayed in the right margin of the source editor (red, brown or green boxes). This is really annoying when you are writing bulk code with 10000 lines.