1
The registration table was not modeled correctly, but I need to do an UPDATE by SQL to perform this import, follow example:
Note that the children of Bomi Bulsara, need to stay in [nameDoDependent1] and the other in [nameDoDependente2], I know it is possible but I still have a great difficulty with SQL, could help me?
The table has up to four columns with the dependents and the table of dependents that needs to be imported need to identify the other dependents and be inserted in the next columns, example: if you have 3 dependents then insert into dependente1, dependente2, and dependente3**
Current table:
IDDoFuncionario - nomeDoFuncionario - nomeDoDependente1 - nomeDoDependente2
12 - Joseph Jackson - [nomeDoDependente] - [nomeDoDependente]
13 - Bomi Bulsara - [nomeDoDependente] - [****************]
Data to update "Current table":
Dependent table
IDDoFuncionario - nomeDoDependente
12 - Michael Jackson
12 - Janet Jackson
13 - Fred Mercury
Danilo, it didn’t work, I’ll put a line here because it has character limit: <pre><code> SELECT ID, (SELECT PAR00NOME FROM PEN_CADASTRO WHERE T1.ID = pen_cadastro_funcionarios_importados.ID LIMIT 1) AS nameDependente1, FROM PEN_CADASTRO AS T1 </code></pre>
– rock.ownar
@ownar rock.i did that fiddle and worked right there
– Danilo Favato
Danilo, I discovered what I was missing is in the alias I didn’t specify, thank you very much man!!! Another thing where you learned bank?
– rock.ownar
Most of what I learned was building my databases and searching for answers to my questions on online forums like this.
– Danilo Favato
Ahhh thank you very much man... thank you you helped pakas if you can’t imagine
– rock.ownar