[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 639
  • Last Modified:

POSTGRESQL Testing for and selecting only NOT NULL records

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
Maritimed
Asked:
Maritimed
  • 2
1 Solution
 
Dan CraciunIT ConsultantCommented:
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
 
MaritimedAuthor Commented:
Thanks, exactly what I was looking for!
0
 
Dan CraciunIT ConsultantCommented:
Glad I could help!
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now