hi
tbl_cams_uploaddetails
tbl_cms_uploadDetails
if above 2 table has data than only i want to proceed other wise it will return 1
how to do this?
Try this, although it isn't totally clear what you mean by "it will return 1".
Chris
Code Snippet
IF NOT EXISTS ( SELECT 1
FROM tbl_cams_uploaddetails )
OR NOT EXISTS ( SELECT 1
FROM tbl_cms_uploadDetails )
BEGIN
RETURN 1
END
--Insert the code you wish to run after the condition check
|||I agree with Chirs..
Suppose if you want to proceed the data should not available on any one table then use the following code..
Code Snippet
IF NOT EXISTS ( SELECT 1 FROM tbl_cams_uploaddetails )
OR NOT EXISTS ( SELECT 1 FROM tbl_cms_uploadDetails )
BEGIN
RETURN 1
END
Suppose if you want to proceed the data should not available on both the table then use the following code..
Code Snippet
IF NOT EXISTS ( SELECT 1 FROM tbl_cams_uploaddetails )
AND NOT EXISTS ( SELECT 1 FROM tbl_cms_uploadDetails )
BEGIN
RETURN 1
END
No comments:
Post a Comment