SQL message with no records selected

1380 pts.
Tags:
AS/400
SQL
I have two user profiles, one will show data and the other does not when I do a simple Select * from myfile. I get a message, 'Syntax check found no errors.' I am *SECOFR on both profiles, library lists appear to be the same. Ideas anyone? Thanks in advance, Nick

Software/Hardware used:
AS400, SQL, V7R1

Answer Wiki

Thanks. We'll let you know when a new response is added.

I would open two sessions and use DSPUSRPRF to compare the 2 user profiles to see if there are any differences.

Also need to check object authority to see if that is a problem.

How are you doing this? With STRSQL? RUNSQL? RUNSQLSTM?

You said the *LIBL seem to be the same. Just to get past that,, try your SQL with hard coding the library name.

 

The winner is Tom, again.  Thank you.

*SYN was set on the session that would not work correctly.

*SYN The SQL statement is syntax checked only.  Syntax    
checking is done according to DB2 UDB for i5/OS syntax
rules.  A statement that passes the syntax check on  
the System i may not run on a remote system.         

I don’t know how it got that way but I changed to *run and everything seems ok.

Thanks, Nick

 

Discuss This Question: 4  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • NickHutcheson1
    The message number is SQL6070.
    1,380 pointsBadges:
    report
  • philpl1jb
    If it's not a different in the library list then it's a difference in authority.
    51,355 pointsBadges:
    report
  • TomLiotta
    Assuming that you're using STRSQL, check session attributes to see if one profile has 'Statement processing' set as [*SYN]. On RUNSQLSTM, review the PROCESS() parameter. I don't currently have access to RUNSQL help. -- Tom
    125,585 pointsBadges:
    report
  • Kat20Mom
    F13 "Change Session Attributes" in your SQL session to verify your Statement processing has *RUN.  This is where my problem was.  We've yet to figure out how it got changed.  I would key STRSQL and F4 and it showed *RUN.  Had to change session attributes.
    10 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following