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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T18:17:35+00:00 2026-06-13T18:17:35+00:00

Currently I am returning a boolean value as 1 or 0 or value of

  • 0

Currently I am returning a boolean value as “1” or “0” or value of a column let say column A in one of my stored procedure and it works perfectly, however in one of application I am trying to get value like this

string temp = reader.TryGetValue("ColumnA", out licenseStatus) ? temp : string.Empty;

Stored procedure is doing something like this,

if @datafield = 1
    return 1
else if @datafield = 2 AND @datafield2 = 3
    return 0
else
    return (SELECT ColumnA.table2 FROM table1 INNER JOIN table2 on table1.id and table2.id Where @datafield3 = 0)

Now I want to return result as value of ColumnA always instead of sending “0” or “1” as I am not allowed to make changes to code in application.

Is it possible ? I can’t make any changes to ColumnA value at all either.

EDIT

I already mentioned in my question that stored procedure is doing what
its suppose to do but not working with my code, as I am returning 1 or
0 at some point and my code isn’t getting it as columnA so its setting
it up empty, I want to return 0 or 1 as value of ColumnA but at same
time I don’t want to change value of columnA in table2..

🙂

  • 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-13T18:17:36+00:00Added an answer on June 13, 2026 at 6:17 pm
    if @datafield = 1
    set ColumnA.table2=1
    else if @datafield = 2 AND @datafield2 = 3
    set ColumnA.table2= 0
    else
    return (SELECT ColumnA.table2 FROM table1 INNER JOIN table2 on table1.id and table2.id Where @datafield3 = 0)
    

    If it is only a select query then it will not change your table data rather it’ll return what you want

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

Sidebar

Related Questions

I'm using Nokogiri to parse an XML response from last.fm. I am currently returning
I currently am returning a table that looks like this: Country Result ------ -----
I have an sql statement that currently is just returning all the end parent
Currently, I'm returning feedback to the user in this form: <UserName> removed 07:00, 07:15,
Currently, I have this version of the autocomplete control working when returning XML from
I am currently designing a forum as a personal project. One of the recurring
Currently, I am writing a MiddleWare application that synchronizes information between and accounting application
I currently have a web-serice running, returning calls to an iPhone client that i've
I have a (common) situation where I am currently returning a result that is
I'm currently trying to work out how to get world coordinates from JOGL -

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.