1

Topic: Transfer from java on plsql

The question here in what consists
Before requests immediately in java a type were written:
return jdbcTemplate.query ("select....
Now it is necessary to transfer all to a database in a type view (please, do not ask why anyhow - told, made)
Faced some problems. Such as:
At database transfer it is often necessary to do sampling by means of the filter. The problem dared by means of creation SET (PROCEDURE)/GET (FUNCTION)
But there are such problems when in the table immediately forms primary key and it was pulled out by request
where name (primary key) in (select column_value from table"
+ "(new tt_varchar2 (:name_whatineed))
How it is possible to process without a special damage it in view, with the filter on one of values in primary key?

2

Re: Transfer from java on plsql

Foxey;
PL/SQL It is dead, instead of it it will be fast Javascript and other languages.
Oracle Database Multilingual Engine (MLE)
Think again yet !

3

Re: Transfer from java on plsql

I understand that it is dead. But the manual - is not present
I ask councils on this subject. I work with this  for the first time.

4

Re: Transfer from java on plsql

Foxey;
Can write though one piece of the code with "But there are such problems" because is not clear yet that it for problems

5

Re: Transfer from java on plsql

Even a piece when I can not here , unfortunately.
As I also wrote sense above.
Forms primary key which is called number
It forms by a command
alter table number_number
Add constant number primary key (incd)
In request in Java addressed to it by means of normal  with instructions:incd
Now, at passage on plsql, it is necessary to specify what exactly this incd it is necessary to pull out for everyone primary key.
Earlier solved it by means of procedure, creation  and the trigger
Added that Java would not swear in procedure
Procedure name (p_workgroups in tt_varchar2)
Is
Begin
P_workgroups: = a.workgroups
End name
Now I do not know as to pull out

6

Re: Transfer from java on plsql

It is not necessary to write here, please, about specialized sites.
Sense in that it is necessary to alter for 1-2 weeks all on plsql basis oracle 11g
What for and me it is not clear. As well as itself plsql.
The request was constructively to prompt.

7

Re: Transfer from java on plsql

Foxey wrote:

...
Faced some problems. Such as:
At database transfer it is often necessary to do sampling by means of the filter. The problem dared by means of creation SET (PROCEDURE)/GET (FUNCTION)
But there are such problems when in the table immediately forms primary key and it was pulled out by request
where name (primary key) in (select column_value from table"
+ "(new tt_varchar2 (:name_whatineed))
How it is possible to process without a special damage it in view, with the filter on one of values in primary key?

You can use pair

begin dbms_session.set_context (' CLIENTCONTEXT ', ' a ':name_whatineed); end;
+
select sys_context (' CLIENTCONTEXT ', ' a ') from dual Where sys_context (' CLIENTCONTEXT ', ' a ') =:name_whatineed;

http://www.sql.ru/forum/980459/ispolzov … -s-klienta
But. Can be more constructive there will be a variant of the anonymous/STORABLE concrete code returning the cursor.
Estimate pluses-minuses.
Ps.
js in basis is additional to java the whim, arising that pl/sql too quickly works;
Even if java-cars to launch on number of open sessions?
People cannot invent in any way - as system so to brake that all is final realized its steepness.
Like and so it is clear - time brakes - means abruptly.
But it is not enough to kill of itself one .
It is necessary to kill itself one  mandatory by means of a js-code.

8

Re: Transfer from java on plsql

.
Should be somehow so:

booby wrote:

it is passed...
You can use pair

begin dbms_session.set_context (' CLIENTCONTEXT ', ' a ':name_whatineed); end;
+
select sys_context (' CLIENTCONTEXT ', ' a ') from dual Where sys_context (' CLIENTCONTEXT ', ' a ') =:name_whatineed;
where name (primary key) in (select column_value from table"
+ "(sys_context (' CLIENTCONTEXT ', ' a '))

...

9

Re: Transfer from java on plsql

booby;
Thanks for , I will try to implement.
-------------------
Sense in that I selected assignments with the help are necessary
//Manually on the validity check
Begin
Flag. Start_Date (To_date (' 1/1/2017 ', ' dd.mm.yyyy ');
Flag. End_Date (To_date (' 1/1/2017 ', ' dd.mm.yyyy ');
Flag. Need_incd (name_incd);
End
//the General view
Begin
Flag. Start_date (:startdate);
Flag. End_date (:enddate);
Flag. Need_incd (:needincd);
End
Further goes  on sampling. If name_incd contains in the table, certainly.
Then in the code there is a sampling for the lines
in  plsql Tasks in structure Flag
Procedure name (p_workgroups in tt_varchar2)
Is
Begin
P_workgroups: = a.workgroups
End name
But it works why only for static, for variables primary key produces an error.

10

Re: Transfer from java on plsql

Upd
Even if to convert primary key in tt_varchar2 the error takes off, error status code now I can not tell, it should be written down tomorrow

11

Re: Transfer from java on plsql

Foxey;
If Flag is a packet you cannot directly refer in sql-representation to a package variable of sort Flag.name_incd.
Except procedure Flag. Need_incd (:needincd) it is required to you
Function of type Flag.get_Need_incd which for sql will return value Flag.name_incd installed by you.
You can use such function in sql. (And then to you it is not becomes necessary ' CLIENTCONTEXT ')

12

Re: Transfer from java on plsql

Foxey wrote:

Upd
Even if to convert primary key in tt_varchar2 the error takes off, error status code now I can not tell, it should be written down tomorrow

Oh th.
It over-information.
I even will not manage to estimate its value.

13

Re: Transfer from java on plsql

booby wrote:

it is passed...
Oh th.
It over-information.
I even will not manage to estimate its value.

to one it seems To me, what it is two tongue-tied chats-boats conduct conversation on one it a clear subject?

14

Re: Transfer from java on plsql

Pancake, it is infectious.

Bobby Z. wrote:

... One it...

=> one it.

15

Re: Transfer from java on plsql

Bobby Z.;
Join.
We here, houses, Russian    a clod talk.
Can  translate that is required?
I translate from Russian on Russian - the architect at them on operation was got, moreover with understanding .
Here the people puzzled circles disperse.
And all it  in . Oh th     (or as it there at you,)

16

Re: Transfer from java on plsql

booby wrote:

...
You can use such function in sql. (And then to you it is not becomes necessary ' CLIENTCONTEXT ')

To within the assumption that set and get happen in the same session.
(Differently it is necessary to pass to manuals for older years.)

17

Re: Transfer from java on plsql

booby;
Yes. Are created get and set

18

Re: Transfer from java on plsql

Foxey wrote:

booby;
Yes. Are created get and set

It is necessary to be convinced now that get happens in the same session in which happened set.
ps:
At you ive very much  , what, atop jdbc, local manufacture?
I urgently recommend to train , except ability to connect in-parameters, to return cursors in out.
To your architect it is strong .
And if "approach" requested selected by yours ... orm here all is simple:
To one of three in the project not a place - orm, to the architect or the developer.
That here it is positive - the developer does not need to expect judgement orm or the architect about the correspondence to the project.

19

Re: Transfer from java on plsql

Foxey;
Do not torment people at a forum - go to your developers-bazovikam, all of them to you make and

20

Re: Transfer from java on plsql

xtender;
If they were