- CREATE FUNCTION FN_APPCONSULTANTS(DOCIDPATIENTVISIT VARCHAR,ADMDATE DATE,ELS NUMBERIC)
-
RETURNS VARCHAR
-
-
LANGUAGE SQL
-
CONTAINS SQL
-
BEGIN ATOMIC
-
-
-
DECLARE strAPPCONSULTANTS VARCHAR(2000);
-
DECLARE v_EMPNAME VARCHAR(100);
-
-
DECLARE GETAPPCONS CURSOR with return to client for select EMP.FIRSTNAME || ' ' || EMP.MIDDLENAME || ' ' || EMP.LASTNAME EMPNAME
-
from nmcfo.PATIENTAPPOINTMENTS PA, nmcfo.EMPLOYEES EMP,nmcfo.PATIENTVISITS PV
-
where PA.RESOURCECODE = EMP.EMPLOYEECODE AND PA.RESOURCEENTITYCODE = 'CONS' AND
-
(PA.APMNTDATETIME >= ADMDATE AND PA.APMNTDATETIME <= dateadd('dd',ELS, ADMDATE)) AND
-
PA.DOCIDPATIENTS IN
-
(SELECT PV.DOCIDPATIENTS FROM nmcfo.PATIENTVISITS PV
-
WHERE PV.DOCID = DOCIDPATIENTVISIT);
-
-
OPEN GETAPPCONS
-
LOOP
-
FETCH GETAPPCONS INTO v_EMPNAME
-
strAPPCONSULTANTS = v_EMPNAME ||' , '|| strAPPCONSULTANTS;
-
END LOOP;
-
RETURN (strAPPCONSULTANTS);
-
END
-
!
Its showing error compound return line number 12.
Thanks in advance
Anand
0 972 Sign in to post your reply or Sign up for a free account.
Similar topics
by: RT |
last post by:
I have followed the step by step instructions in the login manual
Created login page
Use LSC01
This works - login and get redirected to the proper page
My problem is the cookie variables...
|
by: Leif K-Brooks |
last post by:
Has anyone ever tried implementing a simple unstructured BASIC dialect
in Python? I'm getting interested in language implementation, and
looking at a reasonably simple example like that could be...
|
by: Chronologic |
last post by:
All,
I have an issue I would like some expert help on.
I understand, or so I believe, that C# does not support the concept of
a "compile time macro". At least not in the sense I'm looking...
|
by: O-('' Q) |
last post by:
....to translate the following to C#.NET style?
var
i: Integer;
begin
txtMyIP.Lines.Clear;
sHTML := HTTP.Get('http://www.network-tools.com/');
if sHTML = '' then
Exit;
sIpAddr := 'IP...
|
by: JohnQ |
last post by:
(The "C++ Grammer" thread in comp.lang.c++.moderated prompted this post).
It would be more than a little bit nice if C++ was much "cleaner" (less
complex) so that it wasn't a major world wide...
|
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...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
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...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
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...
|
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...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
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....
|
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
| |