Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
0 votes
1 answer
30 views

Get 0 if value dosen´t exist on table - oracle

I have a query where it return diferent info about sales by hour, the problem is that I need to get 0 if at cerrtain hour the whas no registry on that table. Here is the query: SELECT COUNT(a.DOC_NO) ...
Aguachupipons's user avatar
1 vote
2 answers
113 views

Always returning Null: Using Select Statement in creating a function in oracle SQL developer

FOR ANYONE HAVING THE SAME PROBLEM, I WAS ABLE TO SOLVE THIS BY REMOVING '_' IN MY VARCHAR2 PARAMETER NAME I need help in this, I've been stuck in here for too long. I have tried multiple things ...
anon_stat_123's user avatar
0 votes
4 answers
42 views

How to exclude values that have a percentage sign (%) in Oracle SQL

I have a query that brings in a column like the example below Column A 5.3 8.452 7.3% 2.1 2.28 6.4 9.1645 8.81 I want to ideally drop the % sign otherwise exclude the value that has a ...
bjl042's user avatar
  • 3
0 votes
2 answers
58 views

I am updating table's column values with UPDATE and SELECT statement. But its not working

I am updating PREVIOUS_DAY_CLOSE column which contains DAY_CLOSE-1 values. I am using the LAG() function to get PREVIOUS_DAY_CLOSE values. It's working fine. But updating the column with UPDATE and ...
Logan's user avatar
  • 29
0 votes
1 answer
42 views

Oracle SQL : removing duplicates from output

FIRST SECOND THIRD FOURTH FIFTH SIXTH SEVENTH A C E 250 F G H B D E 250 F G H B D E 250 F G H A C E 250 F G H AB QC GG 1000 TT SS PP CD WD GG 1000 TT SS PP CD WD GG 1000 TT SS PP AB QC GG 1000 ...
DataQuery's user avatar
0 votes
1 answer
42 views

How to select XML tags value from table in oracle?

I have xml value stored in oracle table as below. <?xml version="1.0" encoding="UTF-8" standalon="no"?> <!DOCTYPE TRADE> <TRADE> <SOME_TAGS> ...
Prasad Gavande's user avatar
0 votes
2 answers
48 views

Getting ORA-01722: invalid number error, When executing query

In 3 versions of Orale (11g, 12c, 21c) I create the mytable as follows : create table mytable (id number, log_time date) and, then I inserted some data into the table, insert into mytable values (1, ...
tahzibi.jafar's user avatar
0 votes
1 answer
105 views

Oracle SQL UPDATE Statement, Needs to Begin with SELECT

I have my update script: UPDATE SCHEMA.TABLE_NAME SET FLAG = 2 WHERE ID = 'UNIQUE_001' What I need to do now, is try and get that query to run, with a SELECT statement at the beginning. SELECT needs ...
Dustin Cook's user avatar
  • 1,275
0 votes
3 answers
56 views

SQL query in Oracle to sum up values from an alias column

In Oracle I would like to make a SELECT statement combined with UNION ALL to count all rows in some tables (second column) and assign a description to each row (first column). Below is what I actually ...
dtm_'s user avatar
  • 37
-1 votes
1 answer
107 views

Why is this SQL query valid? [duplicate]

Why doesn't this SQL query return ar error (in Oracle)? field_99 exists only in table_1! SELECT * FROM table_1 WHERE table_1.field_1 IN (SELECT table_2.field_1 FROM table_2 ...
Alexey's user avatar
  • 3
2 votes
2 answers
123 views

How to find a combination of two columns that is NOT in the other table in ORACLE SQL?

I have a main table that contains the data I have, and a reference table telling me what values the main table should have. I want to check if the main table contains all required values, and if not, ...
WilliamL's user avatar
0 votes
1 answer
53 views

How to use conversion type functions in oracle without using <select .. from> clause

I want to use <to_date> function on a string (which doesn't require any data from any table) in oracle without using <select .. from> clause I want to show the string '01011912' into to ...
user avatar
0 votes
1 answer
58 views

SQL Command Not Properly Ended Error in Oracle [closed]

I've checked similar posts as there are a few but could not find a post similar to my query which doesn't contain clauses that typically cause this error. I am very new to SQL (especially Oracle). My ...
jimmy-boy's user avatar
0 votes
1 answer
109 views

select column from view getting error attribute or element value is larger than specified in type in oracle

I am using Oracle 19c, and when attempting to select all columns from a view called AAA_BBB_CCCCC_DDDD_U_1A_1A_U_1A_1A_1A, I encounter the error ORA-22814: attribute or element value is larger than ...
ann's user avatar
  • 31
0 votes
0 answers
23 views

Oracle SQL Select Long Data Type [duplicate]

How can I get data with long data type as text from a table in Oracle database? When I run this code SELECT S.ISTEK_NO,S.RAPORX FROM RAD_SONUC S, widememo is returned to me.... Sample code SELECT S....
iremsu's user avatar
  • 1

15 30 50 per page
1
2 3 4 5
121