Posts by Adair Juneo • 47 points
7 posts
-
0
votes1
answer53
viewsQ: Turn rows into columns in SELECT Oracle
Below is a select for data query in a table: SELECT 'OS:'||AT.CD_NUMERO_OS ||' ITEM:'|| AT.ITEM ||' ETAPA DA ATVD:'||AT.CD_ETAPA_ATIVID||' ATVD:'|| AT.CD_ATIVIDADE AS "DADOS DA OS", AT.DT_INICIO AS…
-
0
votes2
answers53
viewsA: Union of two selects presenting online
SELECT DISTINCT ITOS.CD_NUMERO_OS, ITOS.ITEM AS "ITEM DA OS", ITOS.DESCRICAO_RECLA AS "DEFEITO APRESENTADO", NVL(SL.DESCRICAO_SOLUC, 'NAO RESOLVIDO') AS "SOLUCAO DO DEFEITO" FROM GMITEMOS ITOS,…
-
0
votes2
answers53
viewsQ: Union of two selects presenting online
Below is a query performed for ORACLE database: SELECT ITOS.CD_NUMERO_OS, ITOS.DESCRICAO_RECLA AS "DEFEITO APRESENTADO" FROM GMITEMOS ITOS INNER JOIN GMOSERVI OS ON OS.CD_NUMERO_OS =…
-
0
votes1
answer30
viewsQ: Remove SQL CASE parameter agreement results
As follows the query below, I need to remove from the SQL query the results that have the field CLIENTE_UNICO EQUAL TO 'MULTIPLE PURCHASES IN THE PERIOD'. SELECT NFE.CD_CLIENTE AS "COD. DO CLIENTE",…
-
0
votes2
answers62
viewsQ: Union of select’s to return only 1 query
We need to perform the following queries in only 1 select: 1st SELECT SELECT SUM(FAPEDIDO.TOTAL_PEDIDO) AS TOTAL_CAR, FAPEDIDO.CD_REPRESENTANT COD_REPRESENTANTE, GEEMPRES.NOME_COMPLETO REPRESENTANTE…
-
0
votes1
answer85
viewsQ: Division of SUM() into SQL Developer
We are running the SELECT below in order to deliver a percentage difference between the somatic values PRECO_UNITION and PRECO_TABELA. We try to do this in the simplest way by performing the common…
-
2
votes1
answer109
viewsQ: Two SUM functions in Oracle SQL to return two different sums with two SELECT
I am running the following select on Oracle SQL Developer: SELECT SUM(FANFISCA.TOTAL_NF) AS TOTAL_FATURAMENTO, FANFISCA.CD_REPRESENTANT COD_REPRESENTANTE, GEEMPRES.NOME_COMPLETO REPRESENTANTE FROM…
sqldeveloperasked Adair Juneo 47