Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

question for select command

Status
Not open for further replies.

snowsmart

IS-IT--Management
May 24, 2005
37
CA
Here is command I run, and it return a ErrorNr 1064
As I am new to Mysql, please advice

select a.vendornumber from vendor as a
where a.vendornumber not in
(select b.vendornumber from po as b)

thanks

 
You're using the "as" aliasing clause incorrectly.

You only use "as" when aliasing a columnname:

SELECT foo as bar from tablename


When you are aliasing a tablename, just follow the table's name with the alias:

SELECT a.foo from tablename a



Want the best answers? Ask the best questions! TANSTAAFL!
 
thanks for you quick response, the following script works in Mysql 4.1.15 but not Mysql 4.0.18 , as I can not update the Mysql, is there any way that I can make this query work in Mysql 4.0.18?

select a.vendornumber from vendor a
where a.vendornumber not in
(select b.vendornumber from po b)

thanks

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top