473,320 Members | 2,162 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Need Function help

Need help on function

I am trying to understand how function X calling a remote database function Y and this is my code. It's not working. What am I doing wrong?

Function X
Expand|Select|Wrap|Line Numbers
  1. CREATE OR REPLACE FUNCTION XAV(v_input IN Varchar2)
  2. RETURN return varchar2 AS
  3. x varchar2(100);
  4. BEGIN
  5. x:= VAX@RMT(v_input);
  6. END;
  7.  
Function Y on RMT remote database
Expand|Select|Wrap|Line Numbers
  1. CREATE OR REPLACE FUNCTION VAX(vAB IN Varchar2)
  2. RETURN varchar2 AS
  3. BEGIN
  4. if vAB = 'A' then return 'Andrew';
  5. elsif vAB = 'B' then return 'Bob';
  6. else return 'Cat';
  7. end if;
  8. END;
  9.  
I know Function Y on the RMT database works. But if I run Function X, it gives me
Expand|Select|Wrap|Line Numbers
  1. ORA-06503: PL/SQL: Function returned without value
  2. ORA-06512: at XAV, line 6
  3. ORA-06512: at line 7
  4.  
Mar 2 '12 #1
1 1714
debasisdas
8,127 Expert 4TB
this should work for you.

Expand|Select|Wrap|Line Numbers
  1. CREATE OR REPLACE FUNCTION XAV(v_input IN Varchar2)
  2. RETURN return varchar2 AS
  3. x varchar2(100);
  4. BEGIN
  5. x:= VAX@RMT(v_input);
  6. RETURN X;
  7. END;
Mar 3 '12 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Jenny | last post by:
Need urgent help for an unsolved problem. In our ASP web application, we creat a Back button and if user click on this button, it execute history.go(-1) to go back to the previous page. All our...
1
by: Robert | last post by:
Vb.Net Make dll that contain one function. Help Please. I would like to call a function from different applications. I think i have to make a dll. I have Visual Basic.net 2003 Standard...
19
by: ash | last post by:
hi friends, i have some questions whch is in my last year question papers.i need some help to get logic of these questions. 1) write a C function, that takes two strings as arguments and...
16
by: pamelafluente | last post by:
I am still working with no success on that client/server problem. I need your help. I will submit simplified versions of my problem so we can see clearly what is going on. My model: A client...
1
by: palani12kumar | last post by:
hi friends, i need your help regarding functions. normally a function can return a single value to the calling function. what i have to do for returning more than one value at a time? is there...
4
by: sara | last post by:
i am studying a computer engineering and i started taking programming using C++ since month i have question i think it`s easy for you all *prof.programmer* but it`s bit diffecult for me plzz i...
3
by: dreams | last post by:
Hi every one :) would any one help me in this program: I have a base class called "Person" and two derived classes "Student" and "teacher" i have a function in class Student called getStudents...
9
by: pic078 via AccessMonster.com | last post by:
I need serious help - I have a frontend/backend Access database (2 MDE Files) that remains stuck in task manager after exiting the application - you can't reopen database after exiting as a result...
13
by: Javad | last post by:
Hello I know that I should get the information of windows internet connections by using "rasapi32.dll" library, and I also have some sample codes, but I can't make them work. My exact need is to...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.