Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
値フィールドの数桁を無視して列を更新する方法。 たとえばBKIH-10A、列に値がありますSECTION-ID。 そのフィールドだけが欲しいのです10Aが、どうすればBKIH-そのフィールドから削除できますか。
BKIH-10A
SECTION-ID
10A
BKIH-
これを試して :-
Declare @SECTION_ID varchar(20) Set @SECTION_ID='BKIH-10A' Select substring(@SECTION_ID,charindex('-',@SECTION_ID)+1,len(@SECTION_ID)) Result 10A
シンボルのキャラクターが欲しいと思います -
-
また
部分文字列式の開始文字列の位置をハードコーディングできる場合
substring(SECTION_ID,6,len(SECTION_ID)