Results 1 to 3 of 3

Thread: FORMAT function in SQL Server 7 - HELP!!!

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2000
    Location
    Isle of Man
    Posts
    276
    What's the equivalent of the FORMAT function in SQL Server 7.

    I'm converting an older app from DAO, and sometimes comes up with a query that includes the following: -

    Format(ROUND(([GrossPrice]+[Tax]-((([GrossPrice]+[Tax])/100)*[Commission])),2),'0.00') AS Net

    but SQL Server doesn't like FORMAT...


  2. #2
    Hyperactive Member
    Join Date
    Nov 1999
    Location
    Leavenworth KS USA
    Posts
    482
    In Sybase you'd use:

    convert(money, ([GrossPrice] + [Tax] - ([GrossPrice]+[Tax]) / 100) * [Commission])) AS Net

    But check your MS SQL Server refs for the specifics on the CONVERT function.





    [Edited by Mongo on 07-01-2000 at 01:17 AM]

  3. #3
    Guest
    In SQL Server(6.5 or 7.0) you could use CONVERT or CAST.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width