cancel
Showing results for 
Search instead for 
Did you mean: 

Zero rows returned for select statements against DUMMY

Former Member
0 Kudos

Hello,

Why would 0 rows be returned for select statements against the DUMMY table for some users?

Are there special privileges required?  The same select statements work for the "SYSTEM" user...

HANA 1.00.55.376513

C:\Program Files\sap\hdbclient>hdbsql -v

HDBSQL version 1.00.52 Build 0374886-1510, the SAP HANA Database interactive terminal.

C:\Program Files\sap\hdbclient>hdbsql -n sihana-5:30015 -u testuser -p testpassword

Welcome to the SAP HANA Database interactive terminal.

Type:  \h for help with commands
       \q to quit

hdbsql=> select * from DUMMY
MATERIAL,MAT_GRP
0 rows selected (overall time 260.978 msec; server time 131 usec)

hdbsql BC1=> SELECT CURRENT_CONNECTION FROM DUMMY
CURRENT_CONNECTION
0 rows selected (overall time 259.380 msec; server time 611 usec)

hdbsql BC1=>

Thanks,

  Neal

Accepted Solutions (1)

Accepted Solutions (1)

lbreddemann
Active Contributor
0 Kudos

Hi Neal,

easy

Either somebody deleted the row from SYS.DUMMY - in that case the table is just empty.

Or there is a table called DUMMY present already in your current schema.

And given your output

Neal Stack wrote:

hdbsql=> select * from DUMMY

MATERIAL,MAT_GRP
0 rows selected (overall time 260.978 msec; server time 131 usec)

I'd bet onto the second option.

Maybe the user created a DUMMY table with MATERIAL and MAT_GRP columns and forgot about it?

As the name resolution starts in the current schema and looks into the PUBLIC name space afterwards, the schema "local" table is chosen in this case.

- Lars

Former Member
0 Kudos

Super!  That was it.  The user had created their own table named "DUMMY" in their schema.

Now I can select what I need:

hdbsql BC1=> select CURRENT_CONNECTION from DUMMY

CURRENT_CONNECTION

214058

Thanks!

former_member184768
Active Contributor
0 Kudos

<weekend rant>

Reminds me of one of the "disaster" situation we had long time back. Some "Brilliant" guy managed to delete the row from SYS.DUAL in Oracle and all the procedures, which used DUAL for getting single value, went bonkers.

</weekend rant>

Regards,

Ravi

Answers (0)