TS91 Posted June 1, 2015 at 12:46 PM Report #584032 Posted June 1, 2015 at 12:46 PM (edited) Bom dia, eis o que tenho: FKTab | FKDC | Combo | SimNA 6203 | 1 | FE | N/A 6203 | 1 | DD | N/A 6203 | 1 | O | N/A 6203 | 1 | FS | N/A 6203 | 1 | F | N/A Eu precisava de algo como FKTab | FE | Resposta | DD | Resposta | O | Resposta | FS | Resposta | F | Resposta 6203 | N/A| 1 | N/A | 1 | N/A | 1 | N/A | 1 | N/A | 1 É possivel fazer isto? E como é que consigo? Cumprimentos, TS91 Edited June 1, 2015 at 12:59 PM by TS91
Solution KTachyon Posted June 1, 2015 at 10:54 PM Solution Report #584059 Posted June 1, 2015 at 10:54 PM Alguma razão para quereres fazer isto apenas com SQL? SELECT t1.FKTab, t1.SimNA, t1.FKDC, t2.SimNA, t2.FKDC, t3.SimNA, t3.FKDC, t4.SimNA, t4.FKDC, t5.SimNA, t5.FKDC FROM tabela t1 INNER JOIN tabela t2 on t1.FKTab = t2.FKTab INNER JOIN tabela t3 on t1.FKTab = t3.FKTab INNER JOIN tabela t4 on t1.FKTab = t4.FKTab INNER JOIN tabela t5 on t1.FKTab = t5.FKTab WHERE t1.Combo = "FE" AND t2.Combo = "DD" AND t3.Combo = "O" AND t4.Combo = "FS" AND t5.Combo = "F"; “There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.” -- Tony Hoare
TS91 Posted June 2, 2015 at 09:11 AM Author Report #584076 Posted June 2, 2015 at 09:11 AM É para o projecto que estou a realizar. Ficou decidido que seria assim. Muito Obrigado pela ajuda. Cumprimentos
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now