You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
380 B
11 lines
380 B
1 year ago
|
UPDATE A
|
||
|
SET A.FDatabase = B.FDatabase
|
||
|
FROM TClient AS A,
|
||
|
(
|
||
|
SELECT FClientId,SUBSTRING(String,0,CHARINDEX(';',String)) AS FDatabase
|
||
|
FROM
|
||
|
(
|
||
|
SELECT FClientId,String = SUBSTRING(FConnectionString, CHARINDEX('Initial Catalog',FConnectionString) + LEN('Initial Catalog')+1,LEN(FConnectionString))
|
||
|
FROM TClient WHERE FServerId = 106
|
||
|
)AS T) AS B
|
||
|
WHERE A.FClientId = B.FClientId
|