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 7676183
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T17:08:29+00:00 2026-05-31T17:08:29+00:00

this is my final query select Codigo, Indicador, case when Indicador like ‘%Porcentaje%’ then

  • 0

this is my final query

select Codigo,  Indicador,
case when Indicador like '%Porcentaje%' then cast((round((([Valor Censo Elegido]/@cantidad)*100),0)) as varchar(50))+' %' else cast([Valor Censo Elegido]as varchar(50)) end as [Valor Censo Elegido],
case when Indicador like '%Porcentaje%' then cast((round((([Valor Censo Actual]/@cantidad)*100),0))as varchar(50))+' %' else cast([Valor Censo Actual]as varchar(50)) end as [Valor Censo Actual]
--case when Indicador like '%Porcentaje%' then round((([Valor Censo Elegido]/@cantidad)*100),0)  else ([Valor Censo Elegido]) end as [Valor Censo Elegido],
--case when Indicador like '%Porcentaje%' then round((([Valor Censo Actual]/@cantidad)*100),0) else ([Valor Censo Actual]) end as [Valor Censo Actual]

from  #unionfinal

but big numbers convert something as 1.44409e+006
and i need when indicador contain word porcentaje this was calculated and char ‘%’ was added, it converts but i got this bug

working on sql 2005

  • 1 1 Answer
  • 1 View
  • 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-05-31T17:08:30+00:00Added an answer on May 31, 2026 at 5:08 pm

    First, CAST to a DECIMAL number, then to a VARCHAR:

    cast(cast((round(([Valor Censo Elegido]/@cantidad)*100),0) as decimal(50,0)) as varchar(50))+' %'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

HI, I have query like this final Query contractQuery = cgnDao.getEntityManager(). createNativeQuery(SELECT k.phrase, ak.type
I created a table without a primary key Like this: private static final String
We know that the classic range random function is like this: public static final
Consider this case: public Class1 { public static final String ONE = ABC; public
Is this possible somehow? @Name(geolocationService) public interface GeolocationService { @Query(SELECT g FROM Geolocation geolocation
I have this JDBC SQL query: select * from table where TX_DATE = {d
This is my query to calculate distance using latitude longitude values . SELECT mm.mem_id,
Given this Hibernate snippet @org.hibernate.annotations.NamedQueries({ @org.hibernate.annotations.NamedQuery( name = ASSIGNED_CONTINGENCIES, query = select ctg.id from
In access I wrote this query: Select I.sysid, I.MemberNumber, I.Date, I.Distributer, F.MemberNumber as FMember,
i put a drawable in a EditText with this code: final Drawable x =

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.