Skip to content

Need assistance with IF ELSE condition in Oracle

I have a list of tables, i need to pass those table based on column name. For example if my table has CLASSID it will go block 2, if table has OBJID it will go block 1, if table has KOPPKT it will go …

Using update inside of PL/pgSQL

To begin with, I am a newbie to SQL and PostgreSQL. It might be a silly beginner’s mistake. ^This isn’t working provides me with an error SQL Error [42601]: ERROR: syntax error at or near “update” Where: PL/pgSQL function temporary_function_for_getting(text,bigint,json) line 13 at RETU…

How to search for a month that is input by the user

I am working on some homework and have been stuck on this for a week. I have tried using TO_CHAR, MONTH(search), and EXTRACT(MONTH from…) and they all end up with either identifier ‘JAN'(the month I am searching for) is not declared, or expression is of the wrong type. This assignment is to displa…

How can I do math operations in query SELECT?

I have a table of statistics where operations with water are counted. I have three types of water 0,2,3. But there is water type 0, which includes type 2, type 3 and type 0, that is, water type 0 = 0 + 2 + 3. That is, if an operation with a water type for example 2, then in the