Menu Item button display format

UPDATE mi SET [Header]= REPLACE(mi.[Name],'\r','<br/>') + '<br/>' + convert(varchar(50),p.[Price])
FROM [ScreenMenuItems] mi
...

I seems unlikely, but the error is saying the value being pushed into [ScreenMenuItems].[Header] is too large for the column. It might be that the Menu Item Name (mi.[Name]) is borderline too long.

image

That is probably it considering mine is set to 10 lol

Edit: Wonder why mine is so low and yours is at 4000?

Most Tables in the DB that were originally defined as nvarchar(4000) were changed to nvarchar(max) quite a while ago. Looks like the table [ScreenMenuItems] was missed.

You can attempt to ALTER the table, but that is just a hack on top of a hack! :stuck_out_tongue_winking_eye:

Maybe you ran the “Auto-size columns” maintenance task?

1 Like

Mine all seem to be different some are 10 some are 50 etc.

EDIT: I just ran the task to maximize them.

EDIT 2: It works now! thanks Q