-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSearchPlace.sql
52 lines (32 loc) · 1.1 KB
/
SearchPlace.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
create or replace package body SearchArea as
function searchPlace(loc in location.area@site_link%TYPE)
return number
is
sl number := 0;
begin
select lid into sl from location@site_link
where area = loc;
return sl;
exception
when no_data_found then
dbms_output.put_line('No location found !!');
end searchPlace;
--for find location and price
--/*
procedure ShowParkingSloat(locid in location.lid@site_link%TYPE)
IS
--a number := 0 ;
begin
DBMS_OUTPUT.PUT_LINE('ParkingSlotId Price Availability OwnerName PhoneNo');
FOR R IN (SELECT psid,lid,price,booked,oid,oname,phoneno from pjw) LOOP
if (locid = R.lid and R.booked = 0) then
--DBMS_OUTPUT.PUT_LINE(R.psid||' '||R.lid||' '||R.price||' '||R.booked||' '|| R.oid||' '||R.oname||' '|| R.phoneno);
DBMS_OUTPUT.PUT_LINE(R.psid||' '||R.price||' '||R.booked||' '||R.oname||' '|| R.phoneno);
end if;
END LOOP;
--execute immediate 'select psid,lid,price,booked,oid,phoneno from pjw where oid = (:b1)'using locid;
--Uses(a);
end ShowParkingSloat;
--*/
end SearchArea;
/