cookbr
cookbr

Reputation: 125

AS/400 'SELECT 1' Equivalent

I'm trying to help a friend troubleshoot connection problems with an AS/400. He'd like to run a query against the AS/400 that will always return a record, (similar to a SELECT 1 against MSSQL).

He's attempted running SELECT 1 but without luck ... I'm assuming that the AS/400 expects a FROM TableName ...

Can anyone provided assistance? Is there a system table/file that always exists that he can run a SELECT TOP 1 (or it's equivalent) against? I've never interacted with an AS/400 so I'm a bit out of my element ... was hoping SO could give me a quick answer ...

Thanks in advance!

Upvotes: 7

Views: 9652

Answers (2)

Mohamed
Mohamed

Reputation: 11

table QSQPTABL can also be used for this.

Upvotes: 1

paxdiablo
paxdiablo

Reputation: 882396

I'm pretty certain it's DB2 running on those boxes (they're called iSeries now, by the way) so you can give:

select * from sysibm.sysdummy1

a shot. This should return a single column IBMREQD, set to Y.

Upvotes: 14

Related Questions