The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 08-30-2007
kamitsin's Avatar
kamitsin kamitsin is offline
Registered User
 

Join Date: Nov 2006
Location: /dev/null
Posts: 177
passing value to a variable in a SQL

Hi Folks,

This is a small chunk of the bigger problem which i am facing and some help here will help me resolve the rest of the issue.

Problem is that i need to pass the value of a variable from a shell script to a SQL query (infact a lot of SQL's)

i have the following solution but somehow i don't like this solution because this will lead to some major changes (additional lines) in my already too big script.

Code:
echo "enter the date"
read today
echo "select * from informix.table" > abc.sql
echo "where t_date < $today - INTERVAL(5) MONTH TO MONTH" >>abc.sql
I hope am clear in describing the problem, if not please let me know.
A quick help will be very much appreciated.

Cheers,
K

Last edited by kamitsin; 08-30-2007 at 10:29 AM..
Reply With Quote
Remove advertisements
!!
Forum Sponsor