|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Compare different values with each other
I have to compare different values with eachother, and then write them to a new table. I have the following tables
Table A index (int) valueA1 (int) valueA2 (int) Table B index (int) valueB1 (int) valueB2 (int) I need to find out if values B1 and B2 are bigger than valueA1 and smaller than valueA2. When this is the case I need to write valueB1 and valueB2 to another table. Is this possible with mySQL? |
|
#2
|
|||
|
|||
|
anybody?
|
|
#3
|
||||
|
||||
|
I can offer programmatic ways to do this, but I'm not sure of a way to do this solely with MySQL
The other option would be to write a simple script [PHP?] to generate the SQL for you. |
|
#4
|
|||
|
|||
|
I'm guessing it's possible, but you'd have to set up user-defined functions, so it'd be a lot of trouble, assuming you even have the privs for it.
I'd aim at a script solution, which would be much simpler to implement. |
![]() |
| Viewing: Dev Articles Community Forums > Databases > MySQL Development > Compare different values with each other |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|