Skip to main content
Participant
October 22, 2008
Question

Spaces being returned from Query

  • October 22, 2008
  • 1 reply
  • 521 views
All - we are planning on upgrading from ColdFusion MX 6.1 to ColdFusion 8 Enterprise. The installation went fine, but we are now running into a strange issue which we think is caused by a driver issue.

We have this Query:
select nvl(InitCap(first_name), preferred_name) first_name
, InitCap(last_name) last_name
, CASE when trunc(system_userid_end_date) > trunc(sysdate)
then 'A'
else 'D'
END status
from party
where party_id = ?

We expect to recieve "A" or "D", but we are getting back A or D with 32 spaces after the letter.

I've tried several different connection set ups in the Console using a couple different drivers, but haven't had any luck:

MacroMedia Driver:
jdbc:macromedia:oracle://xxxx.dev.csc.local;ServiceName=xxxx.wil.csc.local; ConnectionRetryCount=2;ConnectionRetryDelay=5

JDBC 1.4 Driver (ojdbc14.jar) and JDBC 1.5 (ojdbc5.jar):
jdbc:oracle:thin:@(description=(address_list= (address=(host=xxxx.dev.csc.local) (protocol=tcp)(port=1521)) (failover=yes))(connect_data=(service_name= xxxx.wil.csc.local)))

This is ColdFusion 8 running under Weblogic 9.2 connecting to an Oracle 10g R3.

Anyone else ever experience this?
This topic has been closed for replies.

1 reply

Participating Frequently
October 23, 2008
Haven't seen that issue before, sounds like it is treating it as a char field. Have you considered using the CAST SQL function to convert from nchar to nvarchar?