Thank you all very much. I think REPLACE is the one I was looking for.
thanks,
Nabh4u....
User Profile
Collapse
-
hi Amit,
Can you tell me what does CHR(32) mean in your code? Also, If suppose the incoming value i.e., if the substring has proper value then will it get the value?
For Example:
a:= REPLACE(SUBSTR( 'abc d',4,2),CHR(32) ,0); will return 0.
but if a:= REPLACE(SUBSTR( 'abcaad',4,2),C HR(32),0); then will it return 'aa'?
Thank you,
Nabh4u....Leave a comment:
-
hi r035198x,
Decode will only work when you use it with a sql statement. Looks like if we use decode while assigning something then it wont work.
Eg:- abc := decode(xyz,null ,0,xyz);
The problem is I have a lot of fields like that and if I use sql statements for all of them then it will be a big burden and a huge procedure.
Thanks,
Nabh4u....Leave a comment:
-
The problem is I have many fields like that and if I write IF or CASE for all of them then it will be a big burden. I am looking for something which is simple and easy....Leave a comment:
-
hi Debasisdas,
Thanks for a quick reply.
I cannot use NVL as the incoming value is not considered as null, instead it is considered as a string of blanks.
I also cannot use TO_NUMBER because what it does is converts a string into a number. If the string is blanks then what should be the conversion?
What I know about TO_NUMBER is it converts a string into a number.
Eg: TO_NUMBER('123. 25')...Leave a comment:
-
help with PL/SQL (ORA-06502 & PLS-00204)
Hello,
I am having two tables, 1st has just one column with 80 bytes and the 2nd table has many columns. I use substr function to get the specific value from the first table and insert it into the second table using PL/SQL. My problem here is, in the first table I might have blanks for some values which I have to insert into the second table fields defined as Number data type. Oracle treats blanks as a string and when i try to insert i get... -
Thanks Veena. The logic is correct according to what i want to achieve.
I finally figured out the problem, It was related to the unique key consrtaint of the primary key. I think it was setup wrong.
Thank you all for the support. I really appreciate your help.
Thanks,
Nabh4u..
"together we can and we did make a difference"...Leave a comment:
-
Thanks Vijay. The way i have the logic setup i am getting all the rows. I call the procedure as and when i read a row completely....Leave a comment:
-
-
Thanks Amit. Could you give some example logic for that? and also how can i use a table?
Thanks,
Nabh4u
"Together we can and we will make a difference"...Leave a comment:
-
Thanks for replying. My problem is that i will have many procedures and if i have all of them in the same procedure then it will be a huge one. I have to insert into many tables so i have a separate procedure for each target table.
Thanks,
Nabh4u
"Together we can and we will make a difference"...Leave a comment:
-
Thanks Amit for a quick response. I am not using a single procedure to do everything because i will be inserting data into different tables and if i include everything into one procedure it will be a very huge one. The problem i have stated is the initial one.
Following is what i am trying:
First Procedure:
[code=oracle]create or replace first_proc(v_ou t OUT number) as
cursor a is select col_1,col_2...Leave a comment:
-
problem with mutiple row insert in a table using pl/sql
hi,
I am trying to insert multiple rows in a table using PL/SQL. I have two procedures and two tables. the first procedure gets the data from the source table, manipulates it and then sends the data to the second procedure which inserts the data into the target table. The way i do it, it inserts only one row into the target table. I am not able to understand what the problem is. It would be great if anyone could help me.
... -
-
Thanks for replying Amit. I am not yet calling this procedure. I just wrote the code for displaying something on the screen if it executes fine. Is it like to use an OUT parameter we should have a procedure calling another procedure?
Well i am not sure about it. Can you tell me how to use the OUT parameter?
thanks,
nabh4u....Leave a comment:
-
PLS-00306 .Getting Problems with OUT parameter
hi,
I am getting an error when using OUT parameter.
Error:
PLS-00306: wrong number or types of arguments in call to 'proc_name'
Where proc_name is the name of my procedure.
Following is the code i am using:
...Code:CREATE OR REPLACE PROCEDURE proc_name (val OUT NUMBER) AS CURSOR C IS SELECT C_NO, C_INFO FROM C_TABLE; BEGIN -
Thanks for replying Amit. I have'nt tried anything yet. I am still into the starting phase of how to deal with it. This is a new thing for me and i dont have much information. Any help would be appreciated.
Thank you,
nabh4u.Leave a comment:
-
help with pl/sql
hi,
I need some help with pl/sql coding. I have input information on a card. I might have to use substring to get the individual values. can i use rowtype to get the records from the initial procedure after parsing and then pass those parsed values to other procedure where it feeds the target table? Can anybody provide me a skeleton for the pl/sql?
Thank you in advance..
nabh4u. -
Errors ORA-06502 and ORA-01438
HI everyone,
I an getting the following errors when i execute my procedure.
SQL> exec PROCEDURE_NAME
BEGIN PROCEDURE_NAME; END;
*
ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at "PROCEDURE_NAME ", line 164
ORA-01438: value larger than specified precision allows for this column
ORA-06512: at line 1... -
everytime you change something in the pfile you have to restart and reconnect to the database, otherwise the changes are not reflected. once you change some parameter in pfile, save it and exit from the developer. and start up everything again. this time the changes are supposed to be taken place. If not then there might be some other probelm.
first try doing the above idea....Leave a comment:
No activity results to display
Show More
Leave a comment: