TrabalhosGratuitos.com - Trabalhos, Monografias, Artigos, Exames, Resumos de livros, Dissertações
Pesquisar

Consultas SQL

Por:   •  3/5/2015  •  Abstract  •  601 Palavras (3 Páginas)  •  252 Visualizações

Página 1 de 3

rcq.09- 1

"select st.ID_NUMERIC, t.date_started as  data_result_teste, st.ID_TEXT as amostras," & _

        "MAX(CASE st.COMPONENT_NAME WHEN 'Massa Inicial' THEN st.RESULT_TEXT ELSE '' END) AS Massa_inicial," & _

        "MAX(CASE st.COMPONENT_NAME WHEN 'Massa Retido' THEN st.RESULT_TEXT ELSE '' END) AS Massa_retida, " & _

        "p.name as Responsável " & _

        "from samp_test_result ST, test T, sample S, personnel P " & _

        "where st.analysis = 'TESTE_GR_2' " & _

        "and st.test_number = t.test_number " & _

        "and st.id_numeric = s.id_numeric " & _

        "and month(t.date_started) = '" & cmbMes.Text & " ' " & _

        "and year(t.date_started) = '" & cmbAno.Text & " ' " & _

        "and t.completer = p.[identity] and ST.result_status in ('E','M','C','A') " & _

        "GROUP BY st.ID_NUMERIC, t.date_started, st.ID_TEXT, p.name ORDER BY t.date_started"

rcq.09

"select s.ID_NUMERIC, t.date_started as  data_result_teste, s.ID_TEXT as amostras," & _

        "MAX(CASE r.NAME WHEN 'Massa Inicial' THEN r.TEXT ELSE '' END) AS Massa_inicial," & _

        "MAX(CASE r.NAME WHEN 'Massa Retido' THEN r.TEXT ELSE '' END) AS Massa_retida, " & _

        "p.name as Responsável " & _

        "from result r, test T, sample S, personnel P " & _

        "where t.analysis = 'TESTE_PV' " & _

        "and t.test_number = r.test_number " & _

        "and s.id_numeric = t.sample " & _

        "and month(t.date_started) = '" & cmbMes.Text & " ' " & _

        "and year(t.date_started) = '" & cmbAno.Text & " ' " & _

        "and t.completer = p.[identity] and r.status in ('E','M','C','A') " & _

        "GROUP BY s.ID_NUMERIC, t.date_started, s.ID_TEXT, p.name ORDER BY t.date_started"

rcq. 10

 "select st.ID_NUMERIC, t.date_started as  data_result_teste, st.ID_TEXT as amostras," & _

        "MAX(CASE st.COMPONENT_NAME WHEN 'Massa Inicial' THEN st.RESULT_TEXT ELSE '' END) AS Massa_inicial," & _

        "MAX(CASE st.COMPONENT_NAME WHEN 'Massa Retido' THEN st.RESULT_TEXT ELSE '' END) AS Massa_retida, " & _

        "p.name as Responsável " & _

        "from samp_test_result ST, test T, sample S, personnel P " & _

        "where st.analysis = 'TESTE_PV' " & _

        "and st.test_number = t.test_number " & _

        "and st.id_numeric = s.id_numeric " & _

        "and month(t.date_started) = '" & cmbMes.Text & " ' " & _

        "and year(t.date_started) = '" & cmbAno.Text & " ' " & _

        "and t.completer = p.[identity] and ST.result_status in ('E','M','C','A') " & _

        "GROUP BY st.ID_NUMERIC, t.date_started, st.ID_TEXT, p.name ORDER BY t.date_started"

...

Baixar como (para membros premium)  txt (2.6 Kb)   pdf (42.3 Kb)   docx (10.2 Kb)  
Continuar por mais 2 páginas »
Disponível apenas no TrabalhosGratuitos.com