Use the CASE Statement in a SQL SELECT Clause
SQL Server provides a mechanism for returning different values in a SELECT clause based on Boolean conditions: the CASE statement. This statement resembles Visual Basics Select Case statement. The SQL
SQL Server provides a mechanism for returning different values in a SELECT clause based on Boolean conditions: the CASE statement. This statement resembles Visual Basics Select Case statement. The SQL
Use OLE automation stored procedures to send email: DECLARE @SenderAddress varchar(100)DECLARE @RecipientAddress varchar(100)DECLARE @Subject varchar(200)DECLARE @Body varchar(8000)DECLARE @oMail int –Object referenceDECLARE @resultcode intSET @SenderAddress = ‘[email protected]’SET @RecipientAddress= ‘[email protected]’SELECT @Subject =
XMLwhen it is in ASCIIcan be stored as any other literal in one line, but it’s not very readable. Use the following macros to store XML (or any other string
A more elegant approach: use an associative array. If you have more addresses to block, put them together (in this example, using CGI and Perl): #!perlmy %block_ip=(‘172.56.260.71’=>’bad.org’,’172.56.260.72’=>’evil.org’,);my $remote = $ENV{REMOTE_ADDR}
Here’s an old trick from C, which carries over to Java. If you have two intsa and bwhose values you want to swap, the obvious way to do so is
Shared Function _ LogonUser(ByVal userName As String, ByVal domain As String, _ ByVal password As String, ByVal dwLogonType As Integer, _ ByVal dwLogonProvider As Integer, ByRef phToken As Integer) As
Shared Function _ SHEmptyRecycleBin(ByVal hWnd As Integer, ByVal pszRootPath As String, _ ByVal dwFlags As Integer) As IntegerEnd Function’ Empty all the files in the Recycle Bin.” If RootPath is
‘ Clear the Run History’ The MRU list is kept available until Explorer is restartedSub ClearRunHistory() Dim keyName As String = “SoftwareMicrosoftWindowsCurrentVersionExplorer” _ & “RunMRU” ‘ delete the key that
‘ Test whether a font name and size is supported’ Returns True if the font is supported, False otherwise” If the font is supported but the size is not, it