[thelist] SQL Query help

SBeam sbeam at syxyz.net
Thu Jul 31 17:56:23 CDT 2003


On Thursday 31 July 2003 06:42 pm, CDitty wrote:
> Does anyone see anything wrong with this query?   

> SELECT a.merchantName AS merchantName, b.downloadCost AS cost, b.merchBank,
> b.merchType, c.filePath AS filePath,
-------------------------------------^
> FROM users_t a, merchants_acct b, filepaths_t c
> 

don't have a comma after the last column declaration, 'filepath'. 

Also, since this is mySQL, you shouldn't need to use 'AS' there, it will not 
return the table names/aliases along with the column names. ie, you will get
merchantName   downloadCost   merchBank   merchType   filePath
even without your AS clauses. Should look a little neater.


More information about the thelist mailing list