MySQL Forums :: Newbie :: asp.net CONCAT in MySQL SELECT Query
asp.net CONCAT in MySQL SELECT Query
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 asp.net 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:
SELECT * FROM CONCAT('_',?NAME)
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.
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.