Thread: Problem regarding 'select...as...'

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

From
Bernie Huang
Date:
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

Attachment

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

From
Vince LaMonica
Date:
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...'

From
Jesus Aneiros
Date:
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
>