Uploading Importing text file & crosstab display
<p> I want to upload a text tab delimited file into our db, currently we
are uploading it to a temp table in the db, do some validation checks and write
to a table when done. I have two questions:</P>
<p> 1) Is there a more efficient way of upload/importing flat files into
the db via forms, like loading data into a non db data block and working on the
data via loops rather than sql in a temp table.</P>
<P> 2) I want to present the data to the user(for verification) via a form
screen as they have read it in, the only way I can think of doing this, is
populating a temp table and then using a data block based on a stored procedure
that contains a dynamic pivot query package since I don't know the
number of columns that the file will contain. Data blocks can do either
vertical or horizontal alignment but not grid.</P>
<P> File will take the format of: </P>
col1 col2 col3
row1 data_r1c1 data_r1c2 data_r1c3
row2 data_r2c1 data_r2c2 data_r2c3
row3 data_r3c1 data_r3c2 data_r3c3
row4 data_r4c1 data_r4c2 data_r4c3
<BR>
<P>Thank you in advance </P>
Thank you for your reply
1) It's a utility for users and so it has to be through forms
Presently I think it is better to read it in to a temp table then I can use sql for validation which would be faster than looping through blocks. But with this approach I'm just a little worried about Lost Updates e.g. what if someone is changing scores in the regular update screen while another person is trying to import them via the import utility.
2) I have to use a stored procedure because I don't know how many columns a user will want to load in, sometimes it could be 2,3 or 5 etc. So basically I am looking at a way of presenting the data from it's stored format in it's read in format i.e. file format
File format =
col1 col2 col3 coln
row1 data_r1c1 data_r1c2 data_r1c3 data_r1cn
row2 data_r2c1 data_r2c2 data_r2c3 data_r2cn
row3 data_r3c1 data_r3c2 data_r3c3 data_r3cn
rown data_rnc1 data_rnc2 data_rnc3 data_rncn
It is stored in the temp table as
row1 col1 data_r1c1
row2 col1 data_r2c1
row1 col2 data_r1c2
row2 col2 data_r2c2
Example
Test1 Test2 Test3 Test4
John 54 45 70 65
Jane 38 55 72 70
Stored in the temp and subsequently written to Student Score table as
Student Test Score
John Test1 54
John Test2 45
John Test3 70
John Test4 65
Jane Test1 38
Jane Test2 55
Jane Test3 72
Jane Test4 70
Similar Messages
-
Importing text file (with file names) into Automator.. is it possible?
Hello all,
I have been working with Windows Batch files for my line of work. I have a couple of file names in a text file (a column), which I want to copy from one folder of one hdd to another folder on a different hdd. I have been trying to do this kind of work with a Mac. I already know how you copy and rename files in automator (which isn't difficult, of course) but you have to 'select' the files in the finder first (with get specified items).
But the only way i see that you can specify items is by selecting them... is there a way to import a text file with all the file names instead of selecting all the file names manually?
or is there an AppleScript alternative which I can use to import the text file (or just copy into applescript) and run before the query's of copying and renaming the files? I am kind of new to Apple programming.
The text file looks like this:
image1.jpg
image2.jpg
etc..
so there has to be a command to: 'goto' a specific folder as well.
Thanks in advance!You can import text files, but if they are just names you will need an additional action to add the source folder path. A *Run AppleScript* action can be used, for example:
Tested workflow:
1) *Ask for Finder Items* {Type: files } -- choose the text file containing the names
2) *Combine Text Files* -- this gets the text file contents
3) *Filter Paragraphs* { return paragraphs that are not empty } -- skip blank lines
4) *Run AppleScript* -- copy and paste the following script:
<pre style="
font-family: Monaco, 'Courier New', Courier, monospace;
font-size: 10px;
font-weight: normal;
margin: 0px;
padding: 5px;
border: 1px solid #000000;
width: 680; height: 340px;
color: #000000;
background-color: #FFEE80;
overflow: auto;"
title="this text can be pasted into an Automator 'Run AppleScript' action">
on run {input, parameters} -- add folder path
add the specified folder path to a list of file names
input: a list of text items (the file names)
output: a list of file paths (aliases)
set output to {}
set SkippedItems to {} -- this will be a list of skipped items (errors)
set SourceFolder to (choose folder with prompt "Choose the folder containing the file names") as text -- this is the folder containing the names
repeat with AnItem in the input -- step through each name in the input
try
set AnItem to SourceFolder & AnItem -- add the prefix
set the end of the output to (AnItem as alias) -- test
on error number ErrorNumber -- oops
set ErrorNumber to (" (" & ErrorNumber as text) & ")" -- add the specific error number
set the end of SkippedItems to (AnItem as text) & ErrorNumber
end try
end repeat
ShowSkippedAlert for SkippedItems
return the output -- pass the result(s) to the next action
end run
to ShowSkippedAlert for SkippedItems
show an alert dialog for any items skipped, with the option to cancel the workflow
parameters - SkippedItems [list]: the items skipped
returns nothing
if SkippedItems is not {} then
set {AlertText, TheCount} to {"Error with AppleScript action", count SkippedItems}
if TheCount is greater than 1 then
set theMessage to (TheCount as text) & space & " items were skipped:"
else
set theMessage to "1 " & " item was skipped:"
end if
set {TempTID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, return}
set {SkippedItems, AppleScript's text item delimiters} to {SkippedItems as text, TempTID}
if button returned of (display alert AlertText message (theMessage & return & SkippedItems) ¬
alternate button "Cancel" default button "OK") is "Cancel" then error number -128
end if
return
end ShowSkippedAlert
</pre>
5) *Copy Finder Items* { To: _your external drive_ } -
hey ppl
i have a datagrid in my form.i need to read input(fields..sort of a database) from a text file and display its contents in the datagrid.
how can this be done.. and also after every few seconds reading event should be re executed.. and that the contents of the datagrid will keep changing as per the changes in the file...
please help as this is urgent and important.. if possible please provide me with an example code as i am completely new to flex...
thanks.....It's not possible to read from a file without using classes from the core API*. You'll have to get clarification from your instructor as to which classes are and are not allowed.
[http://java.sun.com/docs/books/tutorial/essential/io/]
*Unless you write a bunch of JNI code to replicate what the java.io classes are doing. -
Upload a text file of values when run a query
In SAP BW 3.x BEx Analyzer, we can import a text file with list of values for each variable.
For example, you want to run a report for certain product numbers, but say the prod no list is of 3000 no's long, it'll take the user forever to select and enter them in the report entry variable, so instead you upload a text file, with all this list of 3000 prod no's and run the report.
Does this option still exist anywhere for version 7.0? BI Analyzer is different than Bex Analyzer. Can anyone explain it? Thanks!Hi Qingbo,
Not using any standard solution (i don't know any in 3.5) you can use an variable of type exit. Inside the variable value calculation, you can use a flat file stored in the application server to read the values of the variable.
Another option is to store those values in a cube (mantained using flat file upload or a BPS layout) and use a replacement path variable using a query over this cube to run the query you need.
Hope this helps.
Regards,
Diego -
How to upload the text file into smart forms
Hi Experts,
can any one tell me that how to upload the text file or html file to SAP Script form or smart forms
i have download the form info from SAPscript form.to text file.
now i want to upload the text file to smartforms.
is it possible ? if it is possible, then how can i do that ?
Thanks in Advance.
Regards,
Mani<b>For Scripts</b>
Go to SE38. Put in the program name RSTXSCRP. Execute it.
Mode(Export/Import) : Import.
Give the file name from which you want to upload and execute it.
<b>For Smartforms</b>
TCode : smartforms.
Give the form name.
Utilities-->Upload form.
Reward points if helpful.
Thanks
Aneesh. -
Import Text Files Into Apple Notes?
Hello,
Is there a way for me to automate importing text files into Apple Notes? I can certainly do this manually via copy/paste, but have over 700 files to transfer.
Peace,
Dr. Z.Automator is Apple's simple way to do tasks like this, but Notes app doesn't have any actions for this so I assume you need to use Applescript to do this. Double check Automator - I am on 10.9 & maybe 10.10 added support for Notes in Automator? Enter 'Note' in the search field to see if Automator can make new Notes.
There is an example for making notes at…
http://www.macosxautomation.com/applescript/notes/04.html
See the "Create New Stylized Note" script <- click script icon to download it, copy & paste seems to fail because of how the browser displays characters.
You would need to adapt that script to import from the text files.
I'm not sure you really want to do that anyway - Notes app has such poor support that putting serious data into it looks like a mistake - how difficult will it be to export data when Apple eventually abandon it? It seems like a toy app to me for new iPhone users, it;s unclear if it will ever be able to compete with other options. There are third party apps to export from Notes.app, but why rely on third parties? A notes app should allow you to import & export your data!
Notational Velocity seems like a better choice…
http://notational.net/
It will handle notes as text files if you desire, so you can store them in Dropbox if you want. You can also set it to sync to Simplenote on iOS.
http://simplenote.com/
If you need images within notes or text styling you could use Evernote or one of the many other notes apps.
Sorry to sound so negative on Notes.app, it's OK but I don't think its the best place to put over 700 notes. -
How to upload a text file from a shared folder and provide an o/p
how to upload a text file from a shared folder and provide an o/p containing the details in each order in the text file
Hi,
Use <b>GUI_UPLOAD</b> to upload a text file from a shared folder.
Use <b>GUI_DOWNLOAD</b> to download data in a file on the presentation server or use <b>OPEN DATASET, TRANSFER</b> and <b>CLOSE DATASET</b> statements to download data to the application server.
Now, I hope the code for data fetching, if required, is already present in the report.
Reward points if the answer is helpful.
Regards,
Mukul -
Importing text file into search and redact window.
I am in the search window under the search and redact tool. I
am trying to import a file that was originally an excel to populate the
search multiple words window. I read that text files can be imported. I saved the file as a text file but it does not import. I can import an adobe file but this gives me a list with a bunch of junk. What am I missing?The dialog imports text files.
Make sure that the file you are importing is a text file and has one word in every line. -
'No Upload Authorization' While Uploading a Text File from Multiple Select
Hi all,
The User is trying to upload a text file from Multiple Selection screen of a Query in BEx and it gives the error message of 'No Upload Authorization' (Error DB886).
In 'Logon data' tab of Tcode SU01, it has 'User' for 'User Group for Authorization check' for this User.
I could upload a text file from Multiple Selection screen with my User Id.
An idea about this error, PLEASE ?
Thanks,
Venkat.Hi Ron,
This User does not have the access to Tcode ST01.
The user executed Tcode SU53 immediately following the authorization failure to see the authorization objects. The 'Authorization obj' is blank and under the Description it has 'The last Authorization check was successful' with green tick mark.
Any further suggestions, PLEASE.
Thanks. -
Uploading a text file to FTP Loc
Hi,
Please guide me in the following query:
While uploading a text file to FTP Loc by using FM 'FTP_R3_TO_CLIENT', all the data is coming in one line. Please guide me how can i insert the new line character after the end of each line.
Please guide.
Thanks and RegardsHi,
When i make the character_mode = 'X', then no data is getting uploaded to FTP Loc, only a blank file is being created. Please guide.
Thanks and Regards
Edited by: MP Vashishth on Jan 12, 2010 10:34 AM -
How to upload a text file to a webpage and process it using a Java app?
Apologies if the question is off topic.
I would like a user to upload a text file to a webpage and have a pre-existing Java application I created process the text file and return the results to the user. The Java application is fairly memory intensive. It is expected that multiple clients will be uploading at the same time. What is the simplest or most efficient method to achieve this?
Thank youThis might help you to get started: http://www.roseindia.net/jsp/file_upload/Sinle_upload.xhtml.shtml
As done in this example, processing the uploaded file in the JSP itself may not be a good idea though. You're better off handling it in your controller servlet or action class. -
Reading from a text file and displaying the contents with in a frame
Hi All,
I am trying to read some data from a text file and display it on a AWT Frame. The contents of the text file are as follows:
pcode1,pname1,price1,sname1,
pcode2,pname2,price2,sname1,
I am writing a method to read the contents from a text file and store them into a string by using FileInputStream and InputStreamReader.
Now I am dividing the string(which has the contents of the text file) into tokens using the StringTokenizer class. The method is as show below
void ReadTextFile()
FileInputStream fis=new FileInputStream(new File("nieman.txt"));
InputStreamReader isr=new InputStreamReader(fis);
char[] buf=new char[1024];
isr.read(buf,0,1024);
fstr=new String(buf);
String Tokenizer st=new StringTokenizer(fstr,",");
while(st.hasMoreTokens())
pcode1=st.nextToken();
pname1=st.nextToken();
price1=st.nextToken();
sname1=st.nextToken();
} //close of while loop
} //close of methodHere goes my problem: I am unable to display the values of pcode1,pname1,price1,sname1 when I am trying to access them from outside the ReadTextFile method as they are storing "null" values . I want to create a persistent string variable so that I can access the contents of the string variable from anywhere with in the java file. Please provide your comments for this problem as early as possible.
Thanks in advance.If pcode1,pname1,price1,sname1 are global variables, which I assume they are, then simply put the word static in front of them. That way, any class in your file can access those values by simply using this notation:
MyClassName.pcode1;
MyClassName.pname1;
MyClassName.price1;
MyClassName.sname1 -
Hi i am new to labview
I want to extract data from a text file and display it on the front panel.
How do i proceed??
I have attached a file for your brief idea...
Attachments:
extract.jpg 3797 KBRoopeshV wrote:
Hi,
The below code shows how to read from txt file and display in the perticular fields.
Why have you used waveform?
Regards,
Roopesh
There are so many things wrong with this VI, I'm not even sure where to start.
Hard-coding paths that point to your user folder on the block diagram. What if somebody else tries to run it? They'll get an error. What if somebody tries to run this on Windows 7? They'll get an error. What if somebody tries to run this on a Mac or Linux? They'll get an error.
Not using Read From Spreadsheet File.
Use of local variables to populate an array.
Cannot insert values into an empty array.
What if there's a line missing from the text file? Now your data will not line up. Your case structure does handle this.
Also, how does this answer the poster's question? -
Uploading a text file from webi filter area as part of the query condition
Post Author: balasura
CA Forum: Publishing
Requirement : Uploading a text file from webi filter area as part of the query condition Hi, I am in a serious requirement which I am not sure available in BO XI. Can some one help me plz. I am using BO XI R2, webi I am generating a ad-hoc report, when I want to give a filter condition for a report, the condition should be uploaded from a .txt file. In the current scenario we have LOV, but LOV could hold only a small number of value, my requirement is just like a lov but the list of values will be available in a text file ( which could number to 2000 or 2500 rows). I would like to upload this 2500 values in the form of a flat text file to make a query and genrate report. Is it possible in BO XI? For Eg:- Select * from Shipment Where u201CShipment id = u2018SC4539u2019 or Shipment id = u2018SC4598u2019u201D The u201Cwhereu201D condition (filter) which has shipment id will be available in a text file and it needs to be loaded in the form of .txt file so that it will be part of the filter condition. Content of a .txt file could be this shipment.txt =============== SC4539 sc2034 SC2343 SC3892 . . . . etc upto 2500 shipment Ids I will be very glad if some could provide me a solution. Thanks in advance. - BalaHi Ron,
This User does not have the access to Tcode ST01.
The user executed Tcode SU53 immediately following the authorization failure to see the authorization objects. The 'Authorization obj' is blank and under the Description it has 'The last Authorization check was successful' with green tick mark.
Any further suggestions, PLEASE.
Thanks. -
Uploading a text file to a server using gprs connection and http method
Hi,
I want to upload a text file from my windows mobile device( WM 6.1 version) to a server using the gprs connection and the http method. The application runs on IBM weme j9 VM.
Anybody having done anything similar to this,please post a code snippet or provide helpful resources..
Thanks in advance.
Edited by: 803691 on Oct 20, 2010 3:50 AMPlease give a response..
I want to know whether there is a feasible solution for this in java..
PLease provide code snippets for establishing gprs connection in java..
Maybe you are looking for
-
Hi Requirement is to copy the text from PO to Inbound delivery.Need how and what are all the step in configuration required? -Prabu
-
I can not find my photo button in my itunes when i am cinnected with my iphine 5, do you have any idea how to solve.??
-
I find the following note on Firefox help pages: "Firefox automatically detects if you are using a High Contrast theme and displays everything in your high contrast color scheme. This overrides all other other browser or web page settings, and it aff
-
How to invoke a java application in the middle of the process
In the middle of one process, I want to invoke a java application. After the java application, the process will continue and select a path based on the result of the java application. Which activity can be used to invoke a java application in the mid
-
I have Appleworks and iWork and every once in a while I will still have trouble opening microsoft word documents. Is there something out there that will let me open any microsft document without having to buy the mac version of Word. I don't want to