My vote goes for integer with 0 and 1.
Nicolas Cadieux M.Sc.
Les Entreprises Archéotec inc. 
8548, rue Saint-Denis Montréal H2P 2H2
Téléphone: 514.381.5112  Fax: 514.381.4995
www.archeotec.ca
On Jun 3, 2015 7:02 PM, "Chrissie Hind [via OSGeo.org]"
<ml-node+s1560n5209047...@n6.nabble.com> wrote:
Hi Nicolas
Thanks for your response. For further background, my QGIS table is already
successfully linked to the SQL table that already has data, and the new column
that I want to make logical does not yet exist in the sql table. I know that I
can create a new column in QGIS and this 'pushes' the new column
through to the SQL however I am not sure what datatype to pick to make the
boolean possible. What would you suggest?
If I was creating the table directly in SQL, I would pick the bit data type,
meaning it could only take 0 or 1 values, however looking at the Add Column
Type drop down list, I can't see any bit provider types. Perhaps I should
pick the option 1 Bytes integer as this should be compatible with the sql
table. I just want to follow best practice and try to cater for future
requirements on this data.
Kind Regards
Chrissie Hind
"Nicolas Cadieux [via OSGeo.org]" ---03/06/2015 10:35:05 PM---Hi, If I
understand, your boolean values are in the MS SQL table?&nbsp; Then you
will need a field
From: "Nicolas Cadieux [via OSGeo.org]" < [hidden email] >
To: Chrissie Hind < [hidden email] >,
Date: 03/06/2015 10:35 PM
Subject: Re: Logical or boolean column
Hi,
If I understand, your boolean values are in the MS SQL table? Then you will
need a field with unique values (integers are simpler) in both the QGIS table
and the external table in order to link both tables. If you can't use
integers, you could use another type but this field needs to be unique
(therefore if you use a family name, you are likely to have two identical
names.)
Nicolas Cadieux M.Sc.
Les Entreprises Archéotec inc.
8548, rue Saint-Denis Montréal H2P 2H2
Téléphone: 514.381.5112 Fax: 514.381.4995
www.archeotec.ca
On Jun 2, 2015 9:56 PM, "CHind [via OSGeo.org]" < [hidden email]
> wrote:
Hi
I would like to add a new column to a linked MS SQL table within QGIS via the
Layer Properties, Fields, Add column.
I am not sure what option to use within the Type to select as I only want to
retain boolean values or either 0 or 1, Â Y or N, or T or F.
What is the best practice here?
Kind Regards
Chrissie Hind
Senior GIS Analyst
Bayside City Council
T: Â 03 9599 4792
F: Â 03 9598 4474
M: Â 0409 938 697
Email: Â Â <a
href="/user/SendEmail.jtp?type&#61;node&amp;node&#61;5208788&amp;i&#61;0">[hidden
email]
Web: Â Â Â www.bayside.vic.gov.au
******************************************************************************
"Please consider the environment before you print this email." This
email, including all attachments, is confidential. Any personal or sensitive
information contained in this email and attachments must be handled in
accordance with the Victorian Information Privacy Act 2000 and the Health
Records Act 2001. If you are not the intended recipient, you must not disclose,
distribute, copy or use the information contained in this email or attachments.
Any confidentiality or privilege is not waived or lost because this email has
been sent to you in error. If you have received it in error, please advise the
sender by return email, delete it from your system and destroy any copies. The
sender gives no warranty that any attachments to this email are free from
viruses or other defects.
********************************************************************************
_______________________________________________
Qgis-user mailing list
<a
href="/user/SendEmail.jtp?type&#61;node&amp;node&#61;5208788&amp;i&#61;1">[hidden
email]
http://lists.osgeo.org/mailman/listinfo/qgis-user
If you reply to this email, your message will be added to the discussion below:
http://osgeo-org.1560.x6.nabble.com/Logical-or-boolean-column-tp5208788.html
To start a new topic under Quantum GIS - User, email [hidden email]
To unsubscribe from Quantum GIS - User, <a href="<a
href="http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro&#61;unsubscribe_by_code&amp;node&#61;4125267&amp;code&#61;bmljb2xhcy5jYWRpZXV4QGFyY2hlb3RlYy5jYXw0MTI1MjY3fDYzNDQ4MjQxNg&#61;&#61">http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro&#61;unsubscribe_by_code&amp;node&#61;4125267&amp;code&#61;bmljb2xhcy5jYWRpZXV4QGFyY2hlb3RlYy5jYXw0MTI1MjY3fDYzNDQ4MjQxNg&#61;&#61;">click
here.
<a href="<a
href="http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro&#61;macro_viewer&amp;id&#61;instant_html%21nabble%3Aemail.naml&amp;base&#61;nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&amp;breadcrumbs&#61;notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml">http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro&#61;macro_viewer&amp;id&#61;instant_html%21nabble%3Aemail.naml&amp;base&#61;nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&amp;breadcrumbs&#61;notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml"
style="font:9px serif">NAML
If you reply to this email, your message will be added to the discussion below:
http://osgeo-org.1560.x6.nabble.com/Logical-or-boolean-column-tp5208788p5208891.html
To unsubscribe from Logical or boolean column, click here .
NAML
If you reply to this email, your message will be added to the
discussion below:
http://osgeo-org.1560.x6.nabble.com/Logical-or-boolean-column-tp5208788p5209047.html
To start a new topic under Quantum GIS - User, email
ml-node+s1560n4125267h38@n6.nabble.com
To unsubscribe from Quantum GIS - User, click here .
NAML
--
View this message in context:
http://osgeo-org.1560.x6.nabble.com/Logical-or-boolean-column-tp5208788p5209053.html
Sent from the Quantum GIS - User mailing list archive at Nabble.com.
_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user