Click here to Skip to main content
16,004,969 members
Home / Discussions / Database
   

Database

 
QuestionUse sub reports in the header of a report in SSRS Pin
Pankaj Saha28-Jul-09 20:37
Pankaj Saha28-Jul-09 20:37 
AnswerRe: Use sub reports in the header of a report in SSRS Pin
leckey29-Jul-09 4:00
leckey29-Jul-09 4:00 
GeneralRe: Use sub reports in the header of a report in SSRS Pin
Pankaj Saha29-Jul-09 19:13
Pankaj Saha29-Jul-09 19:13 
Questiondbping error Pin
MWRivera28-Jul-09 7:51
MWRivera28-Jul-09 7:51 
QuestionMS SQL: how to truncate all tables without unlink the keys. Pin
Ersan Ercek28-Jul-09 6:21
Ersan Ercek28-Jul-09 6:21 
AnswerRe: MS SQL: how to truncate all tables without unlink the keys. Pin
leckey28-Jul-09 11:11
leckey28-Jul-09 11:11 
GeneralRe: MS SQL: how to truncate all tables without unlink the keys. Pin
Ersan Ercek28-Jul-09 21:39
Ersan Ercek28-Jul-09 21:39 
AnswerRe: MS SQL: how to truncate all tables without unlink the keys. Pin
Mycroft Holmes28-Jul-09 20:06
professionalMycroft Holmes28-Jul-09 20:06 
It can't be done simply, any table without an key can be truncated and use the following if there is a key

DELETE FROM TableName
DBCC CHECKIDENT (TableName, reseed, 1)



this will have the same effect as truncate. It will only work if there is no DATA based on the foriegn key, it will not violate the referential integrity of the data.

I have a script that will clean out a database but it is hard coded for each application. It truncates all the non key table and then walks the key structure of the database manually.

You could write a script/app that walked the FK structure of a database and created a hierarchy tree based on the keys (this is what code generators do)


Never underestimate the power of human stupidity
RAH

GeneralRe: MS SQL: how to truncate all tables without unlink the keys. Pin
Ersan Ercek28-Jul-09 21:41
Ersan Ercek28-Jul-09 21:41 
Questionunique contraint Pin
Ebube28-Jul-09 5:40
Ebube28-Jul-09 5:40 
AnswerRe: unique contraint Pin
Ebube28-Jul-09 5:51
Ebube28-Jul-09 5:51 
AnswerRe: unique contraint Pin
Baran M28-Jul-09 18:34
Baran M28-Jul-09 18:34 
QuestionUnion HELP!!!!! Pin
cdietschrun28-Jul-09 5:01
cdietschrun28-Jul-09 5:01 
AnswerRe: Union HELP!!!!! Pin
Vimalsoft(Pty) Ltd28-Jul-09 5:03
professionalVimalsoft(Pty) Ltd28-Jul-09 5:03 
AnswerRe: Union HELP!!!!! Pin
Eddy Vluggen28-Jul-09 5:29
professionalEddy Vluggen28-Jul-09 5:29 
GeneralRe: Union HELP!!!!! Pin
cdietschrun28-Jul-09 5:34
cdietschrun28-Jul-09 5:34 
GeneralRe: Union HELP!!!!! Pin
Eddy Vluggen28-Jul-09 6:03
professionalEddy Vluggen28-Jul-09 6:03 
AnswerRe: Union HELP!!!!! Pin
David Skelly28-Jul-09 5:51
David Skelly28-Jul-09 5:51 
GeneralRe: Union HELP!!!!! Pin
cdietschrun28-Jul-09 7:11
cdietschrun28-Jul-09 7:11 
GeneralRe: Union HELP!!!!! Pin
WoutL28-Jul-09 19:55
WoutL28-Jul-09 19:55 
GeneralRe: Union HELP!!!!! Pin
Tauseef A5-Aug-09 0:54
Tauseef A5-Aug-09 0:54 
QuestionStored procedure in postgresql ? [modified] Pin
adkalavadia27-Jul-09 22:05
adkalavadia27-Jul-09 22:05 
AnswerRe: Stored procedure in postgresql ? Pin
leckey28-Jul-09 4:18
leckey28-Jul-09 4:18 
AnswerRe: Stored procedure in postgresql ? Pin
valeranavin28-Jul-09 17:04
valeranavin28-Jul-09 17:04 
QuestionTransaction, RollBack, CommitTransaction Pin
Sanket.Patil27-Jul-09 21:26
Sanket.Patil27-Jul-09 21:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.