Permalink
Browse files

Merge pull request #82 from bintocher/master

New function Qvc.DropTable()
  • Loading branch information...
RobWunderlich committed Jan 15, 2019
2 parents 55be95e + 6429505 commit ad9faf9ceaaada74c38b75f83d2d7ee541b93ba3
Showing with 23 additions and 0 deletions.
  1. +23 −0 QVC_Source/Qvc_DropTable.qvs
@@ -0,0 +1,23 @@
///$tab DropTable
SUB Qvc.DropTable (_qvctemp.tablename)
/**
@source Qvc_DropTable.qvs
Drop table if it exists.
Not need to make any checks before drop table.
- if noofrows('tab') > 0 then drop end if
- if tablenumber('tab') > 0 then drop end if
- etc...

@syntax CALL Qvc.DropTable('tablename');

@param 1 String. The table name
*/
// Check table exists
IF NOT ISNULL (TableNumber('$(_qvctemp.tablename)')) THEN
// If not null then table exist, drop it
DROP TABLE '$(_qvctemp.tablename)';
END IF

SET _qvctemp.tablename=; //Delete variable

END SUB

0 comments on commit ad9faf9

Please sign in to comment.