>I am selecting two records from two tables the second table may not have the matching record yet. I get a ".NULL." back from the select.
>Is there a way to get a 0 (zero) or a blank if there is no match from the LEFT OUTER JOIN? I know that I can ASCAN() the array I was wondering if I can do this in the SELECT???
>
>
>SELECT Crafts.crafttitle, Craftpay.payrate;
> FROM jobtrack!Crafts;
> LEFT OUTER JOIN jobtrack!CraftPay;
> ON Crafts.craftid = Craftpay.craftid;
> INTO ARRAY laData
>
Use NVL() on the fields in the field list.
You will probably need to use SPACE(field_width) with width of the character field and the full width of the numeric field to make sure you get the full width of each field, in case the first record returned has NULL(s)
e.g., assuming crafttitle is c(10) and payrate is n(10,2)
SELECT NVL(Crafts.crafttitle,SPACE(10)) AS crafttitle, ;
NVL(Craftpay.payrate,0000000.00) AS payrate...
Insanity: Doing the same thing over and over and expecting different results.