Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

POSTGRESQL Testing for and selecting only NOT NULL records

Posted on 2014-03-10
3
Medium Priority
?
615 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 35

Accepted Solution

by:
Dan Craciun earned 2000 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 35

Expert Comment

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

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
By, Vadim Tkachenko. In this article we’ll look at ClickHouse on its one year anniversary.
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.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

661 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