Intelligent Automation & Macro Software  

Go Back   Tethys Solutions Forums > Products Zone > Automation Anywhere
Register FAQ Search Today's Posts Mark Forums Read

Automation Anywhere Post messages and questions related to Automation Software here.


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-16-2007, 02:05 AM
bfountaine bfountaine is offline
Junior Member
 
Join Date: Jul 2007
Posts: 13
Default SQL Query Results

I am running an sql query that brings back a currency value eg 34.45 if I have a value that comes back as a round number eg 155.00, when I then try and enter the value as keystrokes, it doesn't put the trailing 0's, so will only type 155. Has anyone come across this and is there a way I can make it type the trailing 0's too.
Reply With Quote
  #2 (permalink)  
Old 07-16-2007, 11:12 AM
forumsupport forumsupport is offline
Senior Member
 
Join Date: Apr 2007
Posts: 474
Default

Hello,

Can you please tell us what database are you running the query against?

One thing you can try is check if the dataset column variable includes any dot (.) as follows and write the trailing zeros accordingly

If $Dataset Column(5)$ Does Not Include . Then
Keystrokes $Dataset Column(5)$.00
End If
If $Dataset Column(5)$ Includes . Then
Keystrokes $Dataset Column(5)$
End If

Hope that helps.
Reply With Quote
  #3 (permalink)  
Old 07-17-2007, 01:26 AM
bfountaine bfountaine is offline
Junior Member
 
Join Date: Jul 2007
Posts: 13
Default

The database I'm running the query against is Firebird 1.5, the field in question is defined as a float. I've got a third party ODBC driver from IBPhoenix http://www.ibphoenix.com/main.nfs?page=ibp_60_odbc

Will try the suggestion you've made and see if it does the trick,

Thanks
Reply With Quote
  #4 (permalink)  
Old 07-18-2007, 07:44 AM
bfountaine bfountaine is offline
Junior Member
 
Join Date: Jul 2007
Posts: 13
Default

I've found it truncates any trailing 0's so a value of 2.50 is coming through as 2.5. The

If $Dataset Column(5)$ Includes . Then...

suggestion made did help for values such as 10.00, any similar suggestions of how I check if I need the trailing 0?
Reply With Quote
  #5 (permalink)  
Old 07-20-2007, 03:33 AM
bfountaine bfountaine is offline
Junior Member
 
Join Date: Jul 2007
Posts: 13
Default

Further information to this issue. I have tried using cast in my sql and casting it to a decimal with no luck. I've written a script that says select 2.50 from [tablename] and then logged to a file the value in dataset column 1 and I still get 2.5 can I test if there is only 1 character after the decimal place? I can check if the value includes the decimal, but can I check how long a variable is?
Reply With Quote
  #6 (permalink)  
Old 07-20-2007, 08:21 AM
bfountaine bfountaine is offline
Junior Member
 
Join Date: Jul 2007
Posts: 13
Default

finally figured out a way around this so for those of you who may also have this problem. In my sql I cast to numeric(8,2) and then cast that to varchar(20) in the following way:

select cast(cast(field as numeric(8,2)) as varchar(20)) from table

I'm fairly certain its a problem with the odbc driver rather than Automation Anywhere as running the same original query through an odbc connection under another piece of software gave me the same truncation.
Reply With Quote
  #7 (permalink)  
Old 01-05-2008, 02:15 PM
Vote Sizing Steve Vote Sizing Steve is offline
Junior Member
 
Join Date: Jan 2008
Posts: 2
Default

I was also having a series of problems with my mySQL odbc connector (MyODBC ver 3.5.11) getting the loop to get past the first record, and by working it out with tech support I found the work-around of making a table in msAccess and then connecting to it through the Jet connection instead.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -7. The time now is 09:44 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.0.0 ©2007, Crawlability, Inc.
Copyright © 2003-2008 Tethys Solutions, LLC. All rights reserved