I'd also need a field to say what type of space is at the end (new line, tab, etc.) and if there are more than one type it's going to get unnecessarily complicated. I was hoping there was a switch for the field or table to force it to store exactly what is sent in without trimming.
Thanks for the help On Mon, Jul 15, 2013 at 8:10 AM, Raymond Thompson <[email protected]> wrote: > > Or you could store the expression in one field and the length in another > field. Using a length in another field would allow you to pad a varchar() > with the necessary number of spaces. > > Ray Thompson > Tau Beta Pi Headquarters > 865-546-4578 > www.tbp.org > Hardware eventually fails. Software eventually works. > Well, software does not always eventually work. > > > -----Original Message----- > From: Michael Dinowitz [mailto:[email protected]] > Sent: Monday, July 15, 2013 8:05 AM > To: sql > Subject: Re: retaining trailing space characters in sql data > > > That would be super inefficient as each regex has a different length. For > example, one regex may be '> ' > which is a closing bracket followed by a new line. No other spaces after > the > new line. > > I may have to store each regex surrounded by a delimiter like the example > above in order to get what I want. > > > On Mon, Jul 15, 2013 at 7:45 AM, Raymond Thompson <[email protected]> wrote: > > > > > The field in SQL is probably defined as VARCHAR(?). Change that to > CHAR(?). > > That will always have a field of the exact size with SQL padding with > > spaces on the right. > > > > Ray Thompson > > Tau Beta Pi Headquarters > > 865-546-4578 > > www.tbp.org > > Hardware eventually fails. Software eventually works. > > Well, software does not always eventually work. > > > > -----Original Message----- > > From: Michael Dinowitz [mailto:[email protected]] > > Sent: Sunday, July 14, 2013 8:51 PM > > To: sql > > Subject: retaining trailing space characters in sql data > > > > > > I have a database of regular expressions and I've had a problem when > > trying to save expressions that contain trailing space characters > > (such as a new line). Is there a switch in MSSQL that I can set to > > keep the space characters? > > > > Thanks > > > > > > > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3512 Subscription: http://www.houseoffusion.com/groups/sql/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/sql/unsubscribe.cfm
