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

  • Home
  • SEARCH
  • 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 3624520
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T23:31:05+00:00 2026-05-18T23:31:05+00:00

i have retrived this datatable from datasource and i want to add a more

  • 0

i have retrived this datatable from datasource and i want to add a more colum ‘category’ based
on the each value of each Role, like if role column has the value ’90 daya client’ then in the
same row it should have a value ‘DC’ in the category column. Please let me now how can
acieve this.
i can make a temporatry dt1 table but to add related values.

 S.No     First Name     Last Name           Role             Date
    1   Us er1Name  User1Name   90 Day Client   11/01/2011
    2   User1NameAtt1   User1NameAtt1   90 Day Client   11/01/2011
    3   User4Name   User4Name   Student Client  11/01/2011
    4   User4NameAtt1   User4NameAtt1   Student Client  11/01/2011
    5   user1   user1   90 Day Client   90 Day Client   11/01/2011
    6   att1    att1    Employee        Accountin   11/01/2011
    7   User4NameAtt2   User4NameAtt2   Student Client  11/01/2011
    8   e   ertrt   90 Day Client   Student Client  11/01/2011
    9   User4NameAtt3   User4NameAtt3   Employee    11/01/2011
  • 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-05-18T23:31:06+00:00Added an answer on May 18, 2026 at 11:31 pm

    If using SQL-Server, you could add this column in your sql query with CASE-Expression.
    For example(if your table is called Students:

    SELECT Students.*, Category =
          CASE Role
             WHEN '90 Day Client' THEN 'DC'
             WHEN 'Student Client' THEN 'SC'
             WHEN 'Accountin' THEN 'AC'
             WHEN 'Employee' THEN 'EM'
             ELSE ''
          END
    FROM Students
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this sample text, which is retrieved from the class name on an
So you have a String that is retrieved from an admin web UI (so
I often have to convert a retreived value (usually as a string) - and
So I have an array of records retreived from a database. The array is
I have been using a stored procedure for more than 1.5 years. But I've
I have a Rails app with some basic models. The website displays data retrieved
Have just started using Google Chrome , and noticed in parts of our site,
Have you ever seen any of there error messages? -- SQL Server 2000 Could
Have you guys had any experiences (positive or negative) by placing your source code/solution
Have just started using Visual Studio Professional's built-in unit testing features, which as I

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.