Solved

POSTGRESQL Testing for and selecting only NOT NULL records

Posted on 2014-03-10
3
539 Views
Last Modified: 2014-03-10
I am new to Postgresql and am struggling with how to test for NOT null records. I'm using ODBC from within VFP as follows:

SQLEXEC(connhndl,"select id as shipid,name as shipto,city as shipcity, state_id from res_partner where not null state_id","shipto")

What is the correct syntax to achieve this?
0
Comment
Question by:Maritimed
  • 2
3 Comments
 
LVL 34

Accepted Solution

by:
Dan Craciun earned 500 total points
ID: 39917740
SELECT id AS shipid, name AS shipto, city AS shipcity, state_id
FROM res_partner
WHERE state_id IS NOT NULL

http://www.postgresql.org/docs/8.1/static/functions-comparison.html

HTH,
Dan
0
 

Author Closing Comment

by:Maritimed
ID: 39917937
Thanks, exactly what I was looking for!
0
 
LVL 34

Expert Comment

by:Dan Craciun
ID: 39917942
Glad I could help!
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Best database to use for Maps is PostgreSQL. This is an open source database. Comes as a package with most Linux OS. For more info visit the following site: http://www.postgresql.org/ (http://www.postgresql.org/) This requires some add-o…
Microsoft Visual FoxPro (short VFP) is a programming language with it’s own IDE and database, ranking somewhat between Access and VB.NET + SQL Server (Express). Product Description: http://msdn.microsoft.com/en-us/vfoxpro/default.aspx (http://msd…
Steps to create a PostgreSQL RDS instance in the Amazon cloud. We will cover some of the default settings and show how to connect to the instance once it is up and running.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now