Thanks Simon.
(Embedded image moved to file: pic05447.jpg)


                                                                                
             Simon Kitching                                                     
             <[EMAIL PROTECTED]                                                
             rg>                                                             To 
                                         Commons Users List                     
             09/10/2008 10:49 AM         <[email protected]>              
                                                                             cc 
                                                                                
              Please respond to                                         Subject 
               "Commons Users            Re: Scripting Suggestion?              
                    List"                                                       
             <[EMAIL PROTECTED]                                                
                   e.org>                                                       
                                                                                
                                                                                
                                                                                




[EMAIL PROTECTED] schrieb:
> I figured out an alternative.  Primarily, all source data needs to get
truncated
> to fit the target columns.  The only source data I might need to do something
> tricky with appears to be java.sql.Timestamp values.  One particular column in
> my target table that is a String data type that holds a date value wants to
see
> the dates as YYYY-MM-DD-HH-MM-SS.  So when I'm getting values from my source
> data ResultSet, rather than just using the getString() method, I'm using the
> getObject() method instead.
>
> Doing it that way, I'm able to test the returned Object to see what class it's
> an instance of.  This allows me to convert the data to a string and do any
other
> conversions that are specific to the source data type.  In the case of my date
> above, I'm replacing the " " (space) character between the data and time with
a
> "-" (dash) and dropping the nanos.  That gives me the converted value I need.
> So no fancy scripting needed in my XML.
>

Ok, thanks for letting us know. And good luck with your project.

And by the way, if you have any future questions for this list then
please put the name of the commons project in the subject line, eg
  [digester] scripting suggestion

Regards, Simon


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to