Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Borislav Borissov
  Where is Borislav Borissov?
 Sofia
 Bulgaria
 Borislav Borissov
 To: Carlos Lima
  Where is Carlos Lima?
 Mindelo
 Cape Verde
 Carlos Lima
 Tags
Subject: RE: select returning null values
Thread ID: 373821 Message ID: 373823 # Views: 42 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Databases, Tables and SQL Server
Date: Wednesday, March 27, 2013 2:06:10 PM         
   


> ERROR: Field descricao does nott accept null values
>
> Why this select return null values?
>
> SELECT Servicos.designacao as descricao, Servicos.codigo;
> FROM Servicos ;
> RIGHT JOIN TipoServicos ON Servicos.tipo_servico==TipoServicos.codigo ;
> and TipoServicos.exame_complementar == "S" ;
> and TipoServicos.requisicao == "S" ;
> INTO CURSOR DD
> BROW

Because you have records in TipoServicos which have no matching records in Servicos.


-----------------
Borislav Borissov

Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.

ENTIRE THREAD

select returning null values Posted by Carlos Lima @ 3/27/2013 1:13:34 PM
RE: select returning null values Posted by Borislav Borissov @ 3/27/2013 2:06:10 PM
RE: select returning null values Posted by Rick Hodgin @ 3/27/2013 2:48:29 PM
RE: select returning null values Posted by Paul Gibson @ 3/27/2013 3:22:22 PM
RE: select returning null values Posted by Jun Tangunan @ 3/27/2013 11:47:46 PM