Posts by Genivan • 78 points
9 posts
-
0
votes3
answers8406
viewsA: ORA-01036: illegal variable name/number
I was with the same problem in an application that I was giving maintenance, among all the adjustments to prepare the environment, also I was almost an hour bumping head with this error "ORA-01036:…
-
1
votes1
answer50
viewsA: SQL Join multiple tables only the 1st result
I suggest you use some group function such as MAX or MIN to return only one phone. Something more or less like this: SELECT c.cli_cliente, c.nome, tc.tel_telefone FROM clientes c JOIN ( SELECT…
-
1
votes2
answers76
viewsA: Handling of json in Jquery
You have the possibility to use $each as well. Something more or less like this: var data = [ { "0":{ "id_user":"10", "contente":"45454545454", "time":"azul", "nick":"ikeda." }, "1":{…
-
2
votes2
answers1389
viewsQ: How to avoid invalid date error in a sub-shipment
In the code below, subconsultation "D" returns only valid dates in the DIA column, however, when trying to filter this column using the WHERE clause, Oracle displays the following error message:…
-
0
votes2
answers2740
viewsA: Select the first and last day of the previous month
SELECT DATE_ADD(LAST_DAY(NOW() - INTERVAL 2 MONTH), INTERVAL 1 DAY) primeiro_dia_mes_anterior, (LAST_DAY(NOW() - INTERVAL 1 MONTH)) ultimo_dia_mes_anterior
-
1
votes1
answer919
viewsA: Insert record automatically when doing a PL/SQL insert
In this case, you can use a Trigger BEFORE instead of AFTER and you can assign the Sequence directly to the :new.token. Something like this: CREATE OR REPLACE TRIGGER TOKEN_TGR BEFORE INSERT ON…
-
0
votes2
answers60
viewsA: Trigger with column check
The logic is correct. Anyway, follow an example of code: https://stackoverflow.com/a/10375177/5857023…
-
0
votes2
answers1455
viewsA: Database/slow server
In Postgres, you may need to periodically run the Vacuum and Analyze commands to improve bench performance. See this documentation: https://www.postgresql.org/docs/9.5/static/sql-vacuum.html Another…
-
1
votes1
answer49
viewsA: Compare field with multiple values from another field
From what I understand, you want to do something like this: $sql = "select * from usuarios where email <> '$email' and ( select concat( '.', jainscrito, '.') from usuarios where email =…