microsoft / microsoft/sql-server-samples

Using boolean values

Open
#827 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PowerShell
Stars
11.2k
Forks
9.1k
Avg merge
2d 7h
Merged PRs (30d)
14

Description

I have a table called 'Plan' with a column called 'redo' which is boolean in type. I want to access it using a stored procedure such that when I run the query, I see the column name as 'done' and the value becomes 1 since my task is successfully completed. How to do that? What all operators are supported for bit type, since the value can be either 0 or 1 only. I cant convert it to int type.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the question with the Plan table, its redo bit column, and the stored procedure described in the issue. Check the SQL Server documentation for bit values, supported operators, aliases, and computed output, then document the supported approach and confirm that the result exposes the requested done column and value.

Written by the indexing model from the issue text.

Assessment

Tech stack
sql
Domain
databases
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.