SQL server bit type Access linked tables
I linked my Access table containing Boolean data (yes/no) type to SQL server using SSMA. It is showing up as bit field in SQL Server.
If I go to the Object properties panel in SSMS and select "Edit Top 200 rows", I can see that the bit field is represented as True/False. However, for the same table if I do:
select * from table
The output shows that the bit field has the value 0/1 instead of true or false. Why does this happen?
New contributor
jedu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
I linked my Access table containing Boolean data (yes/no) type to SQL server using SSMA. It is showing up as bit field in SQL Server.
If I go to the Object properties panel in SSMS and select "Edit Top 200 rows", I can see that the bit field is represented as True/False. However, for the same table if I do:
select * from table
The output shows that the bit field has the value 0/1 instead of true or false. Why does this happen?
New contributor
jedu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
I linked my Access table containing Boolean data (yes/no) type to SQL server using SSMA. It is showing up as bit field in SQL Server.
If I go to the Object properties panel in SSMS and select "Edit Top 200 rows", I can see that the bit field is represented as True/False. However, for the same table if I do:
select * from table
The output shows that the bit field has the value 0/1 instead of true or false. Why does this happen?
New contributor
jedu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
I linked my Access table containing Boolean data (yes/no) type to SQL server using SSMA. It is showing up as bit field in SQL Server.
If I go to the Object properties panel in SSMS and select "Edit Top 200 rows", I can see that the bit field is represented as True/False. However, for the same table if I do:
select * from table
The output shows that the bit field has the value 0/1 instead of true or false. Why does this happen?
New contributor
jedu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
jedu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
jedu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 2 days ago
jedu
448
448
New contributor
jedu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
jedu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
jedu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
It's simply a display format. bit and boolean are effectively the same thing. The bit data type is even happy to accept the varchar values 'TRUE' and 'FALSE' in T-SQL:
DECLARE @b1 bit = 'TRUE', @b2 bit = 'FALSE';
SELECT @b1, @b2;
This returns 1 and 0 respectively.
Many applications (like .Net) that deal with bit/boolean data types are happy to use 0/FALSE and 1/TRUE interchangeably as well. In either circumstance their value is the same.
In my Access linked table front end the values are 0 and -1. is there a way to change it to yes/no for better redability?
– jedu
2 days ago
In what, @Jedu, your application? You decide the display format in your application, that's part of what being a presentation layer is.
– Larnu
2 days ago
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
jedu is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53945075%2fsql-server-bit-type-access-linked-tables%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
It's simply a display format. bit and boolean are effectively the same thing. The bit data type is even happy to accept the varchar values 'TRUE' and 'FALSE' in T-SQL:
DECLARE @b1 bit = 'TRUE', @b2 bit = 'FALSE';
SELECT @b1, @b2;
This returns 1 and 0 respectively.
Many applications (like .Net) that deal with bit/boolean data types are happy to use 0/FALSE and 1/TRUE interchangeably as well. In either circumstance their value is the same.
In my Access linked table front end the values are 0 and -1. is there a way to change it to yes/no for better redability?
– jedu
2 days ago
In what, @Jedu, your application? You decide the display format in your application, that's part of what being a presentation layer is.
– Larnu
2 days ago
add a comment |
It's simply a display format. bit and boolean are effectively the same thing. The bit data type is even happy to accept the varchar values 'TRUE' and 'FALSE' in T-SQL:
DECLARE @b1 bit = 'TRUE', @b2 bit = 'FALSE';
SELECT @b1, @b2;
This returns 1 and 0 respectively.
Many applications (like .Net) that deal with bit/boolean data types are happy to use 0/FALSE and 1/TRUE interchangeably as well. In either circumstance their value is the same.
In my Access linked table front end the values are 0 and -1. is there a way to change it to yes/no for better redability?
– jedu
2 days ago
In what, @Jedu, your application? You decide the display format in your application, that's part of what being a presentation layer is.
– Larnu
2 days ago
add a comment |
It's simply a display format. bit and boolean are effectively the same thing. The bit data type is even happy to accept the varchar values 'TRUE' and 'FALSE' in T-SQL:
DECLARE @b1 bit = 'TRUE', @b2 bit = 'FALSE';
SELECT @b1, @b2;
This returns 1 and 0 respectively.
Many applications (like .Net) that deal with bit/boolean data types are happy to use 0/FALSE and 1/TRUE interchangeably as well. In either circumstance their value is the same.
It's simply a display format. bit and boolean are effectively the same thing. The bit data type is even happy to accept the varchar values 'TRUE' and 'FALSE' in T-SQL:
DECLARE @b1 bit = 'TRUE', @b2 bit = 'FALSE';
SELECT @b1, @b2;
This returns 1 and 0 respectively.
Many applications (like .Net) that deal with bit/boolean data types are happy to use 0/FALSE and 1/TRUE interchangeably as well. In either circumstance their value is the same.
edited 2 days ago
answered 2 days ago
Larnu
15.3k41630
15.3k41630
In my Access linked table front end the values are 0 and -1. is there a way to change it to yes/no for better redability?
– jedu
2 days ago
In what, @Jedu, your application? You decide the display format in your application, that's part of what being a presentation layer is.
– Larnu
2 days ago
add a comment |
In my Access linked table front end the values are 0 and -1. is there a way to change it to yes/no for better redability?
– jedu
2 days ago
In what, @Jedu, your application? You decide the display format in your application, that's part of what being a presentation layer is.
– Larnu
2 days ago
In my Access linked table front end the values are 0 and -1. is there a way to change it to yes/no for better redability?
– jedu
2 days ago
In my Access linked table front end the values are 0 and -1. is there a way to change it to yes/no for better redability?
– jedu
2 days ago
In what, @Jedu, your application? You decide the display format in your application, that's part of what being a presentation layer is.
– Larnu
2 days ago
In what, @Jedu, your application? You decide the display format in your application, that's part of what being a presentation layer is.
– Larnu
2 days ago
add a comment |
jedu is a new contributor. Be nice, and check out our Code of Conduct.
jedu is a new contributor. Be nice, and check out our Code of Conduct.
jedu is a new contributor. Be nice, and check out our Code of Conduct.
jedu is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53945075%2fsql-server-bit-type-access-linked-tables%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown