MySQL Forums :: Newbie :: CONCAT in MySQL SELECT Query

Advanced Search CONCAT in MySQL SELECT Query
Posted by: Jay Banks ()
Date: October 29, 2009 11:39AM

This should be a pretty easy one, because for some reason I have concluded that it is not possible...but I'm not 100% sure.

In a query, using a variable like this works fine for me:

WHERE _NAME LIKE CONCAT('%',?deviceID,'%')

But using it like this, I have not been able to get anything but errors:


The purpose was to select table names from a drop down list and have a query run on them. With the variable inserted, it should come out something like this:

SELECT * FROM _856217;

I'm too new at this to understand why one works fine and one doesn't.


Options: ReplyQuote

Subject Written By Posted CONCAT in MySQL SELECT Query Jay Banks 10/29/2009 11:39AM
Re: CONCAT in MySQL SELECT Query Chad Bourque 10/29/2009 11:44AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.