I have reposted this question as I seem to have categorised it incorrectly.
Old one is deleted.
I have SQL Server 2008 R2 where I have created a linked server to my AS400 using the following
Provider=IBM DB2 UDB for iSeries IBMDA400 OLE Provider
Data source= Hostname of server
Provider string = User Id=uuuu;Password=pppp;Default Collection=LibraryName
Location = Blank
Catalog = Blank
If I right click on the Linked Server and select Test Connection this is successful.
I want now to just select data from a table XXXX on the AS400 in library YYYY
Given the above what is the query to pull records where field CCCC = 'FRED'
I have searched for a definitive statement that works and have tried many permutations but all fail.
Can anyone give the precise statement?