Sponsored Content
Top Forums Shell Programming and Scripting Linux Script to copy and rename files through SQL statement Post 303007183 by usman_oracle on Monday 13th of November 2017 06:24:38 AM
Old 11-13-2017
Hi,
for your queries blow is the response.
Is this homework/assignment? There are specific forums for these.
This is assignment
What have you tried in your script so far?
Well, i am new to linux, if have tried to copy cp and rename files.
What output/errors do you get?
currently unable to initialize output of SQL Query in script
What OS and version are you using?
Linux Red Hat 5.8
What are your preferred tools? (C, shell, perl, awk, etc.)
shell
What logical process have you considered? (to help steer us to follow what you are trying to achieve)

How do you get the report names? I don't see it in your SQL.
in SQL (pt.user_concurrent_program_name ) is the report name. system generate the report and saves its name and output path in a table
Can I presume that the headings in bold do not actually appear in your output? If they do, i don't see where your SQL generates them.
actually bold heading are the column name of the table

Regards,

---------- Post updated at 06:24 AM ---------- Previous update was at 06:13 AM ----------

Code:
Select 
pt.user_concurrent_program_name report_name , 
OUTFILE_NAME output_path
FROm 
apps.fnd_concurrent_programs_tl pt, 
apps.fnd_concurrent_requests f 
where 
pt.concurrent_program_id = f.concurrent_program_id 
and pt.application_id = f.program_application_id 
and f.RESPONSIBILITY_ID = 52431 
and trunc(f.request_date) = trunc(sysdate)

 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

copy and rename list of files

Hi all, I am a newbie in writng unix..I am using ksh shell..Does anyone know how to copy a list o files from directory A to directory B with differnt names? i.e in Dir A, I have RPT101.555.TXT RPT102.666.TXT and I want to copy those files to dir B with new naming convention.. in Dir B,... (7 Replies)
Discussion started by: kinmak
7 Replies

2. UNIX for Dummies Questions & Answers

script to rename files with current date and copy it.

I have few webservers logs like access.log. which would be growing everyday. what i do everyday is, take the backup of access.log as access.log_(currentdate) and nullify the access.log. So thought of writing a script... but stuck up in middle. My requirement: to take the backup and nullify... (6 Replies)
Discussion started by: logic0
6 Replies

3. Shell Programming and Scripting

Copy files from folder and rename them

hello, I need to build a shell script that receives the folder to copy by parameter and copy all files except thumb.db to another folder and rename them like, file.jpg renamed to file_bb1.jpg. can someone help me Thanks (4 Replies)
Discussion started by: zeker
4 Replies

4. Shell Programming and Scripting

Files rename and copy

hello, I am write a Script and i would listing all Files from Path1 out with DSR*.txt and give a new name an copy to the Path2. I have problems with that to rename. Someone can help me? Sorry, for my english. My english is not gut. I hope you understand my. That is my Script. ... (2 Replies)
Discussion started by: efeijoo
2 Replies

5. Shell Programming and Scripting

Help with script to copy/rename files, then delete by date

Hi All, I am new to scripting and am looking for some assistance setting up a script. Basically I need the script to scan a folder for the newest files and make a copy of those files, adding a month to the date stamp. I also need this script to delete the previously copied files to save space.... (4 Replies)
Discussion started by: Lucid13
4 Replies

6. Shell Programming and Scripting

Linux Script to compare two folders and copy missing files

Hi, I need help in shell scripting. If someone can help me, that would be great! Problem. I want Linux Script to compare two folders and copy missing files. Description. I have two directories /dir1 /dir2 I need to copy all distinct/new/unique/missing files from /dir1 and that... (1 Reply)
Discussion started by: S.Praveen Kumar
1 Replies

7. Shell Programming and Scripting

Copy down remote files and rename them to include the server name with full path

I need to pull down a good bit of files for another support team for an upgrade project. I have a server.list with all of the server names. I need to do two parts: FIRST: I have this example, but it does not list the server name in front of each line. #! /bin/bash for server in $(<... (10 Replies)
Discussion started by: asnatlas
10 Replies

8. Shell Programming and Scripting

Is better way copy list of multiple files, rename and gzip

Is better way to write the script loop through one by one "Old_File_1: & New_File_1:" to copy 100 files to /staging/test folder then re-name & gzip all those files? I wrote this code below and don't like that much. Thanks I have a control_file under /tmp/test folder like below 100 files and... (10 Replies)
Discussion started by: dotran
10 Replies

9. Shell Programming and Scripting

Oop to copy and rename files through SQL Statement in shell Script

#!/bin/sh sqlplus -s "/ as sysdba" << EOF SET HEADING OFF SET FEEDBACK OFF Select pt.user_concurrent_program_name , OUTFILE_NAME FROm apps.fnd_concurrent_programs_tl pt, apps.fnd_concurrent_requests f where pt.concurrent_program_id = f.concurrent_program_id and pt.application_id =... (1 Reply)
Discussion started by: usman_oracle
1 Replies
SQL::Translator::Schema::Index(3pm)			User Contributed Perl Documentation		       SQL::Translator::Schema::Index(3pm)

NAME
SQL::Translator::Schema::Index - SQL::Translator index object SYNOPSIS
use SQL::Translator::Schema::Index; my $index = SQL::Translator::Schema::Index->new( name => 'foo', fields => [ id ], type => 'unique', ); DESCRIPTION
"SQL::Translator::Schema::Index" is the index object. Primary and unique keys are table constraints, not indices. METHODS
new Object constructor. my $schema = SQL::Translator::Schema::Index->new; fields Gets and set the fields the index is on. Accepts a string, list or arrayref; returns an array or array reference. Will unique the field names and keep them in order by the first occurrence of a field name. $index->fields('id'); $index->fields('id', 'name'); $index->fields( 'id, name' ); $index->fields( [ 'id', 'name' ] ); $index->fields( qw[ id name ] ); my @fields = $index->fields; is_valid Determine whether the index is valid or not. my $ok = $index->is_valid; name Get or set the index's name. my $name = $index->name('foo'); options Get or set the index's options (e.g., "using" or "where" for PG). Returns an array or array reference. my @options = $index->options; table Get or set the index's table object. my $table = $index->table; type Get or set the index's type. my $type = $index->type('unique'); Get or set the index's type. Currently there are only four acceptable types: UNIQUE, NORMAL, FULL_TEXT, and SPATIAL. The latter two might be MySQL-specific. While both lowercase and uppercase types are acceptable input, this method returns the type in uppercase. equals Determines if this index is the same as another my $isIdentical = $index1->equals( $index2 ); AUTHOR
Ken Youens-Clark <kclark@cpan.org>. perl v5.14.2 2012-01-18 SQL::Translator::Schema::Index(3pm)
All times are GMT -4. The time now is 11:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy