SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 need help
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

saint_izzy
Starting Member

USA
3 Posts

Posted - 02/24/2014 :  22:43:22  Show Profile  Reply with Quote
how can I write this?? The last part of the sentence below.

the price of "FRESH SALAD" is currently $2.00. The new price should be 10% greater, or $2.20. The price increase should be $0.20, the difference between the new and old prices.

saint_izzy
Starting Member

USA
3 Posts

Posted - 02/24/2014 :  23:02:38  Show Profile  Reply with Quote
how do i identify the difference between my old price $2.00 and the new price $2.20. I need to identify the 0.20 in a separate column.
Go to Top of Page

Mar
Starting Member

44 Posts

Posted - 02/25/2014 :  08:20:23  Show Profile  Reply with Quote
What are you trying to do exactly besides get someone else to do your homework?
Go to Top of Page

maunishq
Yak Posting Veteran

Canada
71 Posts

Posted - 02/25/2014 :  12:24:18  Show Profile  Reply with Quote
SELECT Old_Price, (Old_Price*0.1) AS [pc10] FROM table_name


!_(M)_!

Edited by - maunishq on 02/25/2014 12:25:05
Go to Top of Page

saint_izzy
Starting Member

USA
3 Posts

Posted - 02/25/2014 :  13:20:29  Show Profile  Reply with Quote
Thank you! I was able to figure it out.
Go to Top of Page

madhivanan
Premature Yak Congratulator

India
22755 Posts

Posted - 02/26/2014 :  06:58:11  Show Profile  Send madhivanan a Yahoo! Message  Reply with Quote
quote:
Originally posted by saint_izzy

Thank you! I was able to figure it out.


What is the solution?

If the format is same you can parse the string based on the value "The price increase should be " and extract the amount

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000