Absolute Value of Data in SQL Statement
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I am looking to get the Absolute value of data before it is summarized through an SQL statement. I am trying to do this through a PRE SQL Statement as once I summarize the data through SQL the absolute value is the Absolute value of the summarized data. I am having problems with the Pre SQL Statement and unsure how to write that statement. Please let me know how to resolve this.
- Labels:
- Database Connection
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi. I'm not 100% sure what you are looking for. If you want to do an absolute value before a summarize tool using in db - most DB's have a function you could use in a formula tool in-db like ABS("fieldname") and then you could use a summarize tool in-db after.
Likewise - you should be able to create a new column and then sum it something like
select sum(absolute_value_column) from (select ABS(my_column) as absolute_value_column from my_database)
specific SQL can vary.
