SQL server bit type Access linked tables












0














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?










share|improve this question







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.

























    0














    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?










    share|improve this question







    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.























      0












      0








      0







      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?










      share|improve this question







      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?







      sql-server ms-access






      share|improve this question







      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.











      share|improve this question







      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.









      share|improve this question




      share|improve this question






      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.
























          1 Answer
          1






          active

          oldest

          votes


















          4














          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.






          share|improve this answer























          • 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











          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.










          draft saved

          draft discarded


















          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









          4














          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.






          share|improve this answer























          • 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
















          4














          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.






          share|improve this answer























          • 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














          4












          4








          4






          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.






          share|improve this answer














          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.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          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


















          • 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










          jedu is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          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.




          draft saved


          draft discarded














          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





















































          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







          Popular posts from this blog

          Mossoró

          Error while reading .h5 file using the rhdf5 package in R

          Pushsharp Apns notification error: 'InvalidToken'