FAQ Database Discussion Community

In a MySQL select statement, can I split a text column and then sum the parts as floats?

I have a MySQL column that is defined as text. The column, if not null, always contains a list floats separated by a newline character. I have been tasked with making the total amount of those floats searchable with min and max constraints. In the where clause, I would like...

SQL Case Value Switching

I am passing a series of double values in from another table ranging from -1 to 1. If the value is positive, I want to make it the difference between it and 1 (ie. 0.2 would then become .8). If value is negative, I want it to be the delta...

Merge results from two separate columns into one elongated column

My table: ID Name Status1 Status2 ------------------------------------- 1 foo bar grain 2 bar foo sball 3 foo bar grain 4 far boo sball I need for it to actually come out like this: ID Name Status ------------------------------- 1 foo bar 1 foo grain 2 bar foo 2 bar sball 3...

iOS: change background color using multiple buttons

I am trying to change background color randomly as an effect overtime any of the buttons on the screen are tapped. I would like to control this effect with an On/Off UIButton. Tapping ChangeColorButton just logs “Off” never “On”. Not sure what to do? thanks everyone!! edited code so far!!...

Autoupdating Field Based on two