Results 1 to 4 of 4

Thread: How to show decimal poin in a result set?

  1. #1
    Join Date
    Oct 2002
    Location
    queens
    Posts
    139

    How to show decimal poin in a result set?

    Hi,

    I have a field with dataqtype INT. I need to avg this field value and show in decimal with two points, which convert function do I use?

    Thanks in advance!

  2. #2
    Join Date
    Sep 2002
    Posts
    5,938
    Should change to decimal data type.

  3. #3
    Join Date
    Feb 2003
    Posts
    1,048
    Use Cast or Convert to pretend that it's a differnet datatype.

    Select Avg(Cast(FieldName as decimal(9, 2)))

  4. #4
    Join Date
    Oct 2002
    Location
    queens
    Posts
    139
    Thanks, that worked.

Posting Permissions

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