How can we help you today? How can we help you today?

Expression May Generate Data Too Long

Hi,

Trying to populate a data item with Last Name & Initial (($"NamesLast.txt") ([ABCDHNPRST]|[A-EGHN-T]|[A-Z]){1,2}) but my data type is limited to length 10 so I'm getting:
"RegEx Generator : Expression too long. Expression may generate strings too wide for column".

Can I wrap a SUBSTRING(1,10) around the above?

Thanks in advance
Phil Hadfield
0

Comments

2 comments

  • Kurt_M
    Hi Phil_H

    I'm afraid that the regex generator does not have the ability to use something like the SUBSTRING function. For more complicated data inserts, I would suggest looking into the python script, or even the SQL statement. 

    https://documentation.red-gate.com/sdg/using-generators/generic-generators

    Alternatively, is there a way you can increase the length above 10?
    Kurt_M
    0
  • Phil_H
    Thanks fore the response. Unfortunately we are limited with the data types as we are trying to generate data for a legacy DB that we do not control. I've changed my Regex now and all good
    Phil_H
    0

Add comment

Please sign in to leave a comment.