Recursive SQL query for parent child data
Posted in MSSQL on February 3rd, 2010 by phoenixdigitalPowerful scripts to retrieve parent child data in a few simple calls
http://www.vbforums.com/showthread.php?t=366078
Powerful scripts to retrieve parent child data in a few simple calls
http://www.vbforums.com/showthread.php?t=366078
These hints will allow you to create MSSQL scripts to performs updates to remote databases. The following examples utilise the loops and temporary tables with a more complex example at the end bringing them all together.
Read more »
When trying to restore a database from a backup or perform any operation that requires full access you may be warned there are still users connected. To remove these processes you will need to go to the activity monitor of SQL Server Management Studio.
Read more »
When inserting raw data into a Microsoft SQL database you may need to turn off the primary key check and any other constraints just so you can get your data into the system. The following commands will achieve this.
1 2 | SET IDENTITY_INSERT [TableName] ON; ALTER TABLE [TableName] NOCHECK CONSTRAINT all; |
To restore all checks back to the way they were
1 2 | SET IDENTITY_INSERT [TableName] OFF; ALTER TABLE [TableName] CHECK CONSTRAINT all; |