Trebizond
Thoughts on Life, History, Classics, Computers, Games, and Debian Linux
Thursday, June 28, 2007
Thursday, June 14, 2007
More SQL fun -- a copy statement
Here's a simple copy / paste T-SQL statement. This uses the Northwind Database, but you could adapt it for your needs -- and just remember, you can't do the select *, because of the identify/auto-numbering on CategoryID
insert into categories
select CategoryName, Description, Picture from categories where categoryid = '1'
Helpful T-SQL Hints!
Found an excellent guide for some of the quirkier moments when you can't get at the Enterprise Manager -- this is one, just to list the tables in a SQL database!
Select Table_name as "Table name"
From Information_schema.Tables
Where Table_type = 'BASE TABLE' and Objectproperty (Object_id(Table_name), 'IsMsShipped') = 0
I myself might change the Objectproperty we're looking for (perhaps erroneously!)
Select Table_name as "Table name"
From Information_schema.Tables
Where Table_type = 'BASE TABLE' and Objectproperty (Object_id(Table_name), 'IsUserTable') = 1
Tuesday, June 12, 2007
Oh Wait -- How Unhelpful!
Well that would have been helpful!
You can actually now add Powershell as a feature, if you go to the server manager, it's there under "Windows Powershell" -- how helpful!
