The solution has been figured out. that is:
start with Child = 'Given tablename'
connect by prior child = parent /* list child or reverse for parent */
Hi All,
How to separatly list all parent or child tables by a GIVEN Table in a schema? I don't need to have overall list in a scheam.
Thanks in advance,
Mike
Hello all,
As dbo, I have a sybase server which is running 12.5 and there are more than 30 databases in it. I'd like to have a script to set 'bulkcopy' true to those dbs. Would you please give some advice on how to do it. Thanks in advance.
Mike
Thanks a lot! Columb,
I think i'm going to take the codeing method as below.
if [ "$optn" = "name" ]
then
find . -type f -name "$2" -ls
elif [ ...condition... ]; then
... more....
else
find . -type f -mtime +$2 -ls
fi
It just seems more typing than the way in my original approach...
To kHz:
The issue is how to fix the code to pass the paremater value with '*' in the script.
Something is weird that it causes the syntax error when assigning a value '*' or '*.log' to a parameter, but '*.txt', '*.abc', '*.log.*' or 'a*.log' is OK. Any idea why?
Thanks again
Call your script like this:
rmf.sh name "*.txt"
output:
~/temp>rmf.sh name "*.txt"
+ rmf.sh name *.txt
+ + tr [A-Z] [a-z]
+ echo name
optn=name
+ [ name == name ]
+ optn=-name '*.txt'
+ find . -type f -name '*.txt' -ls
In above '*.txt', single quote is treated as part of tring, but not quote...
Here is full code:
#!/bin/ksh -x
#$1 - name of option
#$2 - pattern of filename or age of file
optn=`echo "$1"| tr "[A-Z]" "[a-z]"`
if [ "$1" == "name" ]; then
optn="-name '$2'"
else
optn="-mtime +$2"
fi
find . -type f $optn -ls
output:
~/temp>rmf.sh name *.txt
+ rmf.sh name...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.