I have a table that has a column called "Memo". There is data in all the rows that look kinda like:
blah blah 08-22-19 Transfer from blah blah blah
I am needing to pull out just the "08-22-19 Transfer from". Ideally I would like to pull the info in a temp table with 2 different columns one named "Date" to enter 08-22-2019 and the other "Note" to enter Transfer from. I am having a hard time figuring how to get this done.
The format of the date is always mm-dd-yy but the date can be different — it could be 08-22-19 or 07-29-19.
Basically if table.memo had a row entry that was
The day that I did this 08-05-19 - AUDIT TRANSFERRED FROM 073 TO 057 because I wanted to.
I would like to be able to pull and insert into a new table like....
newtable.Date = 08/22/2019
newtable.Note = AUDIT TRANSFERRED FROM 073 TO 057
What comes before the info I want to pull is all different and so is the following text. There is no pattern to the data before or after the text that I need to pull.
SUBSTRINGfunction to get part of string.w3schools.com/sql/func_sqlserver_substring.aspblah blahpart of the data is probably of variable length.