I have the following SQL
SELECT
dt_finished::date AS "DataFinalizacao",
count(DISTINCT tba.id_batches) AS "Quantidade Total"
FROM tb_batches AS tba
INNER JOIN tb_routes tro ON (tro.fk_id_products = tba.fk_id_products
AND tro.fk...
Code
CREATE OR REPLACE FUNCTION BuscaNome
RETURN t_name
IS
t_name VARCHAR(20);
BEGIN
SELECT T.DS_TURMA INTO t_name
FROM TURMA T WHERE T.CD_TURMA = 13;
RETURN t_name;
END;
Error:
Error: PL / SQL: Compilation unit an...
I want to convert a date to a number, a timestamp. Within a select I need to return the timestamp beyond it.
Query example:
Select sysdate, TIMESTAMP_DE_SYSDATE from dual
Timestamp
is a time stamp (or time stamp) that is a st...
I have a table called "LOC_VEICULO" where the vehicle data is contained.
In it I have the following field: DT_FABRICATION (DATE), where the manufacturing dates of the vehicles are stored.
I need to change the vehicles, indicating the dates of...
I am reading a csv file through a Console Application, and to this point it is returning me correctly.
Now I'm having trouble understanding how to include each field in a Bank column.
This is the code I have so far.
Public Function LerC...
I have a Package:
CREATE OR REPLACE PACKAGE LETRAS AS
possuiA CONSTANT BOOLEAN NOT NULL := TRUE;
possuiB CONSTANT BOOLEAN NOT NULL := TRUE;
possuiC CONSTANT BOOLEAN NOT NULL := TRUE;
possuiD CONSTANT BOOLEAN NOT NULL :=...
In my PL / SQL all accents are being replaced by "?".
Example of a comment from a table:
Flag of legal device to be ???? used in the term of business or not. Possible values: 1 - Yes or 0 - No. Default: 1
When I create a table direc...
I have noticed that the command exit works the same as a break, it stops executing the current block and passes to the next one, but which command can stop the whole procedure in PL / SQL?
Good morning!
I need to return the value inside a string that is between a range of | in the select below I can get the value from the first | .
The expected result is: 83,1
SELECT SUBSTR('1410,00|83,1|39,29|1410m|',...