SQLLink4 Decimal issue, SQLLink4 adding decimal length |
![]() ![]() |
SQLLink4 Decimal issue, SQLLink4 adding decimal length |
Mar 16 2011, 08:05 PM
Post
#1
|
|
|
Advanced Member ![]() Group: Omnivex Certified Technicians Posts: 65 Joined: 17-December 08 From: Australia Member No.: 64 |
I have a SQL Query in SQLLink4 returning numbers with two decimal points, however, SQLLink4 is storing the numbers with nine decimal points.
I have tried using several different Filter queries to link the data with only two decimals showing but nothing is then linked into DataPipe. Is there a Filter Statement that will work to return to two decimals? I have attached an image of the initial SQLLink4 query showing both the result from the query and the stored values. Thanks.
Attached File(s)
|
|
|
|
Mar 17 2011, 08:41 AM
Post
#2
|
|
|
Senior Technical Services Engineer ![]() Group: +Omnivex Staff (Moderators) Posts: 511 Joined: 12-November 08 From: Concord, Ontario, Canada Member No.: 3 |
Hello Gary,
SQLLink 4 uses a SQL CE back-end to store query results so that we can run additional queries against the original results. This makes SQLLink 4 very versatile but limits the data types available. To ensure that users are able to output query results in their desired format, our developers exposed decimal number formatting options, which can be configured individually for each query. Settings for the representation of decimal numbers are found in the Query Properties dialog.
|
|
|
|
Mar 17 2011, 03:43 PM
Post
#3
|
|
|
Advanced Member ![]() Group: Omnivex Certified Technicians Posts: 65 Joined: 17-December 08 From: Australia Member No.: 64 |
Well there you go. There's always something new to learn.
I'd missed that one. Thanks. |
|
|
|
Mar 17 2011, 04:00 PM
Post
#4
|
|
|
Senior Technical Services Engineer ![]() Group: +Omnivex Staff (Moderators) Posts: 511 Joined: 12-November 08 From: Concord, Ontario, Canada Member No.: 3 |
No problem, Gary. It's a relatively new feature so it's possible the last time you used SQLLink the option wasn't there. We also added the side-by-side comparison of the data when you test your query so that it's apparent that SQLLink will change certain data values due to the SQL CE back-end.
|
|
|
|
Yesterday, 03:32 PM
Post
#5
|
|
|
Newbie ![]() Group: Customers with Maintenance Posts: 1 Joined: 16-May 13 Member No.: 1,386 |
I don't mean to hijack;
What if you don't want any decimal, but to round up say 89.8 to 90 no decimal places at all. I have made the changes to the decimal location to all 0's but it makes no difference. Do I have to send that query someplace else like excel and pull it back in? Thanks |
|
|
|
Yesterday, 03:37 PM
Post
#6
|
|
|
Senior Technical Services Engineer ![]() Group: +Omnivex Staff (Moderators) Posts: 511 Joined: 12-November 08 From: Concord, Ontario, Canada Member No.: 3 |
I don't mean to hijack; What if you don't want any decimal, but to round up say 89.8 to 90 no decimal places at all. I have made the changes to the decimal location to all 0's but it makes no difference. Do I have to send that query someplace else like excel and pull it back in? Thanks Hello Newton, If you want to round the value, you'll want to use something like the SQL Round() function (the actual function syntax may varry based on the SQL server you're using). This would be part of your SQL statement rather than a configuration setting in SQLLink as the SQLLink setting is intended only for formatting after the result has been returned from the database. |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 22nd May 2013 - 02:56 AM |