Interpretion problem. Plz Help me guys.


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Interpretion problem. Plz Help me guys.
# 1  
Old 07-08-2008
Interpretion problem. Plz Help me guys.

Hey friends, below mentioned script is giving me proper o/p which can be “1” or “2”

echo select status_ac from db_acct where acct_num='$1'" | dbaccess elstest

Now I want to interpret the o/p as follows.
If o/p is 1 then “YES”
If o/p is 2 then “No”
And to do this I have modified above script to:-

select status_ac,
case
when status_ac ="1" then 'Review status is: YES'
when status_ac ="2" then 'Review status is: NO'
end
from db_acct
where acct_num='$1'"


SmilieNow its not returning any value...

Is it possible to interpret as I want? I am new to scripts. Please help.

Thanx in advance

Anushree
# 2  
Old 07-08-2008
Hey friends, waiting for reply anxiously since long time...
# 3  
Old 07-08-2008
Please don't 'bump-up' posts - read the rules
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

A lil help for my problem guys SELECT

i need to create a script using the patterns below. im not good in script writing so i need your help guys.. i thing i can use SELECT here but dont really know how to start. 1. Create a script named exercise1.sh that will generate a menu with the following items: a. Current Logins b. Last... (2 Replies)
Discussion started by: JONATHAN0919
2 Replies

2. Shell Programming and Scripting

plz, i wait your help, AWK problem

I have tracefile of three nodes (0 , 1 and 2 ) as follows: + 0.02 0 1 tcp 40 ------- 1 0.0 2.0 0 0 - 0.02 0 1 tcp 40 ------- 1 0.0 2.0 0 0 + 0.02 2 1 tcp 40 ------- 2 2.1 0.1 0 1 - 0.02 2 1 tcp 40 ------- 2 2.1 0.1 0 1 r 0.025032 0 1 tcp 40 ------- 1 0.0 2.0 0 0 + 0.025032 1 2 tcp 40 -------... (11 Replies)
Discussion started by: ASAADAOUI
11 Replies

3. Ubuntu

File opening prob. plz assist guys

Hi friends, this problem is pretty similar to the thread that i have generated earlier. If the TXT file that i have opened using "cat" is huge then my putty can only show me last few lines. Similarly if i use "more" command to open a huge TXT file then it asks to press any key to scroll up the... (9 Replies)
Discussion started by: anushree.a
9 Replies

4. Linux

Output formatting problem..Plz hlp

Hi guys, It will be a great help if somebody can help me in following problem. I have tried hard but because of lack of UNIX/LINUX knowledge I am not able to do it. I have written a script that returns 3 things of all the employees in my organisation. i.e. Name, Login time & log out time of... (2 Replies)
Discussion started by: anushree.a
2 Replies

5. UNIX for Dummies Questions & Answers

have a problem with if elif loop .. plz help me with the script

count2=0 var2=NOT if then echo"Loop1" command="egrep ',$var1," if then echo "the command is OR" command=$command"|,$var3," echo "$command" elif then command=$command"| egrep ',$var3," else ... (4 Replies)
Discussion started by: Syms
4 Replies

6. UNIX for Advanced & Expert Users

problem while getting the response back..plz help

Hi ALL: I am not able to get the response back from weblogic in the shell script. The weblogic server in different account. I am able to login to that account and bring the server up but while doing a ping, the script is failing. While the same script is running fine if I run it on the account... (1 Reply)
Discussion started by: splax
1 Replies

7. Shell Programming and Scripting

UNIX script problem ..Plz help ASAP

Hi folks, I have written down a UNIX script which actually FTP the file to other server. What is happening now , this script is not working only for 1 server , as it is working for 32 different FTP server . In this particular server , we are getting message “FTp:550 access denied”... (1 Reply)
Discussion started by: khan1978
1 Replies

8. Linux

Mandrake 8.00 installation/Booting problem...Plz Help

Hey everyone, I'm new to the forum. I have a problem with Mandrake 8.00; i have installed it on my old PC with no problems (none mentioned) but on re-booting after the installation it just hangs after listing the devices: Hard Disk, CD-ROM & Floppy A. I have installed it on Packard Bell with... (2 Replies)
Discussion started by: sybella1
2 Replies

9. UNIX for Dummies Questions & Answers

Multiboot problem Help plz??

I have installed Win98 OS .......1st then RH7.2 with GRUB bootloader okay i.e in the Grub there is two choices 1-Linux 2-Dos also I install bootloader of linux in MBR -master boot record- when select Linux an error : ... (6 Replies)
Discussion started by: atiato
6 Replies

10. UNIX for Dummies Questions & Answers

plz Help How should I configure cc compiler output file plz help???

i.e configuration of C compiler :confused: (4 Replies)
Discussion started by: atiato
4 Replies
Login or Register to Ask a Question