📈 "to know how many years ... to double ... investment with a compounded rate of 5%, divide 72 by the rate. ... ex, it would take 14.4 years. (72÷5%=14.4years)."⚡: AMP18120+WFC3121=21241. ÷12=1770. [& minus: ADR14×4qurtr=ADR56]

20800÷ by 2080 hrs in a yr on an 8-hr full-time job 5 days a wk = $10 per hr. (gross & net)

A limited liability company must obtain what is known as an Employer Identification Number (EIN), also called a Fed. Tax ID number.brightjourney.com/q/help-demystifying-partnership-pass-taxation--"You don't need a federaltaxID for your LLC or your soleproprietorship: both are reported under your SSN. If you got EIN for a bank account - IRS doesn't really care, you shouldn't have done any tax reporting with it (unless you have employees). Subchapter S is for corporations or LLC's taxed as corporations, not for soleproprietorships or disregarded entities."

2013-01-13

"There was a theory, increasingly well supported, that eating is what killed you. They found that rats on extremely restricted diets, rats who ate very few calories, lived impressively long. They saw the same results with other animals, up to and including chimpanzees. They suspected, but could not prove, the same was true of humans. Every little bite of food was another step towards death."

VB: using Controls collection

ViewState("UrlReferrer")

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

2008-07-03

This searches all the Stored Procedures in 1 SQL Server database for the said string. I tested it in Query Analyzer and it found all the Stored Procedures that had occurrences of my "lq_Campaign" in 1 database:

SELECT ROUTINE_NAME, ROUTINE_DEFINITION
FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_DEFINITION LIKE '%lq_Campaign%'
AND ROUTINE_TYPE='PROCEDURE'

Here is another way

Below query you can searcg any table, stored procedure or views what ever has that expression as a column or object name.

SELECT * FROM SYSOBJECTS WHERE ID IN (SELECT ID FROM SYSCOMMENTS WHERE TEXT LIKE ‘%PRODUC%’)

The query produced all the object names--where ever it finds expression like ‘PRODUC‘.

2008-03-07

' 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 <> 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 <> 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 " ' 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 " ' "Generated automatically for AWARE "
.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

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.

' 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

--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%'

The INNER JOIN returns all rows from both tables where there is a match. If there are rows in first table that do not have matches in second table, those rows will not be listed.

The LEFT JOIN returns all the rows from the first table, even if there are no matches in the second table. If there are rows in first table that do not have matches in second table, those rows also will be listed.

The RIGHT JOIN returns all the rows from the second table, even if there are no matches in the first table. If there had been any rows in second table that did not have matches in first table, those rows also would have been listed.

SQL Server is phasing out text, ntext, and image. There’s no way to know how long SQL Server will support the older data types. Upgrade legacy applications to varchar, nvarchar, and varbinary.

2007-11-22

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.

How to backup...

Open Enterprise Manager

Select source DB

Right click on the selected DB. Select All Tasks->Backup Database... from the popup menu.

Select File and filegroup and add destination file name in the Backup dialog.

Press OK

How to restore...

Open Enterprise Manager

Select Databases node

Right click on this node. Select All Tasks->Restore Database... from the popup menu.

Type database name in the Restore as database textbox

Select Restore From Device

Press Select Device

Add backup file name

Press OK

In the Options tab check file pathes where your database will be restored.

Press OK

Select File and filegroup and add destination file name in the Backup dialog.

2007-07-20

In VS at the Sever Explorer pane I right-click on my data connection that I added and select Modify Connection. Then in the Modify Connection dialog I clicked Advanced... and then in the Advanced Properties dialog I changed Pooling from True to False. Now it works.
Also, in the configuration file, the Enable SQL Server debugging must be checked. Also, I have to add cmd.CommandTimeout=1800 to the VB's sproc area else it will time-out while clicking thru the sproc in the debugger.

But, when not debugging, in order to get the app to run to completion without crashing with the error Error while executing 'a batch cmd' at line 0 , I have to uncheck Enable SQL Server debugging and set Pooling back to True. --Because not pooling the connections hurts performance.

2007-06-20

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.

2007-06-08

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:

Step Into (F11): Use to single step through your code. (Move the yellow arrow down one statement.)

Step Over (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.

Step Out (SHIFT+F11): Execute the rest of the stored procedure without pause.

Run to Cursor (CTRL+F10): Position the cursor to a point in your code and then hit CTRL-F10 to execute all code up to that point.

Continue or Start Debug or Run (F5): Start Debug. Or resumes execution until completion or until the next breakpoint.

Toggle Bookmark (CTRL+K)

Help (F1)

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.