Click here to Skip to main content
15,899,634 members
Home / Discussions / Database
   

Database

 
GeneralBuild your own identity value Pin
David Mujica4-Aug-09 2:58
David Mujica4-Aug-09 2:58 
GeneralRe: Build your own identity value [modified] Pin
Roberto Mazzone4-Aug-09 22:48
Roberto Mazzone4-Aug-09 22:48 
GeneralRe: Build your own identity value Pin
David Mujica5-Aug-09 2:59
David Mujica5-Aug-09 2:59 
GeneralRe: Build your own identity value Pin
Roberto Mazzone5-Aug-09 22:11
Roberto Mazzone5-Aug-09 22:11 
AnswerRe: How to check for a never populated table on sql server 2005 Pin
Mike Ellison4-Aug-09 3:13
Mike Ellison4-Aug-09 3:13 
GeneralRe: How to check for a never populated table on sql server 2005 [modified] Pin
Roberto Mazzone4-Aug-09 22:51
Roberto Mazzone4-Aug-09 22:51 
GeneralRe: How to check for a never populated table on sql server 2005 Pin
Mike Ellison5-Aug-09 6:28
Mike Ellison5-Aug-09 6:28 
GeneralRe: How to check for a never populated table on sql server 2005 Pin
Roberto Mazzone5-Aug-09 22:08
Roberto Mazzone5-Aug-09 22:08 
Mike,
I have to preserve the referential integrity of this constraint.
alter table tA
add constraint tB_tA_FK1 foreign key (b_id)
	 references tB (b_id)

Situation before moving data from DB_SRC to DB_DST
on DB_SRC.tA
a_id b_id
1 100

on DB_SRC.tB
b_id
100

on DB_DST.tA
a_id b_id
1 200

on DB_DST.tB
b_id
200

when i insert data from DB_SRC.tB to DB_DST.tB. b_id became 201 and when i insert data from DB_SRC.tA to DB_DST.tA
DB_DST.tA.b_id have to became 201. To achieve this goal i used the IDENT_CURRENT for DB_DST.tB (200) plus ROW_NUMBER (the rank progressive, from 1 to n) as previously reported.

I solved adding an extracolumn DB_DST.tB.id_src, than

on DB_DST.tB
b_id id_src
200
201 100

in this way i have the right correspondence to do the work as explained in the previous post.

Anyway many thanks for your interest.
QuestionNDoc to SQL scripts? Pin
devvvy3-Aug-09 5:43
devvvy3-Aug-09 5:43 
AnswerRe: NDoc to SQL scripts? Pin
leckey3-Aug-09 8:51
leckey3-Aug-09 8:51 
GeneralRe: NDoc to SQL scripts? Pin
devvvy3-Aug-09 14:51
devvvy3-Aug-09 14:51 
QuestionStored Procedure Pl/SQL Pin
Civic063-Aug-09 4:35
Civic063-Aug-09 4:35 
AnswerRe: Stored Procedure Pl/SQL Pin
Vimalsoft(Pty) Ltd3-Aug-09 4:47
professionalVimalsoft(Pty) Ltd3-Aug-09 4:47 
GeneralRe: Stored Procedure Pl/SQL Pin
Civic063-Aug-09 4:59
Civic063-Aug-09 4:59 
GeneralRe: Stored Procedure Pl/SQL Pin
Vimalsoft(Pty) Ltd3-Aug-09 5:06
professionalVimalsoft(Pty) Ltd3-Aug-09 5:06 
GeneralRe: Stored Procedure Pl/SQL Pin
Civic063-Aug-09 5:33
Civic063-Aug-09 5:33 
AnswerRe: Stored Procedure Pl/SQL Pin
David Skelly3-Aug-09 6:09
David Skelly3-Aug-09 6:09 
QuestionError in Stored Procedure. Pin
Satish - Developer3-Aug-09 3:29
Satish - Developer3-Aug-09 3:29 
AnswerRe: Error in Stored Procedure. Pin
Vimalsoft(Pty) Ltd3-Aug-09 4:38
professionalVimalsoft(Pty) Ltd3-Aug-09 4:38 
Questiondesigning database tables to store data Pin
uglyeyes2-Aug-09 14:57
uglyeyes2-Aug-09 14:57 
AnswerRe: designing database tables to store data Pin
Henry Minute3-Aug-09 2:09
Henry Minute3-Aug-09 2:09 
QuestionAccessing the file of a T-SQL BACKUP call Pin
Uwe Keim2-Aug-09 5:52
sitebuilderUwe Keim2-Aug-09 5:52 
AnswerRe: Accessing the file of a T-SQL BACKUP call Pin
scottgp2-Aug-09 14:34
professionalscottgp2-Aug-09 14:34 
GeneralRe: Accessing the file of a T-SQL BACKUP call Pin
Uwe Keim2-Aug-09 19:14
sitebuilderUwe Keim2-Aug-09 19:14 
AnswerRe: Accessing the file of a T-SQL BACKUP call Pin
Vimalsoft(Pty) Ltd3-Aug-09 4:50
professionalVimalsoft(Pty) Ltd3-Aug-09 4:50 

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.