PDA

View Full Version : Help: Dreamweaver MX SQL statement error


jporven
06-10-2003, 08:14 AM
I have the following sql statement in my recordset:

SELECT Item_Number, Name, concat(Dosage, " ",Dosage_unit) AS Dosage, Retail_Price, Selling_Price, (Retail_Price - Selling_Price) as Saved
FROM rxsite.drugs

When I hit test it works fine and dsiplays the appropriate data. Switching to live view yields an error. I know the "concat(Dosage, " ",Dosage_unit) AS Dosage" is causing the error, but I need to join these tow colums and display the output as a new column called dosage. Can anyone suggest what is wrong, or an alternate way of doing this?

Thank you for the help I just atrted learning sql 2 days ago and don't quite have the hang of all the syntax and nuances.

jporven
06-10-2003, 08:31 AM
Seems the , " ", part is not correct and instead had to be , ' ',

This worked fine. Funny though, the offending syntax was copied directly out of SAMS teachyourself mysql, guess it was a type on their part.