Skip to content
Advertisement

Will my query works without two dimension array in if else or not

I have confusion since I was looking inside and try to solve the problem. I have PHP application which is running in Oracle DB and so far some expression is written in MySQL and right now I want to migrate those query to Oracle SQL function and call function insted of writing query directly to model. The situation is following I have function line

JavaScript

This if make me confusion and I have no idea how to write this peace of code. Since I run SELECT statment both of them and it return correct result, but I have no idea what to do with this IF Since this is two dimension array and I have no idea how to write it in PLSQL Oracle SQL When I run the first SELECT statment

JavaScript

And When I run second SELECT query

JavaScript

Can someone tell me how to solve this two dimension array problem in PLSQL Oracle SQL or Does even this kind of array exist in Oracle SQL ? Just one notation I also try something like

JavaScript

Also

JavaScript

Advertisement

Answer

Here is a function which returns the next ATA Number for a given PROJECT_ID and TYPE.

JavaScript

Note my assumption about the data type of PROJECT_ID, and correct it if necessary.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement