[Solved] how do I compare current date with date which is entered by the user? [closed]

You need the basic date comparion between current date and input date given by the user right? Do it like this: Calendar userDate = Calendar.getInstance(); Calendar currentDate = Calendar.getInstance(); userDate.setTime(inputDate);//here inputDate is date given by the user. if(!userDate.before(currentDate)) { // user date is after current date(today). } else { // user date is before current … Read more

[Solved] ORA-00936: missing expression(UPDATED) [closed]

That syntax doesn’t looks correct. Try changing your query to something like below UPDATE (SELECT ANAM.NAME, ANAM.SEAT as NEWSEAT, ANAM2.TRAIN_NAME, ANAM2.SEAT, ANAM2.SEAT – ANAM.SEAT AS TOTAL FROM TBL_PASSENGER ANAM INNER JOIN TBL_TRAIN_LIST ANAM2 ON ANAM.NO = ANAM2.ID ) t SET t.NEWSEAT = t.TOTAL; 3 solved ORA-00936: missing expression(UPDATED) [closed]

[Solved] IF COL_LENGTH(‘EMP_NUM’,’EMPLOYEE’) IS NOT NULL – EQUIVALENT IN ORACLE [closed]

In Oracle, you have to use dynamic SQL as you can’t execute DDL in PL/SQL as is. Why PL/SQL? Because IF-THEN-ELSE is PL/SQL, not SQL. Presuming this is part of your PL/SQL procedure, you’d then if col_length(‘EMP_NUM’, ‘EMPLOYEE’) is not null then execute immediate ‘alter table employee modify emp_num not null’; end if; That’s for … Read more

[Solved] PL/SQL Implementation of Hungarian/Kuhn-Munkres Algorithm [closed]

I couldn’t find one…so I made one. Now I want to share it with anyone else who needs it. It has been tested and validated, and any additional comments are welcome. https://github.com/manas1213/hungarian_algorithm This is based on the comprehensive algorithm outlined at http://csclab.murraystate.edu/bob.pilgrim/445/munkres.html. solved PL/SQL Implementation of Hungarian/Kuhn-Munkres Algorithm [closed]

[Solved] I want to search job and salary from employee table but I am getting error like invalid relational operator [closed]

Actual code depends on tool you use. In SQL*Plus, it is the &; in SQL Developer or TOAD, that would be a :. Also, GUI tools usually don’t require enclosing string parameters into single quotes. Here’s a SQL*Plus example: SQL> select * from emp where job = ‘&job’ and sal <= &sal; Enter value for … Read more

[Solved] Oracle SQL how to sort data inside a row [closed]

Just query the row then process it in java. The easiest would be: String[] data = row.split(“\\|”); Arrays.sort(data); Depending on exactly how you want it sorted you will probably need to define a custom comparator for the sort. 6 solved Oracle SQL how to sort data inside a row [closed]

[Solved] object creation generates error in oracle

The afiseaza_animal procedure belongs to the type and you need to define it in the body of the type (using CREATE TYPE BODY) and not as a standalone procedure (using CREATE PROCEDURE). DROP TYPE specii_inr; CREATE TYPE specii_inr UNDER gestiune_zoo ( specii_inrudite VARCHAR2(20), OVERRIDING member procedure afiseaza_animal ); / CREATE OR REPLACE TYPE BODY specii_inr … Read more

[Solved] How to get first three characters of a string and last three character of the same string in oracle, and display them, what will be the query?

How to get first three characters of a string and last three character of the same string in oracle, and display them, what will be the query? solved How to get first three characters of a string and last three character of the same string in oracle, and display them, what will be the query?

[Solved] Can somebody explain dbms_sql.number_table [closed]

Better to understand DBMS_SQL itself to some extent, before understanding NUMBER_TABLE. ( I do this for My Learning!) NUMBER_TABLE is Actually, TYPE number_table IS TABLE OF NUMBER INDEX BY BINARY_INTEGER; So, only numbers are allowed! FlowChart on How DBMS_SQL Works! : Your interested area comes in bind variable box — | open_cursor | — ———– … Read more

[Solved] How to query in Oracle [closed]

here is how you could go about the two tasks: Query HOLDEVENT twice, so you get records with an event, an organizing club and another organizing club. Think of a way not to get both event = “Event 1” | club1 = “Club A” | club2 = “Club B” and event = “Event 1” | … Read more

[Solved] insert tokenized strings from a table to other [closed]

If FULLNAME always consists of 3 parts (which is what you said), then it is relatively simple, using the REGEXP_SUBSTR regular expression function: SQL> with test (fullname) as 2 (select ‘Metro Goldwyn Mayer’ from dual 3 ) 4 select regexp_substr(fullname, ‘\w+’, 1, 1) first_name, 5 regexp_substr(fullname, ‘\w+’, 1, 2) middle_name, 6 regexp_substr(fullname, ‘\w+’, 1, 3) … Read more