- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Skip lines of script if the table is empty.
Help > Scripting Index > Is Empty
Uday
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Skip lines of script if the table is empty.
Jim,
Thank you. I used N rows(dt) >0. Worked perfectly.
Wayne