Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Nasty Nulls
Message
From
04/09/1998 10:39:33
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Nasty Nulls
Miscellaneous
Thread ID:
00133294
Message ID:
00133294
Views:
52
I have the following SQL:
SELECT A.ctime, A.ctime_type, A.tripkey, A.clientkey, ;
       ALLT(B.clname)+", "+ALLT(B.cfname) AS cname, ;
       NVL(C.cloc," ") AS cpickup, NVL(D.cloc," ") AS cdropoff, ;
       "   " AS cstatus ;
   FROM trips A ;
        LEFT OUTER JOIN clients B ON A.clientkey = B.clientkey ;
        LEFT OUTER JOIN locations C ON A.ipick_up = C.lockey ;
        LEFT OUTER JOIN locations D ON A.idrop_off = D.lockey ;
   INTO ARRAY laTrips ;
   WHERE NOT DELETED() ;
   ORDER BY A.ctime
When I do this:

INSERT INTO Curtrips FROM ARRAY laTrips

It tells me CDROPOFF doesn't accept null values. I looked at the array, and sure enough, there's nulls in it. Why doesn't the "NVL(D.cloc," ")" keep them out?

As long as I have the SQL posted, I'm also wondering if I'm doing this right. I want all of the trips, and the client name, pickup, and drop off that goes with each trip. That's what I'm getting, so I know it's not completely wrong. :) But is there a different way I should be wording it that's better?

Thanks,

-Michelle
Next
Reply
Map
View

Click here to load this message in the networking platform