cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
wjalford
Level III

Skip lines of script if the table is empty.

I am quering a database that currently does not yet have the information that I am quering but will in the near future.  So right now I get an empty table.  I would like to add the functionality to skip certain lines in my code that pertain to the empty table and move on with the remaining part of my code that deals with other data sources.  Can someone give me a way to check if the table is empty?

 

Thank you,

 

Wayne

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Skip lines of script if the table is empty.

@uday_guntupalli  provided a good link, to determine if no data table was created, however, the data table may be created, but no rows are populated.  To check for this, you need to check to see if N Rows() are greater than 0.  So look in the Scripting Index for    N Rows()  too

Jim

View solution in original post

3 REPLIES 3
uday_guntupalli
Level VIII

Re: Skip lines of script if the table is empty.

Help > Scripting Index > Is Empty

Best
Uday
txnelson
Super User

Re: Skip lines of script if the table is empty.

@uday_guntupalli  provided a good link, to determine if no data table was created, however, the data table may be created, but no rows are populated.  To check for this, you need to check to see if N Rows() are greater than 0.  So look in the Scripting Index for    N Rows()  too

Jim
wjalford
Level III

Re: Skip lines of script if the table is empty.

Jim,

 

Thank you.  I used N rows(dt) >0.  Worked perfectly.

 

Wayne