Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

pattern matching in sql server 2019 on encrypted text

BEFORE ENCRYPTION

select * from messageencryption; output id msgcode msg 1 AA56B this is a text message 2 AA56C this is a text123 message 3 AA56D EXTENDED BOOTCAMP 4 AA56E extended bootcamp 5 AA56J advance happy new year 6 AA56K oneteam 7 AA56L cricket team consists of 11 players 8 AA56M indian cricket team

select * from messageencryption where msg like '%team%'; output id msgcode msg 6 AA56K onesmallteam 7 AA56L cricket team consists of 11 players 8 AA56M indian cricket team

AFTER ENCRYPTION select * from messageencryption where msg like '%team%'; output Msg 402, Level 16, State 2, Line 23 The data types varchar(8000) encrypted with (encryption_type = 'RANDOMIZED', encryption_algorithm_name = 'AEAD_AES_256_CBC_HMAC_SHA_256', column_encryption_key_name = 'cek', column_encryption_key_database_name = 'encrypt') collation_name = 'Latin1_General_BIN2' and varchar are incompatible in the like operator.

why i'm not able to get this pattern matching in sql server 2019.

Comments