Hi,
I have a text file with multiple sql statements in which I have pick only the below select update and delete statements and do print as given below.
All the select,update,delete statements will be as same as ( subquery with ().all statements ending with ; ) the examples given below.
For all the select,update and delete statements there should be corresponding "where" clause.
In 1st example all the select has it's corresponding where clause.
except one select statement inside(sub query) dose not have its where clause. in this case we should print out as "no where clause".
In 2nd input, an update statement should have a where clause.
If update statement does not have it then we should print out "no where clause".
Same as update for delete.
Last edited by methyl; 01-09-2012 at 09:10 AM..
Reason: correct accidental Smiley character. Correct spelling of condition corresponding. Various capitals. Insert code tags.
Thanks,
jay... i will try out the code and post the result.
---------- Post updated 01-10-12 at 12:23 PM ---------- Previous update was 01-09-12 at 08:04 PM ----------
Hi jay,
nawk is not supported on my unix.
hence its not able to perform the above commanda.can you please do the above logic using some other way?also can you please put the print as echo commands so that results can be seen on the screen?
I have asked this before but I haven't had any luck so far getting this to work. I use RCS(revision control system). When it runs if I pass the value 'unlock' to $3 its reassigned to $unlock. When I run the command (rcs -u'version number' 'filename') ti will ask me 1-(Do you want to break the lock... (5 Replies)
Hi Guys,
We have a java program that basically install updates to an existing software. The java program consist of several screens asking user for choices (please see below for a detailed example)
*** Screen 1 ***
Please choose the operation you want to perform:
1. Install new... (5 Replies)
Hi,
I wrote a ksh program on Unix.
One thing I don't understand: some users run it with different results.
I suspect it's either "cat" or "grep" command.
Basically, with one group of user, the 'cat' or 'grep' command is not getting the data I need and that changed the result.
Is the above... (2 Replies)
Hi,
is there problem with grep command when using ksh?
I had the below command:
/usr/bin/grep \""$Mon $NewDD\"" /tmp/timemanager/intlog.$$ >> /tmp/timemanager/log.$$ 2>/dev/null
when I run ksh in debug mode, this command can not grep anything even the data is in the file.
+ /usr/bin/grep... (3 Replies)
Hi,
I am looking for a way to utilize password when the ksh program is launched.
What's the standard or best way to do it?
Thanks for your help! (5 Replies)
hi..
this is my question:
it is possible transfer parameters from my program written in C to a .ksh script?
how can i do it?
i have a program in C, what is called from a .ksh script, and i need what the C program returns some values (parameters)
please, help me - any idea
thanks
... (2 Replies)
Hi falks,
I have the following ksh function ,which adding entry to crontab during ksh program running:
{
print "Go\c" >/dev/null 2>&1
print '0 0 * * * su - ias -c "/home/orca/core-${SCHEMA_NAME}/CLI/cleanup_BRMS.ksh"\c' >/dev/null 2>&1
print "\033:wq!" >/dev/null 2>&1
} | \crontab -e... (2 Replies)
#Author : kkodava
#!/usr/bin/ksh
#Use of this program is You can findout the no of days & day of starting and ending dates
#usage no_of_days startdate<yyyymmdd> enddate<yyyymmdd>
syy=`echo $1|cut -c1-4`
smm=`echo $1|cut -c5-6`
sdd=`echo $1|cut -c7-8`
eyy=`echo $2|cut -c1-4`
emm=`echo... (1 Reply)