<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' version='2.0'><channel><atom:id>tag:blogger.com,1999:blog-6711727</atom:id><lastBuildDate>Fri, 09 May 2008 20:00:09 +0000</lastBuildDate><title>Programmabilities Blog</title><description/><link>http://programmabilities.com/blog/index.php</link><managingEditor>noreply@blogger.com (programmabilities)</managingEditor><generator>Blogger</generator><openSearch:totalResults>25</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-6711727.post-4298346551749906914</guid><pubDate>Fri, 09 May 2008 17:51:00 +0000</pubDate><atom:updated>2008-05-09T15:00:09.889-05:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>sql</category><title>SQL Server 2005 Reports: tips</title><description>SSRS&lt;/ACRONYMN title="SQL Server Reporting Services"&gt;:
&lt;ul&gt;


&lt;li&gt;
Page Header:
&lt;ul&gt;
&lt;li&gt;
TextBox via Expression...: &lt;code&gt;=Globals.ReportFolder &amp;amp; Globals.ReportName
&lt;/code&gt;
&lt;/li&gt;

&lt;/ul&gt;
&lt;/li&gt;


&lt;li&gt;
Page Footer:
&lt;ul&gt;
&lt;li&gt;
Page Footer: TextBox via Expression...: &lt;code&gt;=Format(Globals!PageNumber) + " of " + Format(Globals!TotalPages) + " pages"&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;="Printed by " + User!UserID + " on " + DateTime.Now.ToString()&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;="Execution Time: " +
IIf(System.DateTime.Now.Subtract(Globals!ExecutionTime).TotalSeconds &lt; 1, "0 seconds", 
(
IIf(System.DateTime.Now.Subtract(Globals!ExecutionTime).Hours &gt; 0, System.DateTime.Now.Subtract(Globals!ExecutionTime).Hours &amp; " hour(s), ", "") +
IIf(System.DateTime.Now.Subtract(Globals!ExecutionTime).Minutes &gt; 0, System.DateTime.Now.Subtract(Globals!ExecutionTime).Minutes &amp; " minute(s), ", "") +
IIf(System.DateTime.Now.Subtract(Globals!ExecutionTime).Seconds &gt; 0, System.DateTime.Now.Subtract(Globals!ExecutionTime).Seconds &amp; " second(s)", ""))
)&lt;/code&gt;
&lt;/li&gt;

&lt;/ul&gt;
&lt;/li&gt;



&lt;li&gt;
Body: 
&lt;ul&gt;
&lt;li&gt;
TextBox via Expression...: &lt;code&gt;=Format(Sum(Fields!Account.Value), "C0")&lt;/code&gt; (Works if column is numeric data type.)
&lt;/li&gt;
&lt;li&gt;
Alternate rows by adding the following to the row via Properties &gt; BackgroundColor expression of your detail row: 
&lt;code&gt;=iif(RowNumber(Nothing) Mod 2, "White", "Gainsboro")&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;

&lt;/ul&gt;


&lt;ul&gt;
&lt;li&gt;
*&lt;a href="http://www.ssw.com.au/Ssw/Standards/Rules/RulesToBetterSQLReportingServices.aspx"&gt;http://www.ssw.com.au/Ssw/Standards/Rules/RulesToBetterSQLReportingServices.aspx&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://download.microsoft.com/download/1/3/4/134644fd-05ad-4ee8-8b5a-0aed1c18a31e/reporting_services_design.doc"&gt;http://download.microsoft.com/download/1/3/4/134644fd-05ad-4ee8-8b5a-0aed1c18a31e/reporting_services_design.doc&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://notethat.blogspot.com/2007/10/reporting-services-tips-tricks-and.html"&gt;http://notethat.blogspot.com/2007/10/reporting-services-tips-tricks-and.html&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-4039287786711000";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
google_color_border = "DEE7EC";
google_color_bg = "FFFFFF";
google_color_link = "0066FF";
google_color_url = "0066FF";
google_color_text = "000000";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;</description><link>http://programmabilities.com/blog/2008/05/sql-server-2005-reports-tips.html</link><author>noreply@blogger.com (programmabilities)</author></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-6711727.post-4264024532427032550</guid><pubDate>Fri, 28 Mar 2008 22:23:00 +0000</pubDate><atom:updated>2008-04-21T20:24:49.074-05:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>sql</category><title>SSIS &gt; VS Export wizard: table to Excel</title><description>After using the &lt;acronym title="SQL Server Integration Services"&gt;SSIS&lt;/acronym&gt; &gt; VS &lt;strong&gt;Export&lt;/strong&gt; wizard for table to Excel, you must add &lt;code&gt;DROP TABLE Query&lt;/code&gt; to the &lt;strong&gt;Event Handlers&lt;/strong&gt; tab or else it will error the second time it is reRun.
&lt;a href="http://programmabilities.com/blog/uploaded_images/ssis_Export_Excel-702445.bmp"&gt;&lt;img style="display:block; margin:0px auto 5px; text-align:center;cursor:pointer; cursor:hand;" src="http://programmabilities.com/blog/uploaded_images/ssis_Export_Excel-702314.bmp" border="0" alt="SSIS" /&gt;&lt;/a&gt;

&lt;h3&gt;&lt;acronym title="SQL Server Integration Services"&gt;SSIS&lt;/acronym&gt; &gt; VS &lt;strong&gt;Import&lt;/strong&gt; wizard for Excel to table: &lt;/h3&gt;
&lt;ul&gt;&lt;li&gt;Be sure to only checkmark &lt;tt&gt;Results$&lt;/tt&gt;.&lt;/li&gt;
&lt;li&gt;Be sure to Select Delete table option.&lt;/li&gt;
&lt;li&gt;Be sure to Change &lt;tt&gt;Results$&lt;/tt&gt; name to Destination table name.&lt;/li&gt;
&lt;li&gt;If there is an error, it is often because a row in Excel has a NULL but the table column is NOT NULL (so add a blank to the Excel field).&lt;/li&gt;
&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-4039287786711000";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
google_color_border = "DEE7EC";
google_color_bg = "FFFFFF";
google_color_link = "0066FF";
google_color_url = "0066FF";
google_color_text = "000000";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;</description><link>http://programmabilities.com/blog/2008/03/ssis-vs-export-wizard-table-to-excel.html</link><author>noreply@blogger.com (programmabilities)</author></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-6711727.post-8323002143786483659</guid><pubDate>Fri, 07 Mar 2008 20:43:00 +0000</pubDate><atom:updated>2008-04-18T11:27:02.493-05:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>vb</category><title>ReplaceCommasWithPipes.vbs</title><description>&lt;pre&gt;' Currently this VBScript is set to replace-commas-with-pipes for every file that is 
'in the folder where this VBScript sits:
' Before run it do the following:
' 1. Open VBScript in text editor
' 2. Set the parameters:
'        cFolder_Name = "." ' current directory
'        cOnlyOneFile = False ' set to True if I want to process only one file with name set below
'        cOnlyFileName = "thisfile.csv"
' 3. Place the VBScript into the target folder
' 4. Run it by double-click
' Notes: http://groups.google.com/group/microsoft.public.excel.misc/browse_thread/thread/79ddd204ebb88287/be5d195da9241df9%23be5d195da9241df9
' -------------------------------------------------------
On Error Resume Next

const cFolder_Name = "."  ' current directory
const cOnlyOneFile = False ' False, So all files in the folder.
const cOnlyFileName = "thisfile.csv" ' Uses this if the above was True (only wanted to process 1 file).

Set oFSO = CreateObject("Scripting.FileSystemObject")

' Get folder:
Set oFolder = oFSO.GetFolder(cFolder_Name)
If oFolder Is Nothing Or Err.Number &lt;&gt; 0 Then
  MsgBox "Can't get a folder for search files. " + vbCRLF + "Please check the folder name." + vbCRLF + Err.Description, vbCritical, "Fatal error!" ' I will probably comment this out when this VBScript runs automatically as a scheduled job.
End If

Set oFiles = oFolder.Files
If Err.Number &lt;&gt; 0 Or oFiles Is Nothing Then
  MsgBox "Can't get a list of files of folder." + vbCRLF + "" + vbCRLF + Err.Description, vbCritical, "Fatal error!"                               ' I will probably comment this out when this VBScript runs automatically as a scheduled job.
End If

Cnt = CInt(0)
For Each oFile In oFiles
  If oFSO.GetExtensionName(oFile.Name) = "csv" Then ' Checks for "csv" file extension.
    If (cOnlyOneFile And (oFile.Name = cOnlyFileName)) Or (Not cOnlyOneFile) Then
      Call ReplaceSymbols(oFile.Name) 
      Cnt = Cnt + 1
    End If
  End If
Next

Senmail()

MsgBox "Replacing is done. Total number of files had been processed: " + CStr(Cnt), vbExclamation, "Message..."                                    ' I will probably comment this out when this VBScript runs automatically as a scheduled job.
' cleanup
Set oFiles = Nothing 
Set oFSO = Nothing

' Find-and-replace:
Sub ReplaceSymbols(oFileName) ' AKA "File.Name".
  If oFSO.FileExists(oFileName) Then 
    Set oTextFile = oFSO.OpenTextFile(oFileName, 1, False) 
    sFileContents = oTextFile.ReadAll 
    oTextFile.Close 

    Set oRegEx = CreateObject("VBScript.RegExp") 
    With oRegEx 
      .Global = True 
      .IgnoreCase = False 
      .Pattern = "," ' Or vbTab or "|" etc...
      sFileContents = .Replace(sFileContents, "|") 
'      .Pattern = "\|"                               ' reverse replacing
'      sFileContents = .Replace(sFileContents, ",") 
    End With 

    Set oNewFile = oFSO.CreateTextFile(oFileName, True) ' Maybe oNewFile is not needed--it just could have been called oTextFile.
    oNewFile.Write sFileContents 
    oNewFile.Close 
  End If
End Sub


' NOTE: This first way would only work on my PC, not on the other user's PCs; so I must use the second snippet, Senmail(), at the bottom. NOTE: If I made the changes marked "future testing" this might work.
' Send email to Jon Doe. --If the PC this runs on is not set right, this email will not get sent. 
'Set oMessage = CreateObject("CDO.Message") 
'oMessage.From     = "Generated automatically for AWARE &lt;jon.doe@jd.com&gt;" ' NOTE: If future testing: Comment this out.  
'oMessage.To       = "jon.doe@jd.com,jon.doe2@jd.com"       ' NOTE: If future testing: Should be ";".                                      
'oMessage.Subject  = "AWARE: Extracts done."       
'oMessage.Sender   = "jon.doe@jd.com"                       ' NOTE: If future testing: Comment this out.                                               
'oMessage.TextBody = "AWARE: Commas replaced with pipes." 
'oMessage.Send

' NOTE : Is using MS Outlook API to send e-mails. So check If MS Outlook installed on a workstation before a using of this script.
Sub Senmail()
  Set objOutlook = CreateObject("Outlook.Application")
  Set objOutlookMsg = objOutlook.CreateItem(0)
  With objOutlookMsg
' This line caused it not to even popup warning, so leave it off:   .From     = "jon.doe@jd.com &lt;jon.doe@jd.com&gt;"   ' "Generated automatically for AWARE &lt;jon.doe@jd.com&gt;"
     .To = "jon.doe@jd.com; jon.doe2@jd.com; jon.doe3@jd.com; jon.doe4@jd.com"   
     .Subject = "AWARE: Extracts done."
' This line caused it not to even popup warning, so leave it off:   .Sender   = "jon.doe@jd.com"   ' NOTE: jon.doe2's email is automatically inserted here because it is sent from here Outlook.
     .Body = "AWARE: Commas replaced with pipes. [Note: This message was generated and sent automatically.]"
     .Send
  End With
  Set objOutlookMsg = Nothing
  Set objOutlook = Nothing
End Sub&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-4039287786711000";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
google_color_border = "DEE7EC";
google_color_bg = "FFFFFF";
google_color_link = "0066FF";
google_color_url = "0066FF";
google_color_text = "000000";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;</description><link>http://programmabilities.com/blog/2008/03/replacecommaswithpipesvbs.html</link><author>noreply@blogger.com (programmabilities)</author></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-6711727.post-6590016818001044110</guid><pubDate>Thu, 06 Mar 2008 18:28:00 +0000</pubDate><atom:updated>2008-03-07T12:02:03.152-06:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>sql</category><title>Create SSIS to copy tables</title><description>&lt;p&gt;An &lt;acronym title="SQL Server Integration Services"&gt;SSIS&lt;/acronym&gt; to copy tables from a Source to a Destination.  Directions:
&lt;/p&gt;
&lt;ol&gt;
 &lt;li&gt;From &lt;strong&gt;Start&lt;/strong&gt;, select &lt;strong&gt;SQL Server Business Intelligence Development Studio&lt;/strong&gt;
 &lt;/li&gt;
 &lt;li&gt;&lt;strong&gt;File&lt;/strong&gt;
  &lt;ol&gt;
   &lt;li&gt;&lt;strong&gt;New Project…&lt;/strong&gt;
    &lt;ol&gt;
     &lt;li&gt;&lt;strong&gt;Project types: Business Intelligence Projects&lt;/strong&gt;
     &lt;/li&gt;
    &lt;li&gt;&lt;strong&gt;Integration Services Project…&lt;/strong&gt;
    &lt;/li&gt;
    &lt;li&gt;Click “&lt;strong&gt;OK&lt;/strong&gt;”
    &lt;/li&gt;
   &lt;/ol&gt;
  &lt;/li&gt;
 &lt;/ol&gt; 
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Toolbox&lt;/strong&gt;
 &lt;ol&gt;
  &lt;li&gt;Drag "&lt;strong&gt;Transfer SQL Server Objects Task&lt;/strong&gt;" to "&lt;strong&gt;Control Flow&lt;/strong&gt;" tab's pane.
   &lt;ol&gt;
    &lt;li&gt;Right-click choose &lt;strong&gt;Edit…&lt;/strong&gt;
     &lt;ol&gt;
      &lt;li&gt;&lt;strong&gt;Objects&lt;/strong&gt;
       &lt;ol&gt;
        &lt;li&gt;&lt;strong&gt;SourceConnection &amp;#8249;New connection…&amp;#8250;&lt;/strong&gt; = NWDSQL
        &lt;/li&gt;
        &lt;li&gt;&lt;strong&gt;SourceDatabase&lt;/strong&gt; = NIS_empl_wage
        &lt;/li&gt;
        &lt;li&gt;&lt;strong&gt;DestinationConnection &amp;#8249;New connection…&amp;#8250;&lt;/strong&gt; = TESTSQL
        &lt;/li&gt;
        &lt;li&gt;&lt;strong&gt;DestinationDatabase&lt;/strong&gt; = NIS_empl_wage
        &lt;/li&gt;
        &lt;li&gt;&lt;strong&gt;CopyData&lt;/strong&gt; = &lt;strong&gt;True&lt;/strong&gt;
        &lt;/li&gt;
        &lt;li&gt;&lt;strong&gt;ExistingData&lt;/strong&gt; = &lt;strong&gt;Replace&lt;/strong&gt; (so not append (dup errors))
        &lt;/li&gt;
        &lt;li&gt;&lt;strong&gt;ObjectsToCopy&lt;/strong&gt; (expand)
         &lt;ol&gt;
          &lt;li&gt;&lt;strong&gt;CopyAllTables&lt;/strong&gt; = &lt;strong&gt;True&lt;/strong&gt; (so not sprocs)
          &lt;/li&gt;
         &lt;/ol&gt;
        &lt;/li&gt;
        &lt;li&gt;Note: Leave all other options &lt;strong&gt;False&lt;/strong&gt;.  Ex., &lt;strong&gt;Table Options&lt;/strong&gt;—Can leave all these &lt;strong&gt;False&lt;/strong&gt; because 

it will just move data so Destination’s Primary Keys will remain.
        &lt;/li&gt;
        &lt;/ol&gt;
       &lt;/li&gt;
      &lt;/ol&gt;
     &lt;/li&gt;
     &lt;li&gt;Click “&lt;strong&gt;OK&lt;/strong&gt;”
     &lt;/li&gt;
    &lt;/ol&gt;
   &lt;/li&gt;
  &lt;/ol&gt;
 &lt;/li&gt;
 &lt;li&gt;Save and Run
 &lt;/li&gt;
&lt;/ol&gt;
&lt;p style="font-size:9pt;"&gt;
Note 1: Your &lt;strong&gt;Properties&lt;/strong&gt; for the &lt;strong&gt;Transfer SQL Server Objects Task&lt;/strong&gt; will now look like this: 
&lt;/p&gt;
&lt;ol style="font-size:9pt;"&gt;
 &lt;li&gt;&lt;strong&gt;CopyAllTables&lt;/strong&gt; = &lt;strong&gt;True&lt;/strong&gt; (so not sprocs)&lt;/li&gt;
 &lt;li&gt;&lt;strong&gt;CopyData&lt;/strong&gt; = &lt;strong&gt;True&lt;/strong&gt;&lt;/li&gt;  
 &lt;li&gt;&lt;strong&gt;DestinationConnection&lt;/strong&gt; = TESTSQL&lt;/li&gt;  
 &lt;li&gt;&lt;strong&gt;DestinationDatabase&lt;/strong&gt; = NIS_empl_wage&lt;/li&gt;
 &lt;li&gt;&lt;strong&gt;ExistingData&lt;/strong&gt; = &lt;strong&gt;Replace&lt;/strong&gt; (so not append (dup errors))&lt;/li&gt;
 &lt;li&gt;&lt;strong&gt;SourceConnection&lt;/strong&gt; = NWDSQL&lt;/li&gt;   
 &lt;li&gt;&lt;strong&gt;SourceDatabase&lt;/strong&gt; = NIS_empl_wage&lt;/li&gt;
&lt;/ol&gt;
&lt;p style="font-size:9pt;"&gt;
Note 2: A DB "restore" by the DBA would nix Destination tables that do not exist in Source tables; but not this technique.
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-4039287786711000";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
google_color_border = "DEE7EC";
google_color_bg = "FFFFFF";
google_color_link = "0066FF";
google_color_url = "0066FF";
google_color_text = "000000";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;</description><link>http://programmabilities.com/blog/2008/03/create-ssis-to-copy-tables.html</link><author>noreply@blogger.com (programmabilities)</author></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-6711727.post-7805881843651749847</guid><pubDate>Fri, 22 Feb 2008 00:42:00 +0000</pubDate><atom:updated>2008-03-07T12:10:48.310-06:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>sql</category><title>CASE: This way (3) NULLs get put in tbl if data is blank.</title><description>&lt;pre&gt;command = New SqlCommand("INSERT INTO tblFoo (UIAcctNum, WorkZip, CheckRouteDesc, Agency, Division, RUN, Rpt_Unit_RUNDesc, StartDate,EndDate ,CheckRouteCode, Rpt_Unit_RUNDesc__old,NAICS) " &amp; _ 
" VALUES (@UIAcctNum, @WorkZip, @CheckRouteDesc, @Agency, @Division, @RUN, " &amp; _ 
"CASE WHEN ltrim(@Rpt_Unit_RUNDesc) = '' THEN NULL ELSE @Rpt_Unit_RUNDesc END, " &amp; _ 
"@StartDate, " &amp; _ 
"CASE WHEN ltrim(@EndDate) = '' THEN NULL ELSE @EndDate END, " &amp; _ 
"@CheckRouteCode, " &amp; _ 
"CASE WHEN ltrim(@Rpt_Unit_RUNDesc__old) = '' THEN NULL ELSE @Rpt_Unit_RUNDesc__old END, " &amp; _ 
" CASE WHEN ltrim(@NAICS) = '' THEN NULL ELSE @NAICS END)", connection) ' This way (3) NULLs get put in tbl if data is blank.&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-4039287786711000";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
google_color_border = "DEE7EC";
google_color_bg = "FFFFFF";
google_color_link = "0066FF";
google_color_url = "0066FF";
google_color_text = "000000";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;</description><link>http://programmabilities.com/blog/2008/02/this-way-3-nulls-get-put-in-tbl-if-data.html</link><author>noreply@blogger.com (programmabilities)</author></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-6711727.post-4780819785549362937</guid><pubDate>Mon, 10 Dec 2007 04:00:00 +0000</pubDate><atom:updated>2008-04-08T21:08:24.805-05:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>sql</category><title>SQL notes</title><description>&lt;ul&gt;
&lt;li&gt;&lt;code&gt;SELECT DISTINCT * INTO ##temp3 from ##temp2 --Use this if I want to INSERT rows AND create the destination table.
&lt;/code&gt;&lt;/li&gt;

&lt;li&gt;&lt;code&gt;WHERE ##temp1.Area &lt;&gt; ##temp2.Area -- The 'WHERE &lt;&gt;' stops a cartesian join.&lt;/code&gt;&lt;/li&gt; 

&lt;li&gt;&lt;code&gt;SELECT * INTO ##temp3 FROM (SELECT * FROM ##temp1 UNION SELECT * FROM ##temp2) un&lt;/code&gt;&lt;/li&gt;

&lt;li&gt;&lt;code&gt;strSQL = "IF OBJECT_ID('tblTempNIS_Qtrly_SumByRUN_and_crc', 'U') IS NOT NULL DROP TABLE tblTempNIS_Qtrly_SumByRUN_and_crc" ' This is not really a temp table because no #; so must DROP. It's a helper table. Couldn't use a temp because mData's Clear lose the data for the next query's use of it. ' The ", 'U' " is optional; it just insures that the object is a user table and not, for example, a sproc or other type of object.&lt;/code&gt;&lt;/li&gt;

&lt;li&gt;
&lt;pre&gt;&lt;code&gt;'To get all information about the @@Error value that is returned in the output parameter 
'From Master database 
'SELECT * FROM sysmessages WHERE Error = 2627 'type value in rdoQy(3) here&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;pre&gt;--NWDSQL.BmrkSource.PendingPublish is empty for 2003-2004. Thus do this to populate it with rows from the other table:
INSERT INTO BmrkSource.dbo.PendingPublish
SELECT NEArea,IdentifierCode,EndDate,NumberOfPeople,Week,ItemCodeID,Ratio --Note: Published has 1 extra column at the end so I must list these out.
FROM NELausData.dbo.Published
WHERE NELausData.dbo.Published.EndDate LIKE '2004%'
OR NELausData.dbo.Published.EndDate LIKE '2003%'&lt;/pre&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-4039287786711000";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
google_color_border = "DEE7EC";
google_color_bg = "FFFFFF";
google_color_link = "0066FF";
google_color_url = "0066FF";
google_color_text = "000000";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;</description><link>http://programmabilities.com/blog/2007/12/sql-notes.html</link><author>noreply@blogger.com (programmabilities)</author></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-6711727.post-6742918732360496165</guid><pubDate>Thu, 22 Nov 2007 20:07:00 +0000</pubDate><atom:updated>2007-11-23T21:55:07.986-06:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>sql</category><title>How to get a DB and send it....</title><description>&lt;p&gt;
You can backup the DB from the server and then restore it on your local machine with installed MS SQL Server 2000. Then you can change or delete any pruned info from the DB on your local machine. Then you can backup the modified DB again and send that backup file (*.bak file). You can send this file with Gmail. There is about 3Gb available space.
&lt;/p&gt;
&lt;ol&gt;&lt;strong&gt;How to backup...&lt;/strong&gt;
&lt;li&gt;Open Enterprise Manager&lt;/li&gt;
&lt;li&gt;Select source DB&lt;/li&gt;
&lt;li&gt;Right click on the selected DB. Select All Tasks-&gt;Backup Database... from the popup menu.&lt;/li&gt;
&lt;li&gt;Select File and filegroup and add destination file name in the Backup dialog.&lt;/li&gt;
&lt;li&gt;Press OK&lt;/li&gt;
&lt;/ol&gt;
&lt;ol&gt;&lt;strong&gt;How to restore...&lt;/strong&gt;
&lt;li&gt;Open Enterprise Manager&lt;/li&gt;
&lt;li&gt;Select Databases node&lt;/li&gt;
&lt;li&gt;Right click on this node. Select All Tasks-&gt;Restore Database... from the popup menu.&lt;/li&gt;
&lt;li&gt;Type database name in the Restore as database textbox&lt;/li&gt;
&lt;li&gt;Select Restore From Device&lt;/li&gt;
&lt;li&gt;Press Select Device&lt;/li&gt; 
&lt;li&gt;Add backup file name&lt;/li&gt;
&lt;li&gt;Press OK&lt;/li&gt;
&lt;li&gt;In the Options tab check file pathes where your database will be restored.&lt;/li&gt;
&lt;li&gt;Press OK&lt;/li&gt;
&lt;li&gt;Select File and filegroup and add destination file name in the Backup dialog.&lt;/li&gt;
&lt;li&gt;Press OK&lt;/li&gt;
&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-4039287786711000";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
google_color_border = "DEE7EC";
google_color_bg = "FFFFFF";
google_color_link = "0066FF";
google_color_url = "0066FF";
google_color_text = "000000";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;</description><link>http://programmabilities.com/blog/2007/11/how-to-get-db-and-send-it.html</link><author>noreply@blogger.com (programmabilities)</author></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-6711727.post-6119801377362887080</guid><pubDate>Thu, 27 Sep 2007 21:59:00 +0000</pubDate><atom:updated>2007-10-12T10:57:38.948-05:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>sql</category><title>Excel: compare two Worksheets</title><description>&lt;p&gt;
&lt;strong&gt;Excel Macro&lt;/strong&gt;
&lt;br/&gt;
&lt;a href="http://exceltip.com/st/Compare_two_worksheets_using_VBA_in_Microsoft_Excel/477.html"&gt;http://exceltip.com/st/Compare_two_worksheets_using_VBA_in_Microsoft_Excel/477.html&lt;/a&gt;
&lt;br/&gt;
Compares the 2 Worksheets and pops up a workbook with the differences:
&lt;br/&gt;
Steps:
&gt;Tools &gt; Macro &gt;Macros &gt;Run
&lt;/p&gt;

&lt;p&gt;
&lt;strong&gt;Excel Function&lt;/strong&gt;
&lt;br/&gt;
Function for comparing data: &lt;a href="http://office.microsoft.com/en-us/excel/HP100625641033.aspx?pid=CH100645341033"&gt;http://office.microsoft.com/en-us/excel/HP100625641033.aspx?pid=CH100645341033&lt;/a&gt;
&lt;br/&gt;
Here's the Excel formula: &lt;code&gt;=Exact(ColumnRow,ColumnRow)&lt;/code&gt;
&lt;br/&gt;
An example:  &lt;code&gt;=EXACT(G5,P5)&lt;/code&gt; [First put both worksheets on the same worksheet, side by side.]
&lt;br/&gt;
If the result is True data matches; if False data does not match
&lt;/p&gt;
&lt;p&gt;
Also, I was told there is a way to recieve as output each row that was different using a "Filter".&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-4039287786711000";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
google_color_border = "DEE7EC";
google_color_bg = "FFFFFF";
google_color_link = "0066FF";
google_color_url = "0066FF";
google_color_text = "000000";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;</description><link>http://programmabilities.com/blog/2007/09/excel-compare-two-worksheets.html</link><author>noreply@blogger.com (programmabilities)</author></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-6711727.post-8217009534393082740</guid><pubDate>Thu, 30 Aug 2007 22:37:00 +0000</pubDate><atom:updated>2007-10-21T00:39:22.131-05:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>sql</category><title>SQL compare two tables</title><description>Difference in data stored in both tables (compare the difference between two tables)? 

You can use SQL to see rows which don't have a match in one table 
or the other: 
&lt;pre&gt;&lt;code&gt;Select col_a,col_b from table1 
where not exists 
    (select * from table2 
     where table1.col_a = table2.col_a and 
           table1.col_b = table2.col_b)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
Repeat for table2.  
&lt;/p&gt;
&lt;p&gt;
further notes:
--http://windowsitpro.com/Articles/ArticleID/14368/14368.html?Ad=1
&lt;/br&gt;
--http://webmasterworld.com/databases_sql_mysql/3241540.htm
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-4039287786711000";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
google_color_border = "DEE7EC";
google_color_bg = "FFFFFF";
google_color_link = "0066FF";
google_color_url = "0066FF";
google_color_text = "000000";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;</description><link>http://programmabilities.com/blog/2007/08/sql-compare-rows-two-tables.html</link><author>noreply@blogger.com (programmabilities)</author></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-6711727.post-4416079196267660092</guid><pubDate>Fri, 20 Jul 2007 14:30:00 +0000</pubDate><atom:updated>2007-07-20T09:39:21.793-05:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>sql</category><title>Debug sproc in VS</title><description>&lt;p&gt;
In VS at the &lt;strong&gt;Sever Explorer&lt;/strong&gt; pane I right-click on my data connection that I added and select &lt;strong&gt;Modify Connection&lt;/strong&gt;. Then in the &lt;strong&gt;Modify Connection&lt;/strong&gt; dialog I clicked &lt;strong&gt;Advanced...&lt;/strong&gt; and then in the &lt;strong&gt;Advanced Properties&lt;/strong&gt; dialog I changed &lt;strong&gt;Pooling&lt;/strong&gt; from True to &lt;strong&gt;False&lt;/strong&gt;.  Now it works.
Also, in the configuration file, the &lt;strong&gt;Enable SQL Server debugging&lt;/strong&gt; must be checked. Also, I have to add &lt;code&gt;cmd.CommandTimeout=1800&lt;/code&gt; to the VB's sproc area else it will time-out while clicking thru the sproc in the debugger.
&lt;/p&gt;
&lt;p&gt;
But, when not debugging, in order to get the app to run to completion without crashing with the error &lt;strong&gt;Error while executing 'a batch cmd' at line 0&lt;/strong&gt; , I have to uncheck &lt;strong&gt;Enable SQL Server debugging&lt;/strong&gt; and set &lt;strong&gt;Pooling&lt;/strong&gt; back to &lt;strong&gt;True&lt;/strong&gt;. --Because not pooling the connections hurts performance.
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-4039287786711000";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
google_color_border = "DEE7EC";
google_color_bg = "FFFFFF";
google_color_link = "0066FF";
google_color_url = "0066FF";
google_color_text = "000000";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;</description><link>http://programmabilities.com/blog/2007/07/debug-sproc-in-vs.html</link><author>noreply@blogger.com (programmabilities)</author></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-6711727.post-8640733076097766381</guid><pubDate>Wed, 18 Jul 2007 12:56:00 +0000</pubDate><atom:updated>2007-07-18T10:17:02.059-05:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>sql</category><title>To export DTS package, do the following:</title><description>&lt;ol style="list-style-type:arabic;"&gt;
&lt;li&gt;Open MS SQL Server Enterprise Manager&lt;/li&gt;
&lt;li&gt;Go to &lt;strong&gt;Local Packages&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Open some DTS Package&lt;/li&gt;
&lt;li&gt;In the DTS Package window from menu select item &lt;strong&gt;Package&lt;/strong&gt;-&gt;&lt;strong&gt;Save As...&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;In the &lt;strong&gt;Save DTS Package&lt;/strong&gt; dialog 
&lt;ul&gt;&lt;li&gt;in the &lt;strong&gt;Location&lt;/strong&gt; field select &lt;strong&gt;Structured Storage&lt;/li&gt; File&lt;/strong&gt;&lt;/li&gt; 
&lt;li&gt;in the &lt;strong&gt;File Name&lt;/strong&gt; field set destination path of saved file&lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;
&lt;li&gt;Press &lt;strong&gt;OK&lt;/strong&gt; button&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-4039287786711000";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
google_color_border = "DEE7EC";
google_color_bg = "FFFFFF";
google_color_link = "0066FF";
google_color_url = "0066FF";
google_color_text = "000000";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;</description><link>http://programmabilities.com/blog/2007/07/to-export-dts-package-do-following.html</link><author>noreply@blogger.com (programmabilities)</author></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-6711727.post-1322714306987608120</guid><pubDate>Wed, 20 Jun 2007 17:33:00 +0000</pubDate><atom:updated>2008-03-28T20:31:34.504-05:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>sql</category><title>Server 2000: Query Analyzer Tips &amp; Tricks</title><description>You probably know that SQL Server stores metadata about all of the objects in a database. The system tables contain a wealth of information about column names, data types, identity seeds, and so on. But did you know that you can get that information with a single keystroke via Query Analyzer? Highlight the object name in any SQL statement and press Alt+F1. Figure 1 shows the results for a SQL Server table. If you don't have anything highlighted, Alt+F1 will give you information about the database itself. For an equally neat trick, highlight a SQL keyword and press Shift+F1; you'll go straight to the Books Online page that describes that keyword.&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-4039287786711000";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
google_color_border = "DEE7EC";
google_color_bg = "FFFFFF";
google_color_link = "0066FF";
google_color_url = "0066FF";
google_color_text = "000000";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;</description><link>http://programmabilities.com/blog/2007/06/query-analyzer-tips-and-tricks.html</link><author>noreply@blogger.com (programmabilities)</author></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-6711727.post-5867481239642449411</guid><pubDate>Tue, 19 Jun 2007 14:20:00 +0000</pubDate><atom:updated>2007-06-19T19:56:57.438-05:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>asp</category><title>Getting .dll into Registry</title><description>&lt;ol style="list-style-type:arabic;"&gt;
&lt;li&gt;Download the file (MSRDO20.zip) to your desktop
&lt;/li&gt;
&lt;li&gt;Unzip the content of the file (a file called MSRDO20.DLL) to your desktop
&lt;/li&gt;
&lt;li&gt;Right now you should have a new file called MSRDO20.DLL that resides on your desktop
&lt;/li&gt;
&lt;li&gt;Copy this file to your Windows System Folder; this folder is usually found inside your 'C:\Windows' folder. It is called 'C:\Windows\System' or 'System32'...
&lt;/li&gt;
&lt;li&gt;Go to 'Start Menu' and choose 'Run'
&lt;/li&gt;
&lt;li&gt;A new window titled 'Run' will open; type the line 'regsvr32.exe msrdo20.dll' and hit 'Enter'.
&lt;/li&gt;
&lt;li&gt;A message will show up stating that the registration was successful.
&lt;/li&gt;
&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-4039287786711000";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
google_color_border = "DEE7EC";
google_color_bg = "FFFFFF";
google_color_link = "0066FF";
google_color_url = "0066FF";
google_color_text = "000000";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;</description><link>http://programmabilities.com/blog/2007/06/getting-dll-into-registry.html</link><author>noreply@blogger.com (programmabilities)</author></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-6711727.post-4843600695929756236</guid><pubDate>Sat, 09 Jun 2007 04:12:00 +0000</pubDate><atom:updated>2007-08-28T12:59:40.185-05:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>asp</category><title>Visual Studio Short-cuts</title><description>&lt;p&gt;Most of the time, you will Step Into or Step Over commands in your stored procedures. The commands below apply to a single T-SQL line:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Step Into&lt;/b&gt; (F11): Use to single step through your code. (Move the yellow arrow down one statement.)&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Step Over&lt;/b&gt; (F10): Useful if you have lines of code that perhaps modify data or call other procedures that you don't care about while debugging. For example, you may want to skip code that performs auditing.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Step Out&lt;/b&gt; (SHIFT+F11): Execute the rest of the stored procedure without pause.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Run to Cursor&lt;/b&gt; (CTRL+F10): Position the cursor to a point in your code and then hit CTRL-F10 to execute all code up to that point.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Continue or Start Debug or Run&lt;/b&gt; (F5): Start Debug. Or resumes execution until completion or until the next breakpoint.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Toggle Bookmark&lt;/b&gt; (CTRL+K)&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Help&lt;/b&gt; (F1)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
When you provide a summary of the class using XML comments, your class displays documentation about itself in appropriate places within Visual Studio, such as in the List Members box. Open the List Members box by selecting Edit | Intellisense | List Members from the main menu bar or by clicking the Display an Object Member List icon on the Text Editor toolbar.
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-4039287786711000";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
google_color_border = "DEE7EC";
google_color_bg = "FFFFFF";
google_color_link = "0066FF";
google_color_url = "0066FF";
google_color_text = "000000";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;</description><link>http://programmabilities.com/blog/2007/06/visual-studio-short-cuts.html</link><author>noreply@blogger.com (programmabilities)</author></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-6711727.post-5531618303065398594</guid><pubDate>Fri, 18 May 2007 02:53:00 +0000</pubDate><atom:updated>2007-09-03T13:43:46.879-05:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>sql</category><title>SQL: Bulk import</title><description>&lt;p&gt;Bulk import (save file.txt as csv): &lt;code&gt;LOAD DATA INFILE 'file.txt' INTO TABLE 'tblFoo' (col1, col2, col3) &lt;/code&gt;
&lt;/p&gt;
&lt;p&gt;
or
&lt;/br&gt;
&lt;code&gt;BULK LOAD IMPORT ('c:\file.txt') INTO TABLE 'tblFoo' (col1, col2, col3)&lt;/code&gt;
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-4039287786711000";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
google_color_border = "DEE7EC";
google_color_bg = "FFFFFF";
google_color_link = "0066FF";
google_color_url = "0066FF";
google_color_text = "000000";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;</description><link>http://programmabilities.com/blog/2007/05/sql-bulk-import_17.html</link><author>noreply@blogger.com (programmabilities)</author></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-6711727.post-5194522058005900986</guid><pubDate>Thu, 10 May 2007 23:13:00 +0000</pubDate><atom:updated>2007-07-18T10:22:40.181-05:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>sql</category><title>SQL Server 2000: make table backup with DTS</title><description>&lt;ul&gt;
&lt;li&gt;Right-click the table
&lt;ul&gt;&lt;li&gt;choose &lt;strong&gt;Export Data&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Choose a destination
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Server:&lt;/strong&gt; "nwdsql" and &lt;strong&gt;Database:&lt;/strong&gt; NELausData&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;radiobutton select="true"&gt;&lt;strong&gt;copy table(s)&lt;/strong&gt;&lt;/radiobutton&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;checkbox select="true"&gt;UserXRef"_bkup" (Destination)&lt;/checkbox&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Done, then refresh explorer to view.
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-4039287786711000";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
google_color_border = "DEE7EC";
google_color_bg = "FFFFFF";
google_color_link = "0066FF";
google_color_url = "0066FF";
google_color_text = "000000";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;</description><link>http://programmabilities.com/blog/2007/05/sql-server-make-table-backup.html</link><author>noreply@blogger.com (programmabilities)</author></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-6711727.post-47978546315981283</guid><pubDate>Wed, 29 Nov 2006 02:47:00 +0000</pubDate><atom:updated>2006-12-02T11:59:13.343-06:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>javascript</category><category domain='http://www.blogger.com/atom/ns#'>asp</category><title>ASP confirm</title><description>&lt;pre&gt;&lt;code&gt; gt-a-s-p:button id="ConfirmOnClick" runat="server" onclientclick="return
confirm('You\'re sure you want to do this?');" text="Launch Airstrike"&gt; gt/ a-s-p:button&gt; &lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-4039287786711000";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
google_color_border = "DEE7EC";
google_color_bg = "FFFFFF";
google_color_link = "0066FF";
google_color_url = "0066FF";
google_color_text = "000000";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;</description><link>http://programmabilities.com/blog/2006/11/asp-confirm.html</link><author>noreply@blogger.com (programmabilities)</author></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-6711727.post-5223514259872014918</guid><pubDate>Sun, 26 Nov 2006 00:40:00 +0000</pubDate><atom:updated>2006-11-28T20:53:18.681-06:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>asp</category><title>Install Google Search API Into Visual Studio</title><description>&lt;ul&gt;
 &lt;li&gt;Get the Google API and unzip. Import &lt;span style="font-family:courier new;"&gt;GoogleSearch.wsdl&lt;/span&gt; to the Project root.
 &lt;/li&gt;
 &lt;li&gt;Right-click on the Project root.
  &lt;ul&gt;
   &lt;li&gt;Add Web Reference
    &lt;ul&gt;
     &lt;li&gt;
Then type in the URL: &lt;span style="font-family:courier new;"&gt;http://localhost:1574/projectname/GoogleSearch.wsdl&lt;/span&gt; or &lt;span style="font-family:courier new;"&gt;http://foo.com/GoogleSearch.wsdl&lt;/span&gt;
     &lt;/li&gt;
    &lt;/ul&gt;
   &lt;/li&gt;
  &lt;/ul&gt;
 &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Then you should see an &lt;span style="font-family:courier new;"&gt;App_WebReferences&lt;/span&gt; folder in your Project. And then a folder in that called &lt;span style="font-family:courier new;"&gt;localhost&lt;/span&gt;. And then files &lt;span style="font-family:courier new;"&gt;GoogleSearch.discomap&lt;/span&gt; and &lt;span style="font-family:courier new;"&gt;GoogleSearch.wsdl&lt;/span&gt; in that.
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-4039287786711000";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
google_color_border = "DEE7EC";
google_color_bg = "FFFFFF";
google_color_link = "0066FF";
google_color_url = "0066FF";
google_color_text = "000000";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;</description><link>http://programmabilities.com/blog/2006/11/install-google-search-api-into-visual.html</link><author>noreply@blogger.com (programmabilities)</author></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-6711727.post-6310002074514410049</guid><pubDate>Sun, 26 Nov 2006 00:25:00 +0000</pubDate><atom:updated>2007-05-17T21:50:02.914-05:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>sql</category><category domain='http://www.blogger.com/atom/ns#'>programmabilities</category><category domain='http://www.blogger.com/atom/ns#'>asp</category><title>Test SQL Injection Attack on ASP</title><description>Username: &lt;span style="font-family:arial;"&gt;foo&lt;/span&gt;&lt;br/&gt;
Password: &lt;span style="font-family:arial;"&gt;abc' OR 'x' = 'x&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-4039287786711000";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
google_color_border = "DEE7EC";
google_color_bg = "FFFFFF";
google_color_link = "0066FF";
google_color_url = "0066FF";
google_color_text = "000000";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;</description><link>http://programmabilities.com/blog/2006/11/test-sql-injection-attack-on-asp.html</link><author>noreply@blogger.com (programmabilities)</author></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-6711727.post-358608969197779559</guid><pubDate>Sun, 19 Nov 2006 02:56:00 +0000</pubDate><atom:updated>2006-11-19T15:44:28.331-06:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>vb</category><category domain='http://www.blogger.com/atom/ns#'>asp</category><title>Load a Control into Visual Studio</title><description>&lt;ul&gt;&lt;li&gt;Right-click on toolbar and "Choose Items"&lt;/li&gt;&lt;li&gt;Then browse and go to your /Controls/ folder&lt;/li&gt;&lt;li&gt;Then click on it and open&lt;/li&gt;&lt;li&gt;Then click "OK"&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Then it will be on your toolbar and there will be a Reference to it in your /Bin/&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-4039287786711000";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
google_color_border = "DEE7EC";
google_color_bg = "FFFFFF";
google_color_link = "0066FF";
google_color_url = "0066FF";
google_color_text = "000000";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;</description><link>http://programmabilities.com/blog/2006/11/load-control-into-visual-studio.html</link><author>noreply@blogger.com (programmabilities)</author></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-6711727.post-116215561860073188</guid><pubDate>Sun, 29 Oct 2006 20:54:00 +0000</pubDate><atom:updated>2007-10-21T00:44:45.285-05:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>asp</category><title>ViewState("UrlReferrer")</title><description>&lt;pre&gt;&lt;code&gt;Sub Page_Load()
    If Page.IsPostBack = False Then
        ' Store URL Referrer to return to home page.
        ViewState("UrlReferrer") = Me.Request.UrlReferrer.ToString()
    End If
End Sub

Sub CancelBtn_Click()
    ' Redirect back to the home page.
    Me.Response.Redirect(CType(ViewState("UrlReferrer"), String))
End Sub&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-4039287786711000";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
google_color_border = "DEE7EC";
google_color_bg = "FFFFFF";
google_color_link = "0066FF";
google_color_url = "0066FF";
google_color_text = "000000";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;</description><link>http://programmabilities.com/blog/2006/10/viewstateurlreferrer.html</link><author>noreply@blogger.com (programmabilities)</author></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-6711727.post-115644941199333578</guid><pubDate>Thu, 24 Aug 2006 19:56:00 +0000</pubDate><atom:updated>2006-11-19T15:45:21.216-06:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>vb</category><category domain='http://www.blogger.com/atom/ns#'>asp</category><title>Visual Basic: using Controls collection</title><description>&lt;pre&gt;&lt;code&gt;' Clears textbox controls' content on the form using Controls collection.
Dim intX As Integer
Do While intX &lt; text = "" intx =" intX"&gt;&lt;/pre&gt;&lt;/code&gt;

&lt;code&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-4039287786711000";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
google_color_border = "DEE7EC";
google_color_bg = "FFFFFF";
google_color_link = "0066FF";
google_color_url = "0066FF";
google_color_text = "000000";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;</description><link>http://programmabilities.com/blog/2006/08/visual-basic-using-controls-collection.html</link><author>noreply@blogger.com (programmabilities)</author></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-6711727.post-115355605705041764</guid><pubDate>Sat, 22 Jul 2006 08:14:00 +0000</pubDate><atom:updated>2007-10-21T00:41:23.174-05:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>javascript</category><title>PHP: Removing www</title><description>For some reason Google has a different PageRank for &lt;tt&gt;programmabilities.com&lt;/tt&gt; and &lt;tt&gt;www.programmabilities.com&lt;/tt&gt;.
No big deal really, but it bothered me a bit. So I added this rule to &lt;tt&gt;.htaccess&lt;/tt&gt; to fix it:
&lt;pre&gt;&lt;code&gt;RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.programmabilities.com [NC]
RewriteRule ^(.*)$ http://programmabilities.com/$1 [R=301,L]
&lt;/code&gt;&lt;/pre&gt;
This way I got rid of the &lt;tt&gt;www&lt;/tt&gt; part once and for all, which I also find nicer. I used a &lt;tt&gt;301&lt;/tt&gt; Permanent redirect hoping Google will understand that a search for &lt;tt&gt;link:http://programmabilities.com/blog/&lt;/tt&gt; and a search for &lt;tt&gt;link:http://www.programmabilities.com/blog/&lt;/tt&gt; should return the same results.&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-4039287786711000";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
google_color_border = "DEE7EC";
google_color_bg = "FFFFFF";
google_color_link = "0066FF";
google_color_url = "0066FF";
google_color_text = "000000";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;</description><link>http://programmabilities.com/blog/2006/07/removing-www.html</link><author>noreply@blogger.com (programmabilities)</author></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-6711727.post-113669351533716117</guid><pubDate>Sun, 08 Jan 2006 04:11:00 +0000</pubDate><atom:updated>2006-11-19T15:46:23.828-06:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>javascript</category><category domain='http://www.blogger.com/atom/ns#'>vb</category><category domain='http://www.blogger.com/atom/ns#'>asp</category><title>ASP .NET set focus to a control (javascript)</title><description>body onload="javascript:document.forms[0].txtFirst.focus();"


And here is a list of all the variables for a Javascript popup window:
&lt;a title="JS" href="http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/methods/open_0.asp"&gt;http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/methods/open_0.asp&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-4039287786711000";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
google_color_border = "DEE7EC";
google_color_bg = "FFFFFF";
google_color_link = "0066FF";
google_color_url = "0066FF";
google_color_text = "000000";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;</description><link>http://programmabilities.com/blog/2006/01/asp-net-set-focus-to-control.html</link><author>noreply@blogger.com (programmabilities)</author></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-6711727.post-113669341802490592</guid><pubDate>Sun, 08 Jan 2006 04:09:00 +0000</pubDate><atom:updated>2006-11-19T15:48:45.892-06:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>vb</category><title>VB: Regular Expressions</title><description>&lt;code&gt;Regex.IsMatch("subject", "regex")&lt;/code&gt; ' Checks if the regular expression matches the subject string.&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-4039287786711000";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
google_color_border = "DEE7EC";
google_color_bg = "FFFFFF";
google_color_link = "0066FF";
google_color_url = "0066FF";
google_color_text = "000000";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;/div&gt;</description><link>http://programmabilities.com/blog/2006/01/vb-regular-expressions.html</link><author>noreply@blogger.com (programmabilities)</author></item></channel></rss>