Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

how do you write sql queries using shell script
for eg:- we have databae table like EMPNO,ENAME,SAL,DEPTNO
columns in EMP table how you display EMPNO,SAL FIELDS from emp
in SHELL SCRIPT please explain with an example

Answer Posted / alpkumar

Do you mean something like this .. how do you use queries
in conjunction with shell scripts..If so, usually the
general practice which goes on is that -- write a query on
what ever database you are working with with the relevant
sql syntax.. call this query from the shell script.
For this, in our program we should start using the commands
that the database company will be providing to use in unix
environement.. So use these unix commands for connecting to
the database, calling the specific query which we had
created..,.etc ...So look out for the commands which will
be available from database provider..to use in unix/linux
flavours and accomplish your script to perform the action
automating in generating reports and mailing them (or what
ever you wanna do.. )

Is This Answer Correct ?    6 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to print the first array element?

1039


What is awk in shell scripting?

1031


What does echo $0 do?

982


Determine the output of the following command: name=shubham && echo ‘my name is $name’.

986


Explain about stdin, stdout and stderr?

1179


What is shell scripting used for?

999


What is an sh file?

942


Explain about gui scripting?

1097


What is shell variable?

923


Differentiate between ‘ and ” quotes.

1170


What is $1 in shell scripting?

1042


shell script for reverse the string

1404


In my bash shell I want my prompt to be of format '$"present working directory":"hostname"> and load a file containing a list of user-defined functions as soon as I log in, how will you automate this?

1149


What is the first line in a shell script?

1109


What is c in shell script?

1069