我ClientInformation
在表CurrentOrders
中有一个包含管道分隔字符串的列:
5275=7147|109=62F36|5075=BCRM|12221=PortwareALGO1
每个number=
都是一个 FIX 标记,我想将其命名为自己的列,并且需要能够在SELECT
语句和WHERE
子句中使用。
我破解了一些东西,可以让我识别我需要的行,但我不能使用 in SELECT
or WHERE
...
(LEFT (RIGHT(ClientInformation, ( LEN(ClientInformation) - (PATINDEX('%109=%',ClientInformation) + 3) )),
PATINDEX('%|%', RIGHT(ClientInformation, ( LEN(ClientInformation) - (PATINDEX('%109=%',ClientInformation) + 2) ))) -2))as AccountID
我假设我需要在我的表格中将每一个分解number=
成它自己的临时列,但我很难找到我可以遵循的解释。
因此,我希望这些值中的每一个如下:
5275=7147|109=62F36|5075=BCRM|12221=PortwareALGO1
5275= as ClientBook
109= as AccountID
5075= as Broker ID
12221= as RouteTrace