Hi,
I want to run below query on shellscript but having one problm.
ADV=$( mysql -h "$IP_ADDR" -u "$USER_NAME" "$TABLE_NAME" -BNe" SELECT ADV FROM indata where inid='$INSTRUID' and Date='$latest Date';" )
here Date column contans different below dates
2011-12-01
2011-12-05
2011-12-07
2011-12-08
.
.
2011-12-13
and i want to catch date as latest date i.e 2011-12-13
finally the query looks like
ADV=$( mysql -h "$IP_ADDR" -u "$USER_NAME" "$TABLE_NAME" -BNe" SELECT ADV FROM indata where inid='$INSTRUID' and Date='2011-12-13';" )
Also i want to make this script in minimum size code.
please help me to catch latest date.
Thanks