phartenfeller / hartenfeller.dev

My blog and portfolio.
https://hartenfeller.dev
MIT License
0 stars 0 forks source link

Comments: How to use Map in Oracle PL/SQL #72

Open phartenfeller opened 2 years ago

phartenfeller commented 2 years ago

Blogpost: https://hartenfeller.dev/blog/maps-oracle-plsql

Comments on this issue are displayed on the blogpost.

nuncij commented 2 years ago

I found two small errors in your pl/sql code:

1. type driver_tab is a table of driver_info index by varchar2(255); should be type driver_tab is table of driver_info index by varchar2(255);

2. first the key is not verstappens but verstappen. and if l_driver_tab.exists('verstappens') is not null then will always return true. should be if l_driver_tab.exists('verstappen') then. EXISTS return TRUE or FALSE no need to check if is NULL.

phartenfeller commented 2 years ago

@CryptoCatOkiOKi thanks for the info, fixed both!