-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Strange trim
PostPosted: Tue Sep 09, 2003 3:39 am 
Newbie

Joined: Tue Sep 09, 2003 3:37 am
Posts: 4
Hi,
I have a varchar field on a sqlserver 2000 db, using ms jdbc drivers.

This field contains a blank at the beginning of the value and this char gets trimmed.
I'm trying to understand:
- is this correct?
- who does this (hibernate or the driver)?
- is there any workaround?

Thanks for any suggestion.

Lorenzo


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 09, 2003 4:02 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
well, its certainly not _hibernate_


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 09, 2003 12:58 pm 
Pro
Pro

Joined: Tue Aug 26, 2003 1:24 pm
Posts: 213
Location: Richardson, TX
Quote:
a blank at the beginning of the value and this char gets trimmed


Back in '96 when I supported Access and SQL Server (for the evil empire itself, I'm sorry to say) both DB engines did this.

Anyway, here's a Microsoft KB article about trailing spaces: http://support.microsoft.com/default.aspx?scid=kb;en-us;231830

I'm not sure if the same rules apply to leading spaces.

Keep searching the kb and it may come up: http://search.microsoft.com/search/results.aspx?st=b&View=en-us&na=82&qu=SQL+varchar+spaces&swc=3


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.