Обсуждение: Problem regarding 'select...as...'

Поиск
Список
Период
Сортировка

Problem regarding 'select...as...'

От
Bernie Huang
Дата:
Hi, I have a following query:

"select equip_attr[1], equip_attr[2]
as year, make
from vehicle_tb;"

which gives me the following error:

"ERROR:  Attribute 'make' not found"

Is there something wrong with my "as" usage?  Thanks


- Bernie

Вложения

Re: [PHP-DB] Problem regarding 'select...as...'

От
Vince LaMonica
Дата:
On 2000-06-12, Bernie Huang stated:

} "select equip_attr[1], equip_attr[2]
} as year, make
} from vehicle_tb;"
} 
} which gives me the following error:
} 
} "ERROR:  Attribute 'make' not found"
} 
} Is there something wrong with my "as" usage?  Thanks

Try: "select equip_attr[1] as year, equip_attr[2] as make"
instead.

HTH,

/vjl/



Re: Problem regarding 'select...as...'

От
Jesus Aneiros
Дата:
I think the correct way is

SELECT equipo_attr[1] AS year, equip_attr[2] AS make 
FROM vehicle_tb;

On Mon, 12 Jun 2000, Bernie Huang wrote:

> Hi, I have a following query:
> 
> "select equip_attr[1], equip_attr[2]
> as year, make
> from vehicle_tb;"
> 
> which gives me the following error:
> 
> "ERROR:  Attribute 'make' not found"
> 
> Is there something wrong with my "as" usage?  Thanks
> 
> 
> - Bernie
>