Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 IF...LIKE

Author  Topic 

GRAYWOLF
Posting Yak Master

106 Posts

Posted - 2008-12-13 : 03:53:10
Yeah, I don't think it is syntactically correct, but how would you write something like:

IF @filename1 LIKE '%.exe'
begin
print @filename
end

---------------------------

Working until "the morning sun sets the midnight sky on fire"!

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-12-13 : 03:57:36
it is syntactically right. not sure what you're trying to achieve. why did u get any syntactical error?
Go to Top of Page

GRAYWOLF
Posting Yak Master

106 Posts

Posted - 2008-12-13 : 04:01:38
I'm not sure, but I think I typed it differently here than I originally did in my script...It didn't "print" before.

Thanks....



---------------------------

Working until "the morning sun sets the midnight sky on fire"!
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-12-13 : 04:03:06
quote:
Originally posted by GRAYWOLF

I'm not sure, but I think I typed it differently here than I originally did in my script...It didn't "print" before.

Thanks....



---------------------------

Working until "the morning sun sets the midnight sky on fire"!


whats does @filename contain?what's its datatype?
Go to Top of Page
   

- Advertisement -