Unix questions - oracle and loop question

This is Interesting: Free IT Magazines  
Home > Archive > Unix questions > September 2006 > oracle and loop question





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author oracle and loop question
pawan_test

2006-09-28, 7:27 pm

Hi All,

I have a 2 questions; 1 is oracle and another is korn shell

say TIME=20060928
desired output: 20060927

say TIME=20061001
DESIRED output: 20060930

If i substract one day from 'TIME' i am looking for previous day.

can anyone please suggest me how do i do this is SQL.

i have another question; i am trying to write this is korn shell

KKK=a,b,c,d,e

if [ $KKK == 'a' or $KKK == 'c' or $kkk == 'e' ]; then
echo " i am here
else
echo " i am out"
fi

the above code that i wrote is not working.

can anyone please suggest me

thanks
mark

Stephane Chazelas

2006-09-29, 7:28 am

On 28 Sep 2006 14:32:01 -0700, pawan_test wrote:
> Hi All,
>
> I have a 2 questions; 1 is oracle and another is korn shell
>
> say TIME=20060928
> desired output: 20060927
>
> say TIME=20061001
> DESIRED output: 20060930
>
> If i substract one day from 'TIME' i am looking for previous day.
>
> can anyone please suggest me how do i do this is SQL.


Maybe someone in a SQL newsgroup.

> i have another question; i am trying to write this is korn shell
>
> KKK=a,b,c,d,e
>
> if [ $KKK == 'a' or $KKK == 'c' or $kkk == 'e' ]; then


if [ "$KKK" = a ] || [ "$KKK" = c ] || [ "$KKK" = e ]; then

case $KKK in
a | c | e) ...;;
esac

case $KKK in
[ace]) ...;;
esac

But maybe you want:

case ,$KKK, in
*,[ace],*) ...;;
esac

> echo " i am here
> else
> echo " i am out"
> fi
>
> the above code that i wrote is not working.

[...]

--
Stephane
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com