sql server - Condition text field character insert with SQL Update statement -
I have to conditionally update the fields in the SQL-server table in the field there are different letter types in the one-letter indicator , Which are all together in the field. Like "I" for insurance, "O" for other insured, "H" for health qualification, etc., but together in the field, nothing can be in the field, any letters, or all letters are included You can. Such as "IHO" or "HOI" or "O" or "OI" etc. A given letter should not appear more than once in the field, though.
This application is running on a unique ID running through a record-based set, and only updated to update this unique ID of the record, whether it is possible in a single SQL update statement: / P>
"If there is already 'I' in this area, then do not do anything; Otherwise, 'I' for the set of existing letters."
... and, If this is (of course), then what does this update statement look like?
I am away from a SQL expert (obviously), so please be gentle.
update something like
update MyTable SET status type = Position Type + 'I' UKIID = 5 and Chardix ('I', Statetype) = 0
Comments
Post a Comment