Posts by Robinho Gomes • 91 points
11 posts
-
1
votes3
answers475
viewsA: Reverse SQL ordering
If you use a SUBSTR taking only the last ten and then the hundreds and then thousands... You could sort each one and join at the end. SUBSTR(CODIGO, -2,1)
sqlanswered Robinho Gomes 91 -
-1
votes2
answers136
viewsA: Replace a fixed CASE value with a SELECT and JOIN?
To answer my question, there is no way to select. There is no relationship between the specialty and the hospital, it is linked according to what the user informs, without restrictions, there is no…
-
0
votes2
answers136
viewsQ: Replace a fixed CASE value with a SELECT and JOIN?
SELECT DISTINCT P.CD_PACIENTE , P.NM_PACIENTE , DECODE (P.TP_SEXO, 'M', 'MASCULINO', 'F', 'FEMININO', 'I', 'INDEFINIDO') SEXO , TRUNC(P.DT_NASCIMENTO) DT_NASCIMENTO , (SELECT FN_IDADE…
-
0
votes1
answer49
viewsQ: Column that receives a result if the condition is true
SELECT DISTINCT P.CD_PACIENTE , P.NM_PACIENTE , DECODE (P.TP_SEXO, 'M', 'MASCULINO', 'F', 'FEMININO', 'I', 'INDEFINIDO') SEXO , TRUNC(P.DT_NASCIMENTO) DT_NASCIMENTO , (SELECT FN_IDADE…
-
0
votes1
answer130
viewsQ: Percentage in SQL
I have the following consultation code: SELECT AC.DT_AGENDA AS DATA, ME.DS_MULTI_EMPRESA AS EMPRESA, AC.CD_UNIDADE_ATENDIMENTO AS CD_UNID_ATENDIMENTO, UA.DS_UNIDADE_ATENDIMENTO AS…
-
1
votes1
answer74
viewsQ: Record method has no action and link of Dependent x Driver is not done
When developing a simple application where the dependent is linked to his responsible one who is a driver, when I click to create the link and record dependent nothing happens, only the following…
-
0
votes1
answer732
viewsQ: Memory reserved for Tomcat
My system is on a server that has several Tomcats, I need to disable the Tomcat that has more memory reserved for it. How I see the memory reserved for each Tomcat on the server?
-
1
votes2
answers2141
viewsA: UPDATE in multiple tables with the same column?
This select will create an update set for all tables that fit the Where condition. Then you copy the result that will be several update, glue in Workspace and wheel. select 'update…
-
0
votes3
answers124
viewsA: Update to CD_SETOR column values in all tables found with column
A DBA helped me and the correct script is: select 'update '||owner||'.'||table_name|| ' set '||column_name||'= 406 where '||column_name||' in (20);' from DBA_TAB_COLUMNS where column_name =…
-
0
votes1
answer41
viewsA: Select with LIKE and AND at the same time
You need a Join and the simplest way is to have a FK of sub_categoria as a client. SELECT * FROM TB_SUB_CATEGORIA SC, CLIENTES CL WHERE SC.CD_SUB_CATEGORIA = CL.CD_SUB_CATEGORIA AND SC.SUB_CATEGORIA…
-
1
votes3
answers124
viewsQ: Update to CD_SETOR column values in all tables found with column
Using the select SELECT * FROM DBA_TAB_COLUMNS WHERE column_name like 'CD_SETOR' i have as a result many tables with different Owner with the same CD_SETOR. EX: Owner Tables Column Type 210…