init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
|
@ -0,0 +1,20 @@
|
|||
DECLARE @sql nvarchar(max) = N''
|
||||
SELECT @sql += N'
|
||||
DELETE FROM ' + rt.name + N'
|
||||
WHERE '+ rc.name +' = 7667'
|
||||
FROM sys.foreign_keys fk
|
||||
INNER JOIN sys.foreign_key_columns fkc ON fkc.constraint_object_id = fk.object_id
|
||||
INNER JOIN sys.tables rt ON fkc.parent_object_id = rt.object_id
|
||||
INNER JOIN sys.columns rc ON rc.column_id = fkc.parent_column_id AND rc.object_id = rt.object_id
|
||||
INNER JOIN sys.columns c ON c.column_id = fkc.referenced_column_id AND c.object_id = fkc.referenced_object_id
|
||||
INNER JOIN sys.tables fkt ON fkt.object_id = fkc.referenced_object_id AND fkt.name = 'T_AMITagozat'
|
||||
INNER JOIN sys.columns ctanevId ON ctanevId.object_id = rt.object_id AND ctanevId.name IN (N'C_ALTANEVID',N'C_TANEVID')
|
||||
WHERE rc.name NOT IN (N'C_ALINTEZMENYID', N'C_INTEZMENYID',N'C_ALTANEVID',N'C_TANEVID', 'ID')
|
||||
SELECT @sql
|
||||
EXEC sp_executesql @sql
|
||||
|
||||
DELETE FROM T_AMITAGOZAT
|
||||
WHERE ID = 7667
|
||||
|
||||
DELETE FROM T_DICTIONARYITEMBASE
|
||||
WHERE ID = 7667 AND C_TYPE = 'AMITagozat'
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue