0
I am developing a simple script but I came across a situation that I am not able to solve it, I tried through CASE but without success.
With a simple select I need to bring the columns Name, RG, CPF, and the customer’s CELL phone, that is the problem, because the structure of the table lies like this:
So, I should bring the CONTACT 2 that is the contact corresponding to CONTACT FORM of cellular, in the system these fields are editable, so it varies from registration to registration, has record that the contact 1 is cellular, in other 3 and so on.
So to illustrate, my select would look like this:
Name, RG, CPF, CELLULAR (And in this cell column would bring the column corresponding to cellular FORMADECONTATE, which in this example is CONTATO2)
Thank you for your attention and cooperation.
Which database?
– Caique Romero
The problem was in my personal CASE, it was solved. Thank you!
– Otávio Augusto
Related -> https://answall.com/questions/14343/likedifferentiation of telephone types
– Caique Romero