Home > database >  Postgresql to extract the key word of 100 characters
Postgresql to extract the key word of 100 characters

Time:09-30

There is a column of text information database, the key word for "MEDICATIONS ON ADMISSION:", how to extract the following 100 characters? (including digital characters, punctuation, letters)

CodePudding user response:

The write a custom function

CodePudding user response:

The teacher hello, excuse me, can you specifically talk about, thank you very much,

CodePudding user response:

Use regular expressions to match MEDICATIONS ON ADMISSION: behind all of the content, and then use the LEFT interception function LEFT, intercepting the LEFT 100 characters,

Select the left (the substring (' 43 i2o lfi32lksxk w34, c, : : le3, kf3e5ik; MEDICATIONS ON ADMISSION: lkfseoi, c, s, etdxlektyifec, etilc, rticrket ', '(? <=MEDICATIONS ON ADMISSION. :) * '), 15)
  • Related