1

Topic: Script

Good afternoon!
I am completely not strong in sql. Help to write a script for change of one field in the table.
That that to me needs to be changed I deduced. And how now to change values field IDD?
SELECT [IDR]
,[IDC]
,[StartDateTime]
,[Leng]
,[RingType]
,[IDD]
,[FileName]
,[HasLost]
,[Importance]
,[AdminOnly]
,[IsArchived]
,[Note]
,[Ext]
,[CO]
,[COType]
,[Fax]
,[PhoneFrom]
,[PhoneTo]
,[DeviceID]
,[Line]
,[DLTHASH]
FROM [SpRecord]. [dbo]. [Records] where IDD=1002

2

Re: Script

alyam;
Approximately here so:

UPDATE [SpRecord]. [dbo]. [Records]
SET IDD =....
WHERE IDD=1002

I hope, field IDD is not table primary key

3

Re: Script

xenix;
Is primary key in other table

4

Re: Script

I did this script with one record.
Record in the table changed, but in the program now it is not displayed.
In what there can be a reason?

5

Re: Script

And is not present. All is normal. Thanks. The big

6

Re: Script

One more question.
How now to get rid of an unnecessary field 1002 of other table:
IDD Directory
1 E:\SPRecord\Trust
2 E:\SPRecord\Hot
3 E:\SPRecord\Child
1002 E:\SPRecord
2002 E:\SPRecord\auto
Whether it is possible to delete it from here?

7

Re: Script

alyam wrote:

one more question.
How now to get rid of an unnecessary field 1002 of other table:
IDD Directory
1 E:\SPRecord\Trust
2 E:\SPRecord\Hot
3 E:\SPRecord\Child
1002 E:\SPRecord
2002 E:\SPRecord\auto
Whether it is possible to delete it from here?

you here do not have field 1002.

8

Re: Script

delete _ where IDD = 1002
ps: Sergey Alekseevich, I is sober, and you?)