Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Anders Altberg
  Where is Anders Altberg?
 Uppsala
 Sweden
 Anders Altberg
 To: solomon sackey
  Where is solomon sackey?
 texas
 Texas - United States
 solomon sackey
 Tags
Subject: RE: NVL for each field
Thread ID: 228580 Message ID: 228630 # Views: 1 # Ratings: 1
Version: Visual FoxPro 6 Category: Databases, Tables and SQL Server
Date: Wednesday, May 20, 2009 11:16:09 AM         
   


> Dear Expert,
>
> Need to introduce NVL() on each of the fields AQUAL1, AQUAL2
>
>
> Pls assist
>
>
>
>
>
> SELECT * FROM VPAYMAST WHERE LCTEXT)$(UPPER(AQUAL1)) OR LCTEXT$UPPER(AQUAL2) ;
> ORDER BY BRANCH,LNAME;
> INTO CURSOR VPAYMAST


SELECT * FROM Vpaymast ; 
WHERE UPPER(NVL(aqual1,'sometext')) LIKE '%'+m.lctext+'%' ; 
 OR UPPER(NVL(aqual2,'sometext')) LIKE '%'+m.lctext+'%' 


$ is an Xbase operator. I'd recommend using Standard SQL operators and function names in SQL code as far as possible.
It will mean less work rewriting SQL code in the future, or when an SQL trained programmer revises the code.
-Anders

ENTIRE THREAD

NVL for each field Posted by solomon sackey @ 5/20/2009 3:35:40 AM
RE: NVL for each field Posted by Christian Tabligan @ 5/20/2009 4:12:01 AM
RE: NVL for each field Posted by Anders Altberg @ 5/20/2009 11:16:09 AM