Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Bom pessoal, criei essa Query pra fazer um join e exibir numa view... o problema é que o SQL ta processando a mais de um dia e nada...
Ja revisei ela e não consigo notar erro, ao meu ver parece que relacionei corretamente as tabelas, mas tenho receio de que eu esteja esperando ate o infinito por algum erro meu.
Então se alguem puder pelo menos me dar razao ou dizer se errei me tranquilizaria...
CREATE VIEW Juntando
AS
SELECT OBJETOMAT, OBJETOCUR, OBJETOBIB, OBJETODRA, OBJETOFOR, OBJETOMAT_PER, OBJETOMAT_SIT, OBJETOMAT_MTR, OBJETOLIM, OBJETOFUM, CURCOD, CUREXT,CURCRE_MIN, CURCRE_MAX, CURSEM_MIN, CURSEM_MAX, CURREC, CURCRR, CURUNI, CURMAT_PER, CURHOR, CURMAT_REG, CURMAT_ESP, CURMAT_VES, CURNIV , CURARE, CURTUT, CURHOR_OBR, CURHOR_OPT, CURHOR_ELE, CURHOR_ATV, CURDIA_PER, CURDIA_AUT, CURCOL, CURANO_INI, CURANO_FIM, CURMOD, CURTUR, CURCAM, CURINI_DAT, CURVES_ANOV, CURVES_VAGV , CURVES_ANOI, CURVES_VAGI, CURSEM_DUR, CURREUNI, FALDIS, FALMAT, FALNUM, FALPER_ANO, FALPER_SEM, FALPRO, FALTIT, f1.FREANO, f1. FREDIA, f1. FREDIS, f1.FREFAL, f1.FREMAT, f1.FREMES, f1.FREPER_ANO, f1.FREPER_SEM, f2.FREANO as FREANO2 , f2.FREDIA as FREDIA2, f2.FREDIS as FREDIS2, f2.FREFAL as FREFAL2, f2.FREMAT as FREMAT2, f2.FREMES as FREMES2, f2.FREPER_ANO as FREPER_ANO2, f2.FREPER_SEM as FREPER_SEM2, n1.VALORANO, n1.VALORAVL, n1.VALORDIS, n1.VALORSEM, n1.VALORMAT, n1.VALORTUR, n1.VALORCON, n1.VALORNOT, n1.VALORPES, n2.VALORANO as VALORANO2, n2.VALORAVL as VALORAVL2, n2.VALORDIS as VALORDIS2, n2.VALORSEM as VALORSEM2, n2.VALORMAT as VALORMAT2, n2.VALORTUR as VALORTUR2, n2.VALORCON as VALORCON2, n2.VALORNOT as VALORNOT2, n2.VALORPES as VALORPES2, n3.VALORANO as VALORANO3, n3.VALORAVL as VALORAVL3, n3.VALORDIS as VALORDIS3, n3.VALORSEM as VALORSEM3, n3.VALORMAT as VALORMAT3, n3.VALORTUR as VALORTUR3, n3.VALORCON as VALORCON3, n3.VALORNOT as VALORNOT3, n3.VALORPES as VALORPES3, n4.VALORANO as VALORANO4, n4.VALORAVL as VALORAVL4, n4.VALORDIS as VALORDIS4, n4.VALORSEM as VALORSEM4, n4.VALORMAT as VALORMAT4, n4.VALORTUR as VALORTUR4, n4.VALORCON as VALORCON4, n4.VALORNOT as VALORNOT4, n4.VALORPES as VALORPES4, n5.VALORANO as VALORANO5, n5.VALORAVL as VALORAVL5, n5.VALORDIS as VALORDIS5, n5.VALORSEM as VALORSEM5, n5.VALORMAT as VALORMAT5, n5.VALORTUR as VALORTUR5, n5.VALORCON as VALORCON5, n5.VALORNOT as VALORNOT5, n5.VALORPES as VALORPES5, n6.VALORANO as VALORANO6, n6.VALORAVL as VALORAVL6, n6.VALORDIS as VALORDIS6, n6.VALORSEM as VALORSEM6, n6.VALORMAT as VALORMAT6, n6.VALORTUR as VALORTUR6, n6.VALORCON as VALORCON6, n6.VALORNOT as VALORNOT6, n6.VALORPES as VALORPES6, n7.VALORANO as VALORANO7, n7.VALORAVL as VALORAVL7, n7.VALORDIS as VALORDIS7, n7.VALORSEM as VALORSEM7, n7.VALORMAT as VALORMAT7, n7.VALORTUR as VALORTUR7, n7.VALORCON as VALORCON7, n7.VALORNOT as VALORNOT7, n7.VALORPES as VALORPES7, n8.VALORANO as VALORANO8, n8.VALORAVL as VALORAVL8, n8.VALORDIS as VALORDIS8, n8.VALORSEM as VALORSEM8, n8.VALORMAT as VALORMAT8, n8.VALORTUR as VALORTUR8, n8.VALORCON as VALORCON8, n8.VALORNOT as VALORNOT8, n8.VALORPES as VALORPES8, n10.VALORANO as VALORANO10, n10.VALORAVL as VALORAVL10, n10.VALORDIS as VALORDIS10, n10.VALORSEM as VALORSEM10, n10.VALORMAT as VALORMAT10, n10.VALORTUR as VALORTUR10, n10.VALORCON as VALORCON10, n10.VALORNOT as VALORNOT10, n10.VALORPES as VALORPES10,BOLMAT, BOLINI, BOLFIM, BOLMOR, BOLALI, BOLALI_DAT,PESMAT, PESCUR, PESSEX, PESVIN, PESING_COD, PESING_ANO, PESING_SEM, PESING_MAT, PESSAI_COD, PESSAI_ANO, PESSAI_SEM, PESEND_BAI, PESEND_UFE, PESFAM_CID, PESFAM_UFE, PESPAI_PRF, PESMAE_PRF, PESPRF, PESNAS_DAT, PESNAS_CID, PESNAS_UFE, PESNAS_NAC, PES2GR_ESC, PES2GR_CID, PES2GR_UFE, PES2GR_ANO, PESANO, PESING, PESCOR, PES2GR_TIP, PESCUR_ANT, PESTRC_DAT, PESING_DATD, PESSAI_DATD, PESDEC_DEF, PESDEC_FUM, PES2GR_CUR, PESVES_ANO, PESVES_CLA, PESNAS_CIDCOD, PESFAM_CIDCOD, PESEND_CIDCOD, PES2GR_CIDCOD, PESETP
FROM OBJETOS, bolsas, cursos, faltas, frequencia as f1, frequencia2 as f2 , VALORs as n1, VALORs2 as n2, VALORs3 as n3, VALORs4 as n4, VALORs5 as n5, VALORs6 as n6, VALORs7 as n7, VALORs8 as n8, VALORs10 as n10, PES
WHERE OBJETOS.OBJETOMAT = faltas.falmat
AND OBJETOS.OBJETOMAT= f1.FREMAT
AND OBJETOS.OBJETOMAT = f2.FREMAT
AND OBJETOS.OBJETOMAT = n1.VALORMAT
AND OBJETOS.OBJETOMAT = n2.VALORMAT
AND OBJETOS.OBJETOMAT = n3.VALORMAT
AND OBJETOS.OBJETOMAT = n4.VALORMAT
AND OBJETOS.OBJETOMAT = n5.VALORMAT
AND OBJETOS.OBJETOMAT = n6.VALORMAT
AND OBJETOS.OBJETOMAT = n7.VALORMAT
AND OBJETOS.OBJETOMAT = n8.VALORMAT
AND OBJETOS.OBJETOMAT = n10.VALORMAT
AND OBJETOS.OBJETOMAT = bolsas.BOLMAT
AND OBJETOS.OBJETOMAT = PES.PESMAT
AND OBJETOS.OBJETOCUR = cursos.CURCOD
Carregando comentários...