This doesn't work.. what is the alternative?
how would i achive the desired result?Code:...
SET price = "select price from table"; //return 5
SET fprice = "select concat('$', price); //just setting in "$"
...
Printable View
This doesn't work.. what is the alternative?
how would i achive the desired result?Code:...
SET price = "select price from table"; //return 5
SET fprice = "select concat('$', price); //just setting in "$"
...
not sure... what's your desired result?
and what's up with the SET statements? i think you're using them wrong
if you want to append the dollar sign in front of the price, this is cosmetic, and should really be handled in the front end application, not in the SQL
only reason why i have it in there like that is cause I need that row to be act like a string, where i can use REGEX.
It's complicated, So please excuse my weird choice.
The problem is that no matter how i select a concated char and then SET it into a variable, and then insert it back into the table it just inserts only the "$".