Second Column Read

I'm trying to run a sql query

VAR=`isql -S SERVER -U user -P password <<EOF
select col1 , col2 from table
go
EOF`

How do i get only the first column of the results ?

select col1 from table ...

Naah I need both columns to be included in the select since i would be using the other column as well.

Could you post an example of the VAR value?
It should be easier if you try to explain what exactly you're trying to achieve by accessing only the first column.

var would contain something like

1 ABC 2 DEF 3 IOP

But when i write it to a file it gets format like below -

1 ABC
2 DEF
3 IOP

What I need is firstly the id then i require the second column values for further processing.

May be something like this,

cut -d ' ' -f 1

may be:

echo -e $VAR | cut -d ' ' -f 1