Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8707667
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T03:55:38+00:00 2026-06-13T03:55:38+00:00

I have a float field which shows data as such: 1 1.00 3.12 3.00

  • 0

I have a float field which shows data as such:

1
1.00
3.12
3.00

I also have a varchar field that shows as such:

NA
ND 
I

Data is as such: Fld_N is a float and Fld_S is varchar

Fld_N   Fld_S
-----   ------
1 
        ND
1.00    
3.12
3
       NA
       I

Notice that a row can have a value for either the Fld_N or the Fld_S but not both.

What I am doing is using the coalesce as such:

    COALESCE(STR(Fld_N,9,2), Fld_S)  Fld

This doesn’t quite work well as I have the decimal points always be upto 2 decimal points whereas I need it to support showing 1 as well as 1.00. Is there a way to not specify the decimal points and still accomomdate for showing 1 and 1.00 in my example?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T03:55:39+00:00Added an answer on June 13, 2026 at 3:55 am

    try the convert function:

    coalesce(convert(varchar,Fld_N),Fld_S) Fdl

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a website page that contains only data of which one field gives
I have a field in DB which is float. My application is WindowsForm. I
There is one field in table which is float and i have to insert
In my db table I have a field float where I store cost of
I have a datastructure with a field of the float-type. A collection of these
I have two float variables that are equal, I retrieve them by PHP and
If I have this float array declaration: float tables[10]; How can I change the
I have a titles table of about 14000 records, with a float field average_rating
I have a temperature table, which contains a DATETIME field and a temperature field
I have a div <div id=ab> which contain a text field <input type=text class=a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.