search

Month: April 2015


Reset Identity Seed in Microsoft SQL

Posted by in Microsoft SQL

After you delete records from a table, if you want to set the Identity Seed back to zero: DBCC CHECKIDENT(‘msci3025_f14.dbo.msci3025_surveyData’, RESEED, 0)


Delete all rows from a Microsoft SQL table

Posted by in Microsoft SQL

To delete all rows from a table: DELETE FROM msci3025_f14.dbo.msci3025_surveyData


MS SQL script to create database and add data

Posted by in Microsoft SQL

This Microsoft SQL script was used to create a database table named colbert_stateFacts with fields stID, state_name, state_capital, state_code, state_bird and state_flower. The script then inserted records into the new table. CREATE TABLE [dbo].[colbert_stateFacts] ( [stID] [int] IDENTITY(1,1) NOT NULL, [state_name] [nvarchar](50) NOT NULL, [state_capital] [nvarchar](50) NOT NULL, [state_code] [nvarchar](2) NOT NULL, [state_bird] [nvarchar](50) NULL,…


Workbook_Open Event Handler

Posted by in Excel VBA

Open the ThisWorkbook code window: Private Sub Workbook_Open() wsInstructions.Activate End Sub


Add A New Worksheet Using Excel VBA

Posted by in Excel VBA

Add a new worksheet named “Mike”… Worksheets.Add.Name = “Mike” Add a new worksheet named “Mike” as the first worksheet, before all the other worksheet tabs… Worksheets.Add(Before:=Worksheets(1).Name = “Mike” Add a new worksheet named “Mike” as the last worksheet, after all the other worksheet tabs… Worksheets.Add(Before:=Worksheets(Worksheets.Count).Name = “Mike”


close
search

Hi, guest!

settings

menu