Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to use nulls from outer join in SQL Union
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
How to use nulls from outer join in SQL Union
Divers
Thread ID:
00157837
Message ID:
00157837
Vues:
69
I receive the error "Field CBYADDRESS does not accept null values" when I run the SQL command below. This first SQL Select does not return NULLs, but the second one does. Making the second SQL first solves the problem. Unfortunately, I have other queries where the first SQL Select, and/or second one can return NULLs.

I will eventually make these SQL Selects into views. Is there some setting in a view or FoxPro to resolve this error?

Thanks!

SELECT ;
MainCase.DAddress AS cByAddress, ;
MainCase.DCity AS cByCity, ;
MainCase.DState AS cByState, ;
MainCase.DTaxID AS cByTaxID, ;
MainCase.DZip AS cByZip ;
FROM MainCase ;
WHERE MainCase.Office + MainCase.CaseNo = ?gcOfficeCaseNumber ;
UNION ALL ;
SELECT ;
Joint.JDAddr, ;
Joint.JDCity, ;
Joint.JDState, ;
Joint.JDTaxID, ;
Joint.JDZip ;
FROM ;
MainCase LEFT JOIN Joint ;
ON Joint.Office + Joint.CaseNo = MainCase.Office + MainCase.CaseNo ;
WHERE MainCase.Office + MainCase.CaseNo = ?gcOfficeCaseNumber
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform