Need to split the output into files
Hi,
I have a query regarding splitting the output into different files. Please help to resolve that.
I have have select query query...
SELECT INDEX_NAME FROM DBA_INDEXES WHERE TABLE_NAME=<Table Name>;
If it returns less than 4 indexes then we have create one table and have to move those into the files.
For example...
File_1.sql
====
index1
index2
index3
If select statement returns more than 4 indexes then we have create 4 files and have to splict those indexes and has to move to those 4 files.
For example....
If select statement returns 13 records then...
File_1.sql File_2.sql File_3.sql File_4.sql
===== ====== ======= =======
index1 index4 index7 index10
index2 index5 index8 index11
index3 index6 index9 index12
index13
Index no need to be in order in any file and any file can I extra index in it.
Can be ok if we have any procedure or shell script. Please help me on this?
We are using 10.2.0.1 oracle db. Please let me know if you need any thing else?
Thanks
Pathan
Are you trying to put the output from SQL reports in different files?
Some reporting tools can do this.
You have a couple of options to do this.
Some reporting tools support the functinality to write to different files.
Another way is to write a PL/SQL procedure using UTL_FILE, which can open multiple files based on your conditions and to write to them as you need to.
An older, less elegant solution is to write nested SQL*PLUS scripts spooling to different files with the queries you need. A top level script would invoke the others, something like (untested)
--in first script
@subscript1
@subscript2
--in subscript1.sql
spool whatever.lst
select *
from dual;
...
Similar Messages
-
I have a huge file which is in GB and I want to split the video into clip and export each clip individually. Can you please help me how to split and export the videos to computer? It will be of great help!!
video
What version of Premiere Elements do you have and on what computer operating system is it running?
Please review the following workflow.
ATR Premiere Elements Troubleshooting: PE11: Project Assets Organization for Scene and Highlight Grabs from Collection o…
But please also determine if your project goal is supported by
a. format of your source
and
b. computer resources
More later based on details that you will post.
ATR -
Want to display a space after last field in the output txt file
hi
I want to display a space after last field in the output txt file which is generaed by my program on utility server the last field lengyt we have defined is four and in database it is of three characters and requirement is to disppaly the last fourth field as space in the output file w hich is not shown as the txt file automatically gets closed at the third place as it is the last field in the record and ind atabase records are of therss char only but user wants to display this fourth position in the notepad output file as space ( which is last field in the output file)
eg
name house street country
record output coming in file
ram h3 street3 thn now this thn which is last field the notepad get closed at thn only
i want to display one space in last field for the whole of output file
ie ram h3 street3 thn(space)
sham h4 street4 sgp(space) so on......
we need to show this space in the output file as blank
regards
Arorahi Atish
i am using
loop at gt_sagadr_outtab into wa_sagadr_outtab
move wa_sagadr_outtab-country to wa_sagadr_text+223(226).
endloop
in this last field ie country i need to display the last 226 as blank as only country key is two char in database so the last space is not shown
i am not unsing the fM as tolb by you
and afterwards
i am usning
Concatenate 'Sagadr_' sy-datum sy-uzeit '.dat' into gv_filename_sagadr.
CALL FUNCTION 'FILE_GET_NAME'
EXPORTING
CLIENT = SY-MANDT
LOGICAL_FILENAME = gc_lfile
OPERATING_SYSTEM = SY-OPSYS
PARAMETER_1 = gc_param1
PARAMETER_2 = gc_send
PARAMETER_3 = gv_filename_sagadr
USE_PRESENTATION_SERVER = ' '
WITH_FILE_EXTENSION = ' '
USE_BUFFER = ' '
ELEMINATE_BLANKS = 'X'
IMPORTING
EMERGENCY_FLAG =
FILE_FORMAT =
FILE_NAME = gv_filepath_sagadr
EXCEPTIONS
FILE_NOT_FOUND = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
and lastly
open dataset gv_filepath_sagadr for output in text mode encoding default.
if sy-subrc eq 0.
loop at gt_sagadr_text into wa_sagadr_text.
transfer wa_sagadr_text to gv_filepath_sagadr.
endloop.
endif.
close dataset gv_filepath_sagadr.
if sy-subrc = 0.
message S002 with gv_filepath_sagadr. "Files & created on Application server
endif.
SO NOT SURE WHERE TO USE THE CODE AND HOW -
Conv. based on the month - Need to display the output in quarterly basis.
Hi Gurus,
I need to display the output quarterly based on the month.
For example,
If the year is 2012 and month is between
01 to 03 i need to display it as 2012Q1
likewise 04 to 06 as 2012q2
and 07 to 09 as 2012q3
and 10 to 12 as 2012q4.
Please help me by providing sample codes. Please help yourself by writing the code and get back when you have a specific question.
Thanks!
Regards,
Manoj
Edited by: kishan P on Mar 2, 2012 3:14 PMHi Vinod
To get the last 13 months in webi report .follow below approach
Assuming you have calendar Month object in the report.
convert your selected date into M/d/yy format . let's say you selected 12/18/13 , your variable should be 12/1/13
variable :
Selected Month =ToDate(FormatDate(useresponse("Date");"Mmm yyyy");"Mmm yyyy")
Flag for month =ToDate([CalMonth];"Mmm yyyy")<=[Selected Month]
Report filter =[Flag for month]+Previous(Self)
select the table you want to filter
add filter -> Report filter between 1 to 13.
Hope this will help. -
Junk Characters in the output XML file after Parsing
Hi
I am using DOM parser to parse an XML file.
After parsing the input XML file, i am fetching some contents
from the same and also putting the same contents in the parsed output file which is also an XML file.
The problem here is that the after putting the contents to the output XML file from the input XML file,
some junk character appears at the end of each and every tag in the outputfile.
The junk character is some thing like this : " ampersand hash thirteen and a semicolon "
(*THE MESSAGE DID NOT ACCEPT THE SYMBOLS KINDLY TRANSLATE THE ABOVE WORDINGS*
INTO SYMBOLS)
This character gets appended at the end of each and every tag in the output file due to which the output file
is not recognised as an XML file.
Please let me know as to why is this character appearing and also please suggest some solution
for the same.
-Thanks in Advance.
Edited by: itskarthik on Oct 10, 2008 7:16 AM
Edited by: itskarthik on Oct 10, 2008 7:18 AM
Edited by: itskarthik on Oct 10, 2008 7:19 AM
Edited by: itskarthik on Oct 10, 2008 7:19 AM
Edited by: itskarthik on Oct 10, 2008 7:23 AM
Edited by: itskarthik on Oct 10, 2008 7:23 AMWierd.
Try this piece of code. (You can always change it to use input file and output file instead of string if you want)
What is your output?
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.transform.Result;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import org.w3c.dom.Document;
public class XMLTest {
public static void main(String[] args) throws Exception {
String input = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n" +
"<test>\r\n" +
"</test>";
System.out.println("Input:");
lookForCR(input);
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
Document doc = factory.newDocumentBuilder().parse( new ByteArrayInputStream(input.getBytes()) );
Source source = new DOMSource(doc);
ByteArrayOutputStream bArrOut = new ByteArrayOutputStream();
Result result = new StreamResult( new StripOutputStream( bArrOut ) );
Transformer xformer = TransformerFactory.newInstance().newTransformer();
xformer.transform(source, result);
System.out.println("\nResult:");
lookForCR(bArrOut.toString());
System.out.println("\nDone");
public static void lookForCR(String input) throws Exception {
char[] chars =input.toCharArray();
for ( char chr : chars ) {
if (chr == 13 ) {
System.out.println("Has 0x0D character!!");
class StripOutputStream extends OutputStream {
OutputStream out = null;
public StripOutputStream(OutputStream out) {
this.out = out;
@Override
public void write(int b) throws IOException {
if ( b != 13 )
out.write(b);
}- Roy -
LabWindows / CVI: how to change the output executable file name
For example, I have an A project a.prj, I do not want to compile the output file is a.exe, but b.exe.
I will try to save as a.prj b.prj, a.cws save as b.cws
eg:a.prj ---->(output)--->b.exe
Solved!
Go to Solution.You can go to Build >> Target Settings menu item, select Release (or Release 64) in the Configuration filed and set the name of the executable to create in Application FIle field, withouyt need to change the prj or cws filename.
See the complete description of available options here.
Proud to use LW/CVI from 3.1 on.
My contributions to the Developer Zone Community
If I have helped you, why not giving me a kudos? -
Not receiving the output xml file from BPM
Hello
I am doing a scenario where I'd be sending two files in text format to the BPM workflow which would be using Fork and Correlation to merge these two files into one file and send the output xml file as receiver. Problem is that the two files are successfully converted into the xml messages and are displayed in SXMB_MONI but the output file which would be received from BPM engine as receiver is not being generated and displayed in SXMB_MONI as well as RWB. Please suggest any probable solution.
Thanks.I don't think you can manipulate .ai files in Flex /
AIR. -
Download the output into Excel...(List- export- spreadsheet)
Dear friends,
I want to download the output into Excel...
I am using all SAP standards and using the ALV Block list
Ex: List->export->local file.. is anable from here i can download to excell .....but the same there is anothere option : List->export->spreadsheet...( this one inactive.)
I want to activate the List->export->spreadsheet option.
how to do this???
Thanks,
Sridhar.Hi
Use the Function Module:
EXCEL_OLE_STANDARD_DAT
For your purpose.
But by default you can get the option to download into several formats including your desired one.
Regards,
Sreeram -
Split the IDOC into multiple IDOC if the IDOC has more than 500 records
Hi All,
I developed an outbound IDOC in which we are facing an issue.
There is some limitation on the maximum idoc size it can handle.
If number of records is more than 500, split the idoc into multiple iDoc's, e.g. if it would have 1300 records , the result would be 2 iDoc's with 500 records, and the last one would have 300 records
How can i acheive this.
Regards
JaiHi,
1) first you need to know which message type/Idoc type you are triggering.
2) Get the Corresponding processcode from Partner profiles(WE20/ WE41).
3) Then the look for prper user-exit in the related processing FM.
4) write logic to split the IDoc accordingly.
if no proper user exit available then copy the standard processing FM and need to all ALE related configurations.
Catch hold any ABAP expert in your team to do all these.
Suresh -
Split the mileage into VAT and non VAT applicable -Travel Expenses
Dear all,
I need help from you in cofiguring the travel expenses for Input VAT i.e to split the mileage into VAT and non VAT applicable so that we can claim reimbursement from the govt. so how can we get this on the Travel Expenses form.
Pl. I need help on this.
Regards,
Sushma.Dear Dominic,
Thank you for your suggestion, Could you pl. tell me where Can I create the additional Line Item, In which Transaction code it is? I can't able to see this additional line Item in T-code: PRFI or in TRIP.
Pl. suggest me the way, it is very urgent.
Thanks in advance,
Sushma. -
why is it when i update my status on facebook from iphone it splits the updates into two differents boxes with some funky symbols at the beginning.. I have uninstall facebook and installed it over and it still does it. only the facebook IPHONE app where it says to update staus text to FBOOK i have already update my phone too.
if i go on the facebook site and update there through a brower on iphone it will work fine just cant us IPHONE mobile upload, . But its a pain of not using my IPHONE APP for facebook cause it does that.The warranty entitles you to complimentary phone support for the first 90 days of ownership.
-
My ipods disabled and it needs to connect to itunes. During the restore a window pops up and says i need to type the password into my ipod but i can't. what do i do?
Then try DFU mode and then restore.
How to put iPod touch / iPhone into DFU mode « Karthik's scribblings -
How to remove the extra space in the output pdf file?
Hi All
In our RTF layout template we have both static content and dynamic content.
In RTF template we have used many if-else,choose,For each loops.
On the account of that,In the output pdf file, we are getting lot of empty space in the place of that coding(if-else,choose,For each loops).
Is there anyway to reduce the space in the output pdf file?
Please suggest some ideas.
Thanks in Advance.White space is NOT your friend!
Make sure you don't have any unwanted whitespace between commands and especially tagged on the end of lines. Chain your commands together with no whitespace and let them wrap, do not enter carriage returns.
Cheers,
Dave -
When I import a CD from the Apple Mac drive it splits the cd into numerous single tracks in itunes instead of 1 album with all the tracks. How can I get it to import to the one place. I did try importing the same cd on a friends apple mac to see if it did the same thing and it imported the cd as 1 album with all tracks in there so I can't understand why it's separating them all.
This happens mostly when you import a compilation or a CD that is not noted in the Gracenote Database.
How to change back in one Album:
Mark all titles of that album (shift or cmd click)
Right click and choose "Get info"
Fill in the wanted name in "Album" and "Album Artist*"
Drag&Drop the wanted Album Art to the little window down right in that pane.
iTunes group and sort albums by that two entry's in the info pane. If the CD is not listed in the database but the titels, iTunes split the album to fit the titles to eventually matching albums of the artists.
Cheers - Lupunus
* If you import a compilation, choose "various artits" for the Album Artist field.
Message was edited by: lupunus -
Need to split the document in 950 line iteam record in LSMW
HI ALL,
I am posting documents using LSMW for Tcode FB01. But some documents having more no of line items like 1000.
But SAP will allow only 950 line tems for each documents. In this sistuvation we need to split the data as 950 and 50. we need to post 2 different documents with same header data.
<removed by moderator>.
regards,
srikanth
Moderator message: please do not ask for documents being sent to you directly.
Edited by: Thomas Zloch on Nov 15, 2010 2:18 PMThere are a couple of things you can do:
instead of posting the individual line itame detail, post summary items.
Create a dummy offset account. Total the first 950 items and post the remainder to the offset. Then do the same for the remaining items. The total to the offset will be zero.
If you search the forum, you will find more details on this.
Rob
Maybe you are looking for
-
MacBook Pro Hard-Drive and MagSafe Power Adaptor
I have just purchased a 15.4" MacBook Pro (Model number A1150) from eBay. The system was sold as being for spares or repair and because I'm up for a challenge and desperate to break away from my ties to Windows and move into the Mac world I thought I
-
As of recently, I just started noticing a issue with powering on a new intel xserve. If the machine is running, using LOM and shut down works beautifully. After I shut it down, using LOM and the button works beautifully. If i attempt to turn it back
-
Hi Everyone, I would like to close the partial open service PO for the balance services. How do i do it? Regards Nitin
-
Outbound IDocs are not visuible in Middleware system(SeeBeyond)
Hi Experts, We need need your expertise help on this issue. Issue: The Outbound IDocs which are in status 12 in SAP system are not visuible in Middleware system(SeeBeyond) for customized message type( forecast -ZFOSHT) If we create a IDoc by using cu
-
Pixel dimensions for stills in FPCX?
For use in a FCPX HD project, at what ppi do you recommend scanning? Then do you recommend taking it into photoshop? At what pixel dimensions do you recommend saving it -- and in what format -- jpeg or tiff? Thank you!