473,569 Members | 2,782 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

postgress [42883]: ERROR

1 New Member
i tried create storeprocedure in postgress 13, when i set up with parameter and call. there is some error 42883

CREATE OR REPLACE PROCEDURE public.logavlun it(pavl_unit_id character varying, pvehicle_id integer, pvehicle_number character varying, pregistration_n umber character varying, pdevice_type smallint, pserver_port integer, pserver_address character varying DEFAULT NULL::character varying(50))
LANGUAGE plpgsql
AS $procedure$

DECLARE
v_LogId int;
v_RegistrationN umber varchar(50);
v_VehicleId int;
v_VehicleNumber varchar(50);
v_DeviceType smallint;
v_DateTime timestamp(3);
BEGIN

v_DateTime := NOW();

SELECT id, registration_nu mber, vehicle_id, vehicle_number, device_type INTO v_LogId, v_RegistrationN umber, v_VehicleId, v_VehicleNumber , v_DeviceType
FROM avl_unit_log
WHERE avl_unit_id=pav l_unit_id AND existing=1;

IF v_VehicleId = pvehicle_id AND v_VehicleNumber = pvehicle_number AND v_RegistrationN umber = pregistration_n umber AND v_DeviceType = pdevice_type
THEN
UPDATE avl_unit_log
SET last_report_tim e=v_DateTime, server_port=pse rver_port, server_address= pserver_address
WHERE id=v_LogId;
ELSE
IF v_LogId IS NOT NULL
THEN
UPDATE avl_unit_log SET existing=0
WHERE avl_unit_id=pav l_unit_id AND existing=1;
END IF;
INSERT INTO avl_unit_log (avl_unit_id, vehicle_id, vehicle_number, registration_nu mber,
device_type, first_report_ti me, last_report_tim e, server_port, server_address, existing)
VALUES (pavl_unit_id, pvehicle_id, pvehicle_number , pregistration_n umber,
pdevice_type, v_DateTime, v_DateTime, pserver_port, pserver_address , 1);
END IF;
END
$procedure$
;


CALL public.logavlun it('35401811112 2143',34637914, 'TM10','19.2325 29.7',5000,6010 9,null)
Jul 26 '21 #1
0 3287

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

Similar topics

2
4363
by: AIM | last post by:
Error in msvc in building inheritance.obj to build hello.pyd Hello, I am trying to build the boost 1.31.0 sample extension hello.cpp. I can not compile the file inheritance.cpp because the two files containing some templates: adjacency_list.hpp and mem_fn.hpp can not compile. Does anyone have any solutions?
0
1040
by: Greg Lindstrom | last post by:
Hello, All- I am running Python 2.3 on a Windows XP box and would like to access a postgres database running on a Linux fileserver. I've googled for Python and Postgres but most of the stuff I saw looked stale. I would like to use a secure connection (ssl) and a direct connection, if possible. What can you recommend for the task? ...
1
2627
by: Liza | last post by:
Hi, I'm a novice to postgress and need to constract a simple tree. In my table I have: regionID int parentID int name char I need to do two functions: find all the children of XXX parent and find if an item is a child of an XXX parent.
5
5700
by: Enos Meroka | last post by:
Hallo, I am a student doing my project in the university.. I have been trying to compile the program using HP -UX aCC compiler, however I keep on getting the following errors. ================================================================= Error 19: "CORBAManagerMessages.h", line 4 # Unexpected 'std'. using std::string; ^^^
2
2951
by: Gregory | last post by:
Hi, One of the disadvantages of using error handling with error codes instead of exception handling is that error codes retuned from a function can be forgotten to check thus leading to unexpected run-time problems. Exceptions on the other hand can not be simply ignored. In order to solve this error codes problem I suggest using error...
13
6582
by: deko | last post by:
I use this convention frequently: Exit_Here: Exit Sub HandleErr: Select Case Err.Number Case 3163 Resume Next Case 3376 Resume Next
7
4990
by: p | last post by:
WE had a Crystal 8 WebApp using vs 2002 which we upgraded to VS2003. I also have Crystal 9 pro on my development machine. The web app runs fine on my dev machine but am having problems deploying. I created the websetup and built the MSI, have the bundled version. Copied to webserver and ran Websetup.msi. Said I had to remove old version,...
67
12460
by: Bob Powell | last post by:
To whom it may concern: I find the recent articles in various trade publications a little disturbing due to the lack of PostgrSQL mention. I continue to see articles about how IBM may be considering MYSQL for development an open_source web database. Why isn't PostgreSQL being considered or talked about by major industry giants? As a...
1
1559
by: Praveen | last post by:
Hi All, Can anybody tell from where i can download the latest Postgress Windows version? Thanks, Praveen
3
16209
by: Manuel | last post by:
I'm trying to compile glut 3.7.6 (dowbloaded from official site)using devc++. So I've imported the glut32.dsp into devc++, included manually some headers, and start to compile. It return a very strange error. In your experience, where I should looking to find the real error? Surely the sintax of glut is correct... gcc.exe -c...
0
7704
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7620
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7931
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7985
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5515
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5234
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3659
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1230
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
959
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.