Difference between quotation marks ('single' vs “doubleâ€) in QGIS
Clash Royale CLAN TAG#URR8PPP
up vote
2
down vote
favorite
I am not a new QGIS user, however, I am still confused concerning the quotation marks syntax ('single' vs "double").
I know something about the quotation marks and the way they are applied in Python scripting (i.e. comments, strings etc.).
There are even some related questions:
- Single quotes vs. double quotes in Python [closed]
- Is there any difference between “string†and 'string' in Python? [duplicate]
Nevertheless, I would like to clarify the details regarding the quotation marks ('single' vs "double") in the scope of QGIS.
For instance, if I type something in the Expression dialogue I will have a different output.
"something"
, it is written as
The Output is NULL
.
'something'
, it is shown as
The output is 'something'
as a string.
So, my questions are:
- What is the syntax/meaningful difference between quotation marks ('single' vs "double") in QGIS?
- Are there any other circumstances when other types of quotation marks are used in QGIS, for instance, triple quotation marks as in Python?
qgis python syntax
add a comment |Â
up vote
2
down vote
favorite
I am not a new QGIS user, however, I am still confused concerning the quotation marks syntax ('single' vs "double").
I know something about the quotation marks and the way they are applied in Python scripting (i.e. comments, strings etc.).
There are even some related questions:
- Single quotes vs. double quotes in Python [closed]
- Is there any difference between “string†and 'string' in Python? [duplicate]
Nevertheless, I would like to clarify the details regarding the quotation marks ('single' vs "double") in the scope of QGIS.
For instance, if I type something in the Expression dialogue I will have a different output.
"something"
, it is written as
The Output is NULL
.
'something'
, it is shown as
The output is 'something'
as a string.
So, my questions are:
- What is the syntax/meaningful difference between quotation marks ('single' vs "double") in QGIS?
- Are there any other circumstances when other types of quotation marks are used in QGIS, for instance, triple quotation marks as in Python?
qgis python syntax
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I am not a new QGIS user, however, I am still confused concerning the quotation marks syntax ('single' vs "double").
I know something about the quotation marks and the way they are applied in Python scripting (i.e. comments, strings etc.).
There are even some related questions:
- Single quotes vs. double quotes in Python [closed]
- Is there any difference between “string†and 'string' in Python? [duplicate]
Nevertheless, I would like to clarify the details regarding the quotation marks ('single' vs "double") in the scope of QGIS.
For instance, if I type something in the Expression dialogue I will have a different output.
"something"
, it is written as
The Output is NULL
.
'something'
, it is shown as
The output is 'something'
as a string.
So, my questions are:
- What is the syntax/meaningful difference between quotation marks ('single' vs "double") in QGIS?
- Are there any other circumstances when other types of quotation marks are used in QGIS, for instance, triple quotation marks as in Python?
qgis python syntax
I am not a new QGIS user, however, I am still confused concerning the quotation marks syntax ('single' vs "double").
I know something about the quotation marks and the way they are applied in Python scripting (i.e. comments, strings etc.).
There are even some related questions:
- Single quotes vs. double quotes in Python [closed]
- Is there any difference between “string†and 'string' in Python? [duplicate]
Nevertheless, I would like to clarify the details regarding the quotation marks ('single' vs "double") in the scope of QGIS.
For instance, if I type something in the Expression dialogue I will have a different output.
"something"
, it is written as
The Output is NULL
.
'something'
, it is shown as
The output is 'something'
as a string.
So, my questions are:
- What is the syntax/meaningful difference between quotation marks ('single' vs "double") in QGIS?
- Are there any other circumstances when other types of quotation marks are used in QGIS, for instance, triple quotation marks as in Python?
qgis python syntax
qgis python syntax
edited 34 mins ago
asked 41 mins ago


Taras
1,2361520
1,2361520
add a comment |Â
add a comment |Â
3 Answers
3
active
oldest
votes
up vote
2
down vote
Double quotes indicate that the string represents the name of an attribute while a single quote is a literal string.
So in your first case you get NULL
because you don't have an attribute called something
.
add a comment |Â
up vote
1
down vote
Double marks refer to columns in the attribute table, single marks to a value. E.g. CASE WHEN "something" > '100' THEN 'a lot' ELSE 'not so much'
checks the size of values in your column and adds content to fields in the attribute table based on that size.
add a comment |Â
up vote
1
down vote
Here is the answer directly from QGIS help:
column name "column name" → Value of the field column name, take care
to not be confused with simple quote, see below
'string' → a string value, take care to not be confused with double
quote, see above
add a comment |Â
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
Double quotes indicate that the string represents the name of an attribute while a single quote is a literal string.
So in your first case you get NULL
because you don't have an attribute called something
.
add a comment |Â
up vote
2
down vote
Double quotes indicate that the string represents the name of an attribute while a single quote is a literal string.
So in your first case you get NULL
because you don't have an attribute called something
.
add a comment |Â
up vote
2
down vote
up vote
2
down vote
Double quotes indicate that the string represents the name of an attribute while a single quote is a literal string.
So in your first case you get NULL
because you don't have an attribute called something
.
Double quotes indicate that the string represents the name of an attribute while a single quote is a literal string.
So in your first case you get NULL
because you don't have an attribute called something
.
answered 38 mins ago


Ian Turton♦
46.1k544106
46.1k544106
add a comment |Â
add a comment |Â
up vote
1
down vote
Double marks refer to columns in the attribute table, single marks to a value. E.g. CASE WHEN "something" > '100' THEN 'a lot' ELSE 'not so much'
checks the size of values in your column and adds content to fields in the attribute table based on that size.
add a comment |Â
up vote
1
down vote
Double marks refer to columns in the attribute table, single marks to a value. E.g. CASE WHEN "something" > '100' THEN 'a lot' ELSE 'not so much'
checks the size of values in your column and adds content to fields in the attribute table based on that size.
add a comment |Â
up vote
1
down vote
up vote
1
down vote
Double marks refer to columns in the attribute table, single marks to a value. E.g. CASE WHEN "something" > '100' THEN 'a lot' ELSE 'not so much'
checks the size of values in your column and adds content to fields in the attribute table based on that size.
Double marks refer to columns in the attribute table, single marks to a value. E.g. CASE WHEN "something" > '100' THEN 'a lot' ELSE 'not so much'
checks the size of values in your column and adds content to fields in the attribute table based on that size.
answered 36 mins ago
Erik
2,13417
2,13417
add a comment |Â
add a comment |Â
up vote
1
down vote
Here is the answer directly from QGIS help:
column name "column name" → Value of the field column name, take care
to not be confused with simple quote, see below
'string' → a string value, take care to not be confused with double
quote, see above
add a comment |Â
up vote
1
down vote
Here is the answer directly from QGIS help:
column name "column name" → Value of the field column name, take care
to not be confused with simple quote, see below
'string' → a string value, take care to not be confused with double
quote, see above
add a comment |Â
up vote
1
down vote
up vote
1
down vote
Here is the answer directly from QGIS help:
column name "column name" → Value of the field column name, take care
to not be confused with simple quote, see below
'string' → a string value, take care to not be confused with double
quote, see above
Here is the answer directly from QGIS help:
column name "column name" → Value of the field column name, take care
to not be confused with simple quote, see below
'string' → a string value, take care to not be confused with double
quote, see above
answered 27 mins ago
ahmadhanb
20.1k21847
20.1k21847
add a comment |Â
add a comment |Â
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
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f301566%2fdifference-between-quotation-marks-single-vs-double-in-qgis%23new-answer', 'question_page');
);
Post as a guest
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
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
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