Sponsored Content
Top Forums UNIX for Advanced & Expert Users sqlplus and sh scripts (to_char command)) Post 6536 by rwb1959 on Thursday 6th of September 2001 09:59:31 AM
Old 09-06-2001
corrections...

I was thinking too fast this morning
without coffee...

See corrections...

INICIO=$(sqlplus -s user/user@db1 << EOF
set head off
set feed off
set serveroutput on
declare mydate char(whatever_the_length);
begin
select to_char(min(create_dt) , 'HH24') into mydate from table_name where
trunc(create_dt)=trunc(sysdate-2);
dbms_output.put(mydate);
end;
/
EOF)

...I forgot the "into mydate" in the select.
Also, I changed END to EOF since "END" is a
SQL keyword it's probably best not to use
it (even though the script terminator "/"
should have precluded any misinterpretation).
Sorry about that Smilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Use sqlplus command

Can someone tell me how to execute sqlplus command. I`m Executing: sqlplus user/pasw @/report/output/new/PlatformOut_Cdrs.sql the error is: SQL*Plus: Release 9.2.0.5.0 - Production on Wed Aug 9 15:37:44 2006 Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved. ERROR:... (3 Replies)
Discussion started by: Nel
3 Replies

2. Shell Programming and Scripting

SQLplus in Shell scripts

How to execute a query which is stored in a variable. Say for example : v_source_query=”select count(*) from emp” v_source_value=`sqlplus -S "$DATABASE_LOGIN" << EOF | tr '\n' ' ' set feed off set pagesize 0 set head... (12 Replies)
Discussion started by: trupti_d
12 Replies

3. UNIX for Dummies Questions & Answers

editing sqlplus id@passwd in multiple scripts, users and directories

hi all, i was given by my supervisor a task to search for scripts which contain oracle sqlplus i.e "myusername/mypasswd @myDB" in every /home/userfolder, which are, all the scripts made by different user. I've done some find command to search string for sqlplus, but it may up too long to respond.... (8 Replies)
Discussion started by: Helmi
8 Replies

4. HP-UX

sqlplus: command not found

hi, i need bash shell script run on the crontab(Unix tru64). i have write my shell. it's using sqlplus command and connect to oracle db. execute cron job when i have error messege: "sqlplus: command not found" have you any suggestion? (4 Replies)
Discussion started by: Tlg13team
4 Replies

5. Shell Programming and Scripting

list all scripts in crontab which contains the string "sqlplus"

Hi folks I use a Solaris 10 box with Bash shell. I have here a script (it works!) to list all scripts in crontab which contains the string "sqlplus": for i in $(ls `crontab -l | grep -v '#' | awk '{ print $6 }' | grep -v '^$'`); do grep -l 'sqlplus' "$i"; done Is there a more elegant... (1 Reply)
Discussion started by: slashdotweenie
1 Replies

6. Ubuntu

sqlplus: command not found

I installed Oracle 10.2.1.0 in Ubuntu 10.10..my installation was well,i could even open isqlplus( http://ubuntu.ubuntu-domain:5560/isqlplus/workspace.uix ) and execute some queries..But,back in terminal when i try to login to sqlplus i am getting error (20 Replies)
Discussion started by: sandy0594
20 Replies

7. UNIX and Linux Applications

how to execute multiple .sql scripts from within a shell script using sqlplus

using sqlplus I want to execute a .sql script that has dbms_output statments in rhe script. I want to write the dbms_output statements from .sql file to a log file. is this possible. thanks any help would be appreciated :wall: (1 Reply)
Discussion started by: TRS80
1 Replies

8. Red Hat

TNS Timeout Error when connecting to SQLPLUS through scripts only

Hi, I am facing a strange issue when connecting to SQLPLUS via a shell scripts. I am using Linux 2.6.18-274.18.1 and gbash shell. When I connect to SQLPLUS through scripts then it throws TNS Time Out error ""sometimes"" and connects successfully other times.This is only happening when... (9 Replies)
Discussion started by: aashish.sharma8
9 Replies

9. Shell Programming and Scripting

Can any one explain this sqlplus command?

Hi , i am new to unix i need a small clarification regarding this sqlplus -s $USER_NAME/$PASSWD@$ORA_SID<< EOF >> SQL_CONN_LOG.log In the above command what is the meaning of <<EOF>> Thanks, krishna. (2 Replies)
Discussion started by: rams_krishna
2 Replies

10. UNIX and Linux Applications

Problem on SQLplus command ""bash: sqlplus: command not found""

Hi all, i face an error related to my server ""it's running server"" when i use sqlplus command $ sqlplus bash: sqlplus: command not found the data base is up and running i just need to access the sqlplus to import the dump file as a daily backup. i already check the directory... (4 Replies)
Discussion started by: clerck
4 Replies
T-COFFEE(1)						      General Commands Manual						       T-COFFEE(1)

NAME
t-coffee - multiple sequence alignment SYNOPSIS
t_coffee [options]file t-coffee aligns multiple DNA or protein sequences. OPTIONS
A summary of options is included below. For a complete description, see the documentation. -full_log S [0] -run_name S [0] -mem_mode S [0] mem -extend D [1] 1 -extend_mode S [0] very_fast_triplet -max_n_pair D [0] 10 -seq_name_for_quadruplet S [0] all -compact S [0] default -clean S [0] no -do_self FL [0] 0 -do_normalise D [0] 1000 -template_file S [0] -seq S [0] -in S [0] Mlalign_id_pair Mslow_pair -pdb S [0] -out_lib W_F [0] no -lib_only D [0] 0 -outseqweight W_F [0] no -seq_source S [0] ANY -cosmetic_penalty D [0] -50 -gapopen D [0] 0 -gapext D [0] 0 -fgapopen D [0] 0 -fgapext D [0] 0 -nomatch D [0] 0 -newtree W_F [0] default -usetree R_F [0] -tree_mode S [0] slow -quicktree FL [0] 0 -outfile W_F [0] default -maximise FL [1] 1 -output S [0] clustalw -infile R_F [0] -matrix S [0] blosum62mt -tg_mode D [0] 1 -profile_mode S [0] cw_profile_profile -profile_comparison S [0] full50 -dp_mode S [0] cfasta_pair_wise -ktuple D [0] 1 -ndiag D [0] 0 -diag_threshold D [0] 0 -diag_mode D [0] 0 -sim_matrix S [0] vasiliky -type S [0] -outorder S [0] aligned -seqnos S [0] off -case S [0] keep -cpu D [0] 0 -maxnseq D [0] 60 -maxlen D [0] -1 -weight S [0] default -seq_weight S [0] t_coffee -align FL [1] 1 -mocca FL [0] 0 -domain FL [0] 0 -start D [0] 0 -len D [0] 0 -scale D [0] 0 -mocca_interactive FL [0] 0 -evaluate_mode S [0] t_coffee_fast -get_type FL [0] 0 -clean_aln D [0] 0 -clean_threshold D [1] 1 -clean_iteration D [1] 1 -clean_evaluate_mode S [0] t_coffee_fast -profile S [0] -profile1 S [0] -profile2 S [0] -extend_matrix FL [0] 0 -prot_min_sim D [40] 40 -prot_max_sim D [60] 60 -prot_min_cov D [0] 0 -pdb_min_sim D [30] 30 -pdb_max_sim D [100] 100 -pdb_min_cov D [50] 50 -pdb_blast_server W_F [0] SIB -prot_blast_server W_F [0] SIB -pdb_db W_F [0] nrl3d -protein_db W_F [0] nr -method_log W_F [0] no -struc_to_use S [0] -cache W_F [0] use -align_pdb_param_file W_F [0] no -align_pdb_hasch_mode W_F [0] hasch_ca_trace_bubble -msa_mode S [0] tree -lalign_n_top D [0] 10 -iterate D [0] 0 -trim D [0] 0 -split D [0] 0 -trimfile S [0] default -split D [0] 0 -split_nseq_thres D [0] 0 -split_score_thres D [0] 0 -check_pdb_status D [0] 0 -seq_to_keep S [0] -dpa_master_aln S [0] -dpa_maxnseq D [0] 10 -dpa_min_score1 D [0] -dpa_min_score2 D [0] -dpa_keep_tmpfile FL [0] 0 -dpa_debug D [0] 0 -multi_thread S [0] -lib_list S [0] SEE ALSO
clustalw(1), /usr/share/doc/t-coffee/, http://igs-server.cnrs-mrs.fr/~cnotred/Projects_home_page/t_coffee_home AUTHOR
t-coffee was written by Cedric Notredame <cedric.notredame@europe.com> This manual page was written by Steffen Moeller <moeller@pzr.uni-rostock.de>, for the Debian project (but may be used by others). May 13, 2005 T-COFFEE(1)
All times are GMT -4. The time now is 06:18 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy