10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
i need code to get sql queries through a shell script for a text file input which contain the service ids
iputfile
I-H-2048-10GB-M
I-H-4096-12GB-M
I-H-2048-p1000-M
the code should contain below queries among which service_id is replacable with value from input file.
... (4 Replies)
Discussion started by: surender reddy
4 Replies
2. Programming
SQL> select
2 distinct qc_m|| ',' ||
3 to_char(logon_dt, 'YYYY-MM-DD HH24:MI:SS')|| ',' ||
4 CASE WHEN logon_dt IS NOT NULL THEN 'LOGON' ELSE 'LOGOFF' END
5 from qc_ct2 qc left join v_tls_equipment_logon tls on qc.qc_m=tls.equipment_id where
6 qc.terminal_c='T'and... (1 Reply)
Discussion started by: ment0smintz
1 Replies
3. Shell Programming and Scripting
Hi ,
I have a txt file with contents like:
1234
2345
3456
7891
I need to write a script which takes input file as txt file..run a sql query for that number and place the output of query in another file..
select * from bus_event where acct_nbr='1234'( from input txt file)
the query... (20 Replies)
Discussion started by: Rajesh Putnala
20 Replies
4. Shell Programming and Scripting
Dear Members,
I have a table in Oracle DB and one of its column name is INFO which has data in text format which we need to fetch in a script and create an xml file of a new table from the input.
The contents of a single cell of INFO column is like:
Area:app - aam
Clean Up Criteria:... (0 Replies)
Discussion started by: Yoodit
0 Replies
5. Shell Programming and Scripting
Hi All
I have a problem with one of my scripts which checks for he status of an Oracle database.
Here's the script:
#!/bin/ksh
sqlplus -s '/nolog' <<EOF
connect / as sysdba
set heading off
spool db_status.txt
select OPEN_MODE from v\$database
/
exit
EOF
db_status=$(more... (4 Replies)
Discussion started by: huskie69
4 Replies
6. Shell Programming and Scripting
Hi ,
I used the below script to get the sql data into csv file using unix scripting.
I m getting the output into an output file but the output file is not displayed in a separe columns .
#!/bin/ksh
export FILE_PATH=/maav/home/xyz/abc/
rm $FILE_PATH/sample.csv
sqlplus -s... (2 Replies)
Discussion started by: Nareshp
2 Replies
7. UNIX for Dummies Questions & Answers
Hi guys,
I am new on here, I have a function in oracle that returns a specific value:
create or replace
PACKAGE BODY "CTC_ASDGET_SCHED" AS
FUNCTION FN_ASDSCHEDULE_GET
RETURN VARCHAR2
AS
BEGIN
DECLARE
ASDSchedule varchar2(6);
ASDComplete... (1 Reply)
Discussion started by: reptile
1 Replies
8. Shell Programming and Scripting
Hi,
I need help urgently for following issue. Pls help me to resolve this issue.
I am calling sql script file(file1.sql) from UNIX Shell Script(script1.ksh) using sql plus and trying to create flat file that contains all records returned from SQL query in SQL script(file1.sql)
I given... (6 Replies)
Discussion started by: praka
6 Replies
9. Shell Programming and Scripting
Hi,
I need confirmation whether the same functionality exists when running the sql's.
For ex. let us consider there exists a sql file with name june.When running in sql mode does:
@june.sql and start june.sql does the same functionality.
Someone help me.
Thanks
Ashok. (1 Reply)
Discussion started by: Ashok_oct22
1 Replies
10. Shell Programming and Scripting
Hi All,
I have a Sqlplus report which will create a file.
I need a FTP Script that will be executed inside the Sqlplus Report to FTP the report output file to unix server.
Thanks,
Previn (0 Replies)
Discussion started by: vprevin
0 Replies