Easy SQL question

Posted on 2008-11-05
Last Modified: 2010-03-20
I have a real easy one. I nee the SQL syntax to update the msrp field. I want it to be 110% of the price field.

update dyndns.items

set msrp = "price * 1.10"

where id=45274

Open in new window

Question by:patGRFXS
    LVL 142

    Accepted Solution

    indeed easy
    update dyndns.items
    set msrp = price * 1.10
    where id=45274

    Open in new window

    LVL 40

    Expert Comment

    you may need to use cast/convert function depending on the data type of your msrp and price fields.
    update dyndns.items set msrp = price * 1.10 where id=45274  

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    'Between' is such a common word we rarely think about it but in SQL it has a very specific definition we should be aware of. While most database vendors will have their own unique phrases to describe it (see references at end) the concept in common …
    If you find yourself in this situation “I have used SELECT DISTINCT but I’m getting duplicates” then I'm sorry to say you are using the wrong SQL technique as it only does one thing which is: produces whole rows that are unique. If the results you a…
    This video discusses moving either the default database or any database to a new volume.
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    779 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

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now