I know my data table has nulls in it. If my select statement doesn't include those fields, I get hundreds of records. If I include those fields with an IfNull, it skips all but 4 records.
Here's my testing snippet:
C/Exec sql C+ DECLARE C1 CURSOR FOR C+ SELECT C+ accountID, C+ ifNull(address,' ') C+ FROM AccountSetup C+ WHERE AccountType = 'D' C/End-Exec
C/Exec sql C+ OPEN C1 C/End-Exec C DoU SQLCOD <> 0 C/Exec sql C+ FETCH C1 C+ INTO :xaccountID,:xaddress C/End-Exec
C If SQLCOD <> 0 C Leave C EndIf
C Eval xaccountid = xaccountid
C EndDo C/Exec sql C+ CLOSE C1 C/End-Exec
If I go straight to STRSQL and run it, it's fine. Which is making it very difficult for me to figure out.
December 18, 2010 12:10 AM
December 24, 2010 3:15 AM