If you've got SMTP running on a Windows 2003 server, you can use the following SP. If it's 2000, then use the CDONTS object (some of the properties will be different).
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[SendEmail]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)...
create procedure test
(
@word varchar(10),
@sectionID varchar(max)
)
as
begin
EXECUTE ( 'SELECT * FROM [testtable] WHERE sectionID IN ( ' + @sectionID + ')' )
end
CASE only works when you want to return different values based on a variable or condition.
If you want to execute differing lines of code based on a variable then
If v = 1
begin
------
end
Is the way to go. It looks clunky and performance may suffer, but it's easily readable by humans.
I've been experiencing IIS6 "hangs" weekly. Using the IIS Diagnostics, I traced it to one our .NET web services.
I'm using two approaches:
1) Modify the machine.config file to increase threading.
2) Put the bad boy ws into its own app pool and recycle it based on memory.
No hangs for two...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.