|
Home > Archive > Unix Shell > 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
| |
| Ed Morton 2006-09-28, 7:27 pm |
| pawan_test wrote:
<snip>
> 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.
What is it supposed to do?
Ed.
| |
| Bill Marcum 2006-09-28, 7:27 pm |
| On 28 Sep 2006 14:32:22 -0700, pawan_test
<sridhara007@gmail.com> wrote:
>
> 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.
>
Do you really want to test whether KKK contains only one letter, or
whether it contains any of the letters a, c or e?
For any of the letters:
case $KKK in
*[ace]*) echo "i am here" ;;
*) echo "i am out" ;;
esac
--
Mundus vult decipi decipiatur ergo.
-- Xaviera Hollander
[The world wants to be cheated, so cheat.]
| |
| pawan_test 2006-09-29, 1:44 am |
| Hello,
thanks it is working now. can anyone pleaser suggest me oracle problem;
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.
thanks
mark
Ed Morton wrote:
> pawan_test wrote:
> <snip>
>
> What is it supposed to do?
>
> Ed.
| |
| Bill Marcum 2006-09-30, 1:17 pm |
| On 28 Sep 2006 19:44:42 -0700, pawan_test
<sridhara007@gmail.com> wrote:
> Hello,
>
> thanks it is working now. can anyone pleaser suggest me oracle problem;
>
> 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.
>
Perhaps in an SQL newsgroup?
--
The way to a man's heart is through the left ventricle.
|
|
|
|
|