question

lindseyo avatar image
lindseyo asked

Is there a way to create a new column based on the condition of having a certain number of characters in another column?

Essentially, I have a table that has a column with either an 8 digit number or a 4 digit number. My goal is to created a new column that simply has an "8" or a "4" indicating the number of digits that are found in the other column. Is it possible to do this with a case statement?

columnscase-statementcharacters
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
ThomasRushton avatar image
ThomasRushton answered

Yes - use a computed column.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.