Hi there, I am working on creating an Oracle stored procedure and am running into all kinds of problems.
Below is my first attempt at this and will hopefully highlight what it is I am trying to accomplish: -
-
CREATE OR REPLACE PROCEDURE SADAS_MANAGER.LLPGAddSearchOne
-
-
(
-
p_postcode in varchar2,
-
p_paostartnumber in int,
-
v_fulladd out varchar2,
-
v_lpi_usrn out int,
-
v_st_desc_usrn out int,
-
v_lpi_uprn out varchar2,
-
v_blpu_uprn out varchar2
-
-
)
-
-
IS
-
-
BEGIN
-
-
select NLPG_LPI.SAO_START_NUMBER||' '||NLPG_LPI.SAO_START_SUFFIX||' '||NLPG_LPI.SAO_END_NUMBER||' '||NLPG_LPI.SAO_END_SUFFIX||' '||NLPG_LPI.SAO_TEXT||' '||
-
NLPG_LPI.PAO_START_NUMBER||' '||NLPG_LPI.PAO_START_SUFFIX||' '||NLPG_LPI.PAO_END_NUMBER||' '||NLPG_LPI.PAO_END_SUFFIX||' '||NLPG_LPI.PAO_TEXT||' '||
-
NLPG_BLPU.ORGANISATION||' '|| NSG_STREET_DESCRIPTOR.STREET_DESCRIPTOR||' '||NSG_STREET_DESCRIPTOR.TOWN_NAME||' '||NLPG_LPI.POSTCODE
-
into v_fulladd,
-
-
NLPG_LPI.USRN into v_lpi_usrn,
-
NSG_STREET_DESCRIPTOR.USRN into v_st_desc_usrn,
-
NLPG_LPI.UPRN into v_lpi_uprn,
-
NLPG_BLPU.UPRN into v_blpu_uprn
-
-
FROM NLPG_LPI, NLPG_BLPU, NSG_STREET_DESCRIPTOR
-
where nlpg_lpi.postcode = p_postcode
-
and nlpg_lpi.pao_start_number = p_paostartnumber
-
and nlpg_blpu.uprn = nlpg_lpi.uprn
-
and nlpg_lpi.usrn = nsg_street_descriptor.usrn
-
ORDER BY ABS(NLPG_LPI.PAO_START_NUMBER) ASC
-
-
;
-
END;
-
/
-
-
I receive the followign error when I try this:
"ERROR line 23, col 41, ending_line 23, ending_col 44, Found 'into', Expecting: @ or ( OVER or . or , or FROM"
This is with the second INTO statement so I am wondering if my logic is obviously way out here.
Any help will be very welcome please?
Thank you.
M :)
2 3967
You need to use only one select into clause
eg. - select f1,f2,f3 into v1,v2,v3 from table1 t1 ,table2 t2 where t1.f1=t2.f3 and.............
Thank you, that does the job :)
Sign in to post your reply or Sign up for a free account.
Similar topics
by: JB |
last post by:
To anyone that is able to help....
What I am trying to do is this. I have two tables (Orders, and
OrderDetails), and my question is on the order details. I would like
to set up a stored...
|
by: Stanley Sinclair |
last post by:
I have a need to return multiple result sets from a stored procedure.
Want that SP to call others to get the data.
Win2003, db2 8.1.5.
Can't figure out how to handle open cursors, and return...
|
by: James Radke |
last post by:
Hello,
I have a multithreaded windows NT service application (vb.net 2003) that I
am working on (my first one), which reads a message queue and creates
multiple threads to perform the processing...
|
by: karups |
last post by:
Hi,
I've got listbox in my .aspx page where the users can make multiple
selection.
So, Users can select 7 items in listbox, I have to take value from
items and
pass it to stored procedure to...
|
by: chariclark |
last post by:
This may be a quick fix post...
----------------------------
I am having trouble passing multiple values into stored procedure. Here it is below:
CREATE Procedure spGetAssociateds
(
@PDSI...
|
by: Otto Carl Marte |
last post by:
Hi,
As I understand it, Declared Global Temporary Tables (DGTTs) have a
scope that is session/connection based.
Using the same connection, I have discovered that if I declare a DGTT
in one...
|
by: =?Utf-8?B?VGVycnk=?= |
last post by:
I have coded multiple select statements in a single stored procedure, and
when I execute this procedure on SQL Server Management Express, I correctly
get multiple result sets. But, if I try to add...
|
by: vertigo262 |
last post by:
Is it possible to use to select statements in a stored procedure?
I am building a movie rating system, what I am doing is creating a table with movies and individual user ratings.
The code...
|
by: gamaz |
last post by:
Hi,
I am trying to work on a stored procedure that will work with multiple database. I have a prototype of multiple databases. Those are named as the following: ts2_aldkm_app, ts2_aldkp_app,...
|
by: bonneylake |
last post by:
Hey Everyone,
Well this is my first time asking a question on here so please forgive me if i post
my question in the wrong section.
What i am trying to do is upload multiple files like gmail...
|
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: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
| |