Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

columns check

Status
Not open for further replies.

tran008

Technical User
May 14, 2003
110
US
I need to check to see if the columns from the table are empty or the length not long enough. Currently this is what I got...is there a better way to write these:

INSERT INTO #tmpTBL
SELECT col1 FROM tbl WHERE ISNULL((col1,'')='' or len(col1) < 5)

INSERT INTO #tmpTBL
SELECT col2 FROM tbl WHERE ISNULL((col2,'')='' or len(col2) < 5)

INSERT INTO #tmpTBL
SELECT col3 FROM tbl WHERE ISNULL((col3,'')='' or len(col3) < 5)

thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top