wht if i want not to del some rows?

see my ques is quite helpful to others also..

i hv my databse in sql 2000

i hv 3 tables

one is for clients

secnd for product

third for transaction

..now the prob is when i delete a client as an admin .the related entires in other table also gets deleted as its been given relationships..

so any way to safe tha data?

thank you all in advance

[410 byte] By [Jay_Vora_b4843e] at [2008-1-2]
# 1
You could first change the foreign key in the Product and Transaction tables to NULL, and then when you delete the Client there are no rows to be deleted.
ArnieRowland at 2007-9-13 > top of Msdn Tech,SQL Server,SQL Server Data Access...
# 2

thank you sir.. i did a trick ...

i made a flag column n set ac to if the corresponding category is avail ,not o\w..

thx for ur support.

i marked ur reply as ans.

Jay_Vora_b4843e at 2007-9-13 > top of Msdn Tech,SQL Server,SQL Server Data Access...
# 3

Arnie's trick shud hv worked..try that outta..

Sajankp at 2007-9-13 > top of Msdn Tech,SQL Server,SQL Server Data Access...
# 4

but admin is an educated person..he

she shud do acc to the security..

JohnDan at 2007-9-13 > top of Msdn Tech,SQL Server,SQL Server Data Access...

SQL Server

Site Classified