mkus
mkus

Reputation: 3487

How can I get a specific range of bytes in the varbinary data?

How can I get a specific range of bytes in the varbinary data?

For example length of varbinary data is 128 and I want to get only 15-19 bytes.

Upvotes: 9

Views: 7515

Answers (1)

Andriy M
Andriy M

Reputation: 77677

SELECT SUBSTRING(VarbinaryColumn, 15, 5)

15 being the first position and 5 the length.

More information:

Upvotes: 15

Related Questions