HomeForum
Welcome, Guest

How do I check to see if a table is empty?
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: How do I check to see if a table is empty?

How do I check to see if a table is empty? 2 years, 4 months ago #771

  • Frank
  • OFFLINE
  • Junior Boarder
  • Posts: 29
  • Karma: 0
As one of the routines in my package, I would like to check to see if a SQL table is empty, or populated. If the table is empty, then the next part of the package will process. If the table has any data in it, the package will fail and abort.

I am using ELT PRocessor Pro

Re:How do I check to see if a table is empty? 2 years, 4 months ago #772

  • admin
  • OFFLINE
  • Moderator
  • Posts: 2183
  • Karma: 12
Frank

All you need to do is to use SQL Data Check Object.

SQL Data Check uses SQL scripts to check data in the database.
For example user may write following SQL:

Select count(*) from table

Execution will be successful if the value of first field of query is more than 0
Execution will fail if the value of first field of query is equals to 0 or less than 0 or field type is not numeric.

Peter
  • Page:
  • 1
Time to create page: 0.15 seconds

Testimonials

"Because of our relationship with DBSL, We are able to provide more complete solutions for our customers. As one of our key technology partners, DBSL is always willing to go that extra mile: adding new functionality, assisting us with support issues ... and this has been an important part of our success."

Bill Dill,
Deployment Manager

User Login

You only need to log in or register to use our support forum



Our customers

BP

BBC

HSBC


Databases we work with

Go to top