Link to home
Start Free TrialLog in
Avatar of Olukayode Oluwole
Olukayode OluwoleFlag for Canada

asked on

Why does a Stored Procedure fail to execute reporting errors even though the SQL statement executed when run stand alone

I have  a stored procedure in my postgresql database

The procedure compiles without  any error  (see  screen)

User generated image
When i tried to excute I got an error of a field lastnumber as not existing even though it exists in the table (see error screen)


User generated image
I then  tried to replicate the stored procedure as just an ordinary sql statement and it executed properly  giving the desired result (see  screen)

User generated image
Why am i having the error that a field existing in the database is being reported as not existing

I also attach the table with it Fields and Data  (see attached screen)

User generated image
I will be grateful  for any advise on how to resolve this issue.

Olukay
ASKER CERTIFIED SOLUTION
Avatar of Pavel Celba
Pavel Celba
Flag of Czechia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Olukayode Oluwole

ASKER

Looks like that was the issue

Thanks