Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


SQL Statement

Posted on 2014-10-27
Medium Priority
Last Modified: 2014-10-27
What does "*" in below statement "BaseAmount=BaseAmount*-1"  mean ?

update SALES_INVOICE set BaseAmount=BaseAmount*-1
 AND ACCOUNTNUM='81200810'
Question by:AXISHK
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 58

Expert Comment

ID: 40407740
Makes no sense!

Accepted Solution

johny_bravo1 earned 1000 total points
ID: 40407761
If your BaseAmount is 5000
then executing above statement will make it, -5000

In short it is like (YourColumnValue) * (-1)
So if your BaseAmount value is 5000 it will work as (5000) * (-1) = -5000
LVL 49

Assisted Solution

PortletPaul earned 1000 total points
ID: 40407774
It means multiply

* is multiply

The update statement is reversing the sign of the values by multiplying everything by minus one:
if something was a positive number before the update it is negative after the update, and if negative before the update it will be positive after the update.

Author Closing Comment

ID: 40407794

Featured Post

Linux Academy Android App Now Supports Chromecast

We have some fantastic news for our Android fans. We’re so excited to announce that the Linux Academy Android app is now available with Chromecast support. That’s right – simply download the latest update of the Linux Academy App and start casting your favorite course videos!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question