01-07-2015
Guys,
Thanks a lot for your prompt and detailed help. I am not able to put together script which can help me to dynamically create the insert script with different separators. And this will also insert data (using the insert statements created with your help) into the database table and cleanup the intermediate files.
Once again thanks a ton for your help especially RudyC, Akshay and Pravin. You guys really rock!! Keep the good work going.
Thanks.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi ,
I am new to linux and also also to shell scripting.
I have one shell script which unpacks .tgz file and install software on machine.
When this script runs I want to insert id,filename,description(which will be in readme file),log(which will be in log file) and name of unpacked folder... (1 Reply)
Discussion started by: ring
1 Replies
2. UNIX for Advanced & Expert Users
Hi,
I have delimited file(|).
Sample data:
1|name|50009|DS24|0|12
2|name|30009|DS24|0|13
3|name|20409|DS24|0|14
4|name|20009|DS24|0|15
5|name|10009|DS24|0|16
I want to load this data into a oracle table (update and insert)
Please help me the commands and also... (1 Reply)
Discussion started by: unihp1
1 Replies
3. Web Development
If you have a text file and if you want to Insert data to your Database Table, You can do it with these queries
LOAD DATA LOCAL INFILE '/path/yourTextFile.txt' INTO TABLE yourTableName
FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '"'
ESCAPED BY '\\'
LINES TERMINATED BY '\n' (0 Replies)
Discussion started by: sitex
0 Replies
4. UNIX for Dummies Questions & Answers
hi,
I need to create a bash shell script which picks up data from a text file and in the output file puts it into an html made table. I have to use sed and awk utilties to do this
the input text file will contain data in the format:
job name para1 para2 para3 para4 para4
1 ... (1 Reply)
Discussion started by: intern123
1 Replies
5. Shell Programming and Scripting
I need to write a unix shell script to connect to oracle database and retrieve data from a table, the script should count the total number of rows till date in that table
number of rows which are getting filled per hour on current day and the peak hour of the current day
number of rows which are... (5 Replies)
Discussion started by: PhAnT0M
5 Replies
6. Shell Programming and Scripting
Hi All,
I want to insert STAT and ENDTIME values for each job in joblist into TBL_DAILY_STATUS table.
Eg: insert into tbl_daily_status values(STAT,ENDTIME);
Please help me on this.
#!/bin/ksh
joblist="com_abc_job com_abc_dot_job com_abc_seq com_abc_det"
for i in $joblist
do... (8 Replies)
Discussion started by: vichuelaa
8 Replies
7. Shell Programming and Scripting
I have a table in an Informix DB into which I want to insert multiple records at a time. Data for one of the column should be unique & other column data may be the same for all the records I insert
Typical Insert Statement I use to insert one row :
insert into employee(empid, country, state)... (5 Replies)
Discussion started by: nisav
5 Replies
8. Shell Programming and Scripting
Hi Friends,
I looking for the script for the count of the records in table.
and then it's containg the zero records then should get abort.
and should notify us through mail.
Can you please help me out in this area i am lacking. (5 Replies)
Discussion started by: victory
5 Replies
9. Shell Programming and Scripting
I have a test file that I want to read and insert only certain lines into the
the table based on a filter.
1. Rread the log file 12 Hours back Getdate() -12 Hours
2. Extract the following information on for lines that say "DUMP is
complete"
A. Date
B. Database Name
C.... (2 Replies)
Discussion started by: JolietJake
2 Replies
10. UNIX for Beginners Questions & Answers
I have this code with me but the condition is If any of the mandatory columns are null then entire file will be rejected.
LOAD DATA
infile ' ' #specifies the name of a datafile containing data that you want to load
BADFILE ' ' #specifies the name of... (1 Reply)
Discussion started by: raka123
1 Replies
LEARN ABOUT PHP
mongogridfs.put
MONGOGRIDFS.PUT(3) 1 MONGOGRIDFS.PUT(3)
MongoGridFS::put - Stores a file in the database
SYNOPSIS
public mixed MongoGridFS::put (string $filename, [array $metadata = array()], [array $options = array()])
DESCRIPTION
Note
MongoGridFS::put is an alias of MongoGridFS::storeFile.
PARAMETERS
o $filename
- Name of the file to store.
o $metadata
- Other metadata fields to include in the file document.
Note
These fields may also overwrite those that would be created automatically by the driver, as described in the MongoDB core
documentation for the files collection. Some practical use cases for this behavior would be to specify a custom chunkSize or
_id for the file.
o $options
- An array of options for the insert operations executed against the chunks and files collections. See MongoCollection.insert(3)
for documentation on these these options.
RETURN VALUES
Returns the _id of the saved file document. This will be a generated MongoId unless an _id was explicitly specified in the $metadata param-
eter.
ERRORS
/EXCEPTIONS
Throws MongoGridFSException if there is an error reading $filename or inserting into the chunks or files collections.
SEE ALSO
MongoGridFS.storeBytes(3), MongoGridFS.storeFile(3), MongoGridFS.storeUpload(3), MongoDB core docs on GridFS.
PHP Documentation Group MONGOGRIDFS.PUT(3)