One option is to see if you can get another ODBC driver.
When you do the reads are you getting these excess blanks even if the
selection gives just one record?
The question is where the blanks originate in the Database, in the
ODBC driver, in some temp storage or after the read in J.
When you read only one item you can quickly see if it is J or not and
J is the least likely place.
I would suspect the ODBC driver or some database setting.


2010/5/25 Cox, Ed <[email protected]>:
> I'm using the J ODBC driver to connect to SQL Server.  I'm finding that 
> queries that I run are returning unwanted trailing blanks in all fields.  For 
> example from a table field defined as nvarchar(50) I am getting lengths of 
> 100 returned, most of which are spaces as the end.  From temp tables I am 
> getting returned lengths of 1000 on data originally sourced from a table 
> field of nvarchar(500).  So there seems to be a 2 to 1 increase - perhaps due 
> to the Nvarchar field.  But the root issue is why am I getting this in the 
> first place?  It persists even if I use RTRIM() in the query.
>
> Is there some way to deal with this at the ODBC level instead of having to 
> having to trim it all after the results are returned (since performance would 
> tank on huge result sets)?
>
> Ed Cox
> Principal Data Analyst
> Office: (508)382-4943 / Cell Phone: (978)387-9352
> [email protected]<mailto:[email protected]>
> MedMined(tm)
>
>
>
> _________________________________________________
>
> This message is for the designated recipient only and may contain privileged, 
> proprietary
> or otherwise private information. If you have received it in error, please 
> notify the sender
> immediately and delete the original. Any other use of the email by you is 
> prohibited.
>
> Dansk - Deutsch - Espanol - Francais - Italiano - Japanese - Nederlands - 
> Norsk - Portuguese
> Svenska: www.cardinalhealth.com/legal/email
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>



-- 
Björn Helgason, Verkfræðingur
Fornustekkum II
781 Hornafirði,
t-póst: [email protected]
gsm: +3546985532
sími: +3544781286
http://groups.google.com/group/J-Programming


Tæknikunnátta höndlar hið flókna, sköpunargáfa er meistari einfaldleikans

góður kennari getur stigið á tær án þess að glansinn fari af skónum
          /|_      .-----------------------------------.
         ,'  .\  /  | Með léttri lund verður        |
     ,--'    _,'   | Dagurinn í dag                     |
    /       /       | Enn betri en gærdagurinn  |
   (   -.  |        `-----------------------------------'
   |     ) |         (\_ _/)
  (`-.  '--.)       (='.'=)   ♖♘♗♕♔♙
   `. )----'        (")_(") ☃☠
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to