Skip to content
sqlkitty

sqlkitty

sql for everyone

Menu
  • Home
  • About
  • Auditing
  • Code
  • Presentations
  • Publications
  • Contact

Category: sql sever syntax

create table from view

  • Posted onFebruary 1, 2011
  • sql sever syntax

select * into TableName from ViewName

Continue Reading

always always always use BEGIN TRANSACTION before updating database with query

  • Posted onJanuary 11, 2011
  • sql sever syntax

so that you can rollback if you don’t get the expected results using rollback transaction if you don’t use BEGIN TRANSACTION, then you will have to revert the database to a backup to restore the data if you get the expected results from the transaction,…

Continue Reading

copy table from database to another

  • Posted onJanuary 10, 2011
  • sql server administration

SELECT * INTO AdventureWorks.dbo.CustomersTemp FROM Northwind.dbo.Customers Just remember that using this query will only transfer the schema and data. It does not transfer the indexes, foreign keys, statistics etc.

Continue Reading

get current version of sql server running

  • Posted onDecember 22, 2010
  • sql server administration

select @@Version SELECT SERVERPROPERTY(‘productversion’), SERVERPROPERTY (‘productlevel’), SERVERPROPERTY (‘edition’)

Continue Reading

to get sizes of databases emailed to self

  • Posted onDecember 22, 2010
  • sql server administration

use msdb exec sp_send_dbmail @profile_name = ‘ss job notifications’, @recipients = ‘put email address here’, @subject = ‘live database sizes’, @query = ‘use databasename select db_name(dbid),str(convert(dec(15),sum(size))* 8192/ 1048576,10,2)+ N” MB” as Size from sys.sysaltfiles group by dbid order by 2 desc’, @attach_query_result_as_file = 1;

Continue Reading

escape single quotes in SQL queries

  • Posted onDecember 22, 2010
  • sql sever syntax

put two single quotes where there was one ie – ‘string ‘inside’ of something’ then do this – ‘string ”inside” of something’  — 2 single quotes not a double quote

Continue Reading

excel CRUD

  • Posted onDecember 16, 2010
  • sql sever syntax

steps to use excel for CRUD

Continue Reading

NULL values set to ‘ ‘

  • Posted onNovember 24, 2010
  • sql sever syntax

ISNULL(fieldname, ‘ ‘) as name

Continue Reading

statistics stored procedure

  • Posted onNovember 24, 2010
  • sql server administration

sp_helpstats ‘tablename’, ‘ALL’

Continue Reading

ecm stored procedure updates needed on database

  • Posted onNovember 16, 2010
  • sql sever syntax

exec sp_dboption dbname, ‘select into/bulkcopy’, ‘TRUE’ exec SP_dboption dbname,’trunc. log on chkpt.’,’true’

Continue Reading

Posts pagination

Previous Page Page 1 … Page 6 Page 7 Page 8 Next Page

Newletter Signup

Loading

Recent posts

  • Terraform Commands
  • Capturing errors and auditing in Azure SQL DB
  • T-SQL Tuesday #186 Invitation – Managing Agent Jobs
  • Query multiple Azure SQL Databases
  • Azure Vulnerability Assessments

Categories

  • audit (3)
  • azure (47)
  • containerization (14)
  • datawarehousing (4)
  • dba (54)
  • editorial (8)
  • excel and others (3)
  • IT Certifications (1)
    • network+ (1)
  • linux (2)
  • network administration (15)
  • newjob (7)
  • other (8)
  • performance (1)
  • postgresql (16)
  • powershell (1)
  • security (3)
  • sql server (23)
  • sql server administration (124)
    • jobs (4)
  • sql sever syntax (78)
  • terraform (6)
  • tsql2sday (2)
  • web dev (6)
  • zen (2)

Archives

  • August 2025 (1)
  • July 2025 (1)
  • June 2025 (1)
  • May 2025 (2)
  • April 2025 (2)
  • March 2025 (3)
  • February 2025 (3)
  • January 2025 (4)
  • November 2024 (3)
  • October 2024 (1)
  • September 2024 (2)
  • August 2024 (1)
  • July 2024 (5)
  • June 2024 (4)
  • May 2024 (4)
  • April 2024 (3)
  • March 2024 (2)
  • February 2024 (1)
  • January 2024 (5)
  • December 2023 (2)
  • November 2023 (5)
  • October 2023 (1)
  • September 2023 (1)
  • August 2023 (2)
  • July 2023 (2)
  • June 2023 (3)
  • May 2023 (4)
  • April 2023 (3)
  • March 2023 (5)
  • January 2023 (1)
  • October 2022 (2)
  • April 2022 (1)
  • December 2021 (1)
  • May 2021 (1)
  • April 2021 (2)
  • February 2021 (7)
  • January 2021 (4)
  • December 2020 (2)
  • November 2020 (1)
  • January 2020 (2)
  • December 2019 (3)
  • August 2019 (2)
  • February 2019 (1)
  • June 2018 (1)
  • January 2018 (1)
  • September 2017 (1)
  • May 2016 (4)
  • January 2016 (2)
  • December 2015 (2)
  • August 2015 (2)
  • July 2015 (4)
  • June 2015 (3)
  • May 2015 (9)
  • April 2015 (4)
  • November 2014 (7)
  • October 2014 (19)
  • September 2014 (3)
  • July 2014 (2)
  • July 2013 (1)
  • December 2012 (1)
  • October 2012 (1)
  • December 2011 (6)
  • October 2011 (6)
  • September 2011 (5)
  • July 2011 (1)
  • June 2011 (1)
  • May 2011 (2)
  • April 2011 (1)
  • February 2011 (15)
  • January 2011 (19)
  • December 2010 (14)
  • November 2010 (16)
  • October 2010 (3)

RSS SQL Kitty RSS

  • Terraform Commands
  • Capturing errors and auditing in Azure SQL DB
  • T-SQL Tuesday #186 Invitation – Managing Agent Jobs
  • Query multiple Azure SQL Databases
  • Azure Vulnerability Assessments
© Copyright 2026 – sqlkitty
Chip Life Theme by TutorialChip ⋅ Powered by WordPress