Re: Character Field Length Function for Binary Data
Posted in 1998
Billy wrote to me to ask what this "0xa73123" syntax is. I guess this is from a previous, other database life. What I meant by that was a field with a value of "a73123" (hex). How can I get an SQL function to return "3" as the length of this field (i.e. 3 bytes worth of real data)? Thanks. David -- David Samson, Senior Database Researcher dsamson@ndsisrael.com NDS Technologies Israel Ltd. +972 2-589-4529 PO Box 23012 Fax: +972 2-589-4578 Jerusalem, Israel Cellular: +972 51 287 481 David & Adina Samson <samsons@netmedia.net.il> wrote in article <3552917E.90189DDE@netmedia.net.il>... > Hi! > > Does anybody know of a function which returns the length actually > used in a character field when we store binary data? For example, if > I've got a field defined as "char(20)" with a value of "0xa73123", I > want to a function to return a value of 3. The basic "length" and > "char_length" return the defined size of the field (20). > > Thanks! > > David > > > David Samson, Senior Database Researcher dsamson@ndsisrael.com > NDS Technologies Israel Ltd. +972 2 589-4529 > PO Box 23012 Fax: +972 2 589-4578 > Jerusalem, Israel Cellular: +972 51 287 481 > > >