SAS PROC SQL VALIDATE












0















I wonder may I ask a question in terms of "PROC SQL VALIDATE" as follows:



Which statement about the following PROC SQL query is "false"?



    proc sql;
validate
select name label="Country",
rate label="Literacy Rate"
from world.literacy
where "Asia" =
(select continent
from world.continents
where literacy.name=
continents.country)
order by 2;


I wonder why the first options below is not "false"?



 (a) The query syntax is not valid. 

(b) The outer query must pass values to the subquery
before the subquery can return values to the outer
query

(c) PROC SQL will not execute this query when it is
submitted

(d) After the query is submitted, the SAS log will
indicate whether the query has valid syntax


The answer is (d)
I was wondering why the query syntax is not valid?



Thank you very much!!










share|improve this question























  • Option (a) is false, as it's a valid syntax. See the answer below.

    – cph_sto
    Nov 25 '18 at 0:59











  • Answer (d) does NOT say that the syntax is not valid. It says that SAS will write a message to the log that indicates WHETHER the syntax is valid.

    – Tom
    Nov 25 '18 at 2:13











  • Double negatives are the worst question types for testing knowledge, unless the knowledge domain is logic evaluation.

    – Richard
    Nov 25 '18 at 10:34
















0















I wonder may I ask a question in terms of "PROC SQL VALIDATE" as follows:



Which statement about the following PROC SQL query is "false"?



    proc sql;
validate
select name label="Country",
rate label="Literacy Rate"
from world.literacy
where "Asia" =
(select continent
from world.continents
where literacy.name=
continents.country)
order by 2;


I wonder why the first options below is not "false"?



 (a) The query syntax is not valid. 

(b) The outer query must pass values to the subquery
before the subquery can return values to the outer
query

(c) PROC SQL will not execute this query when it is
submitted

(d) After the query is submitted, the SAS log will
indicate whether the query has valid syntax


The answer is (d)
I was wondering why the query syntax is not valid?



Thank you very much!!










share|improve this question























  • Option (a) is false, as it's a valid syntax. See the answer below.

    – cph_sto
    Nov 25 '18 at 0:59











  • Answer (d) does NOT say that the syntax is not valid. It says that SAS will write a message to the log that indicates WHETHER the syntax is valid.

    – Tom
    Nov 25 '18 at 2:13











  • Double negatives are the worst question types for testing knowledge, unless the knowledge domain is logic evaluation.

    – Richard
    Nov 25 '18 at 10:34














0












0








0








I wonder may I ask a question in terms of "PROC SQL VALIDATE" as follows:



Which statement about the following PROC SQL query is "false"?



    proc sql;
validate
select name label="Country",
rate label="Literacy Rate"
from world.literacy
where "Asia" =
(select continent
from world.continents
where literacy.name=
continents.country)
order by 2;


I wonder why the first options below is not "false"?



 (a) The query syntax is not valid. 

(b) The outer query must pass values to the subquery
before the subquery can return values to the outer
query

(c) PROC SQL will not execute this query when it is
submitted

(d) After the query is submitted, the SAS log will
indicate whether the query has valid syntax


The answer is (d)
I was wondering why the query syntax is not valid?



Thank you very much!!










share|improve this question














I wonder may I ask a question in terms of "PROC SQL VALIDATE" as follows:



Which statement about the following PROC SQL query is "false"?



    proc sql;
validate
select name label="Country",
rate label="Literacy Rate"
from world.literacy
where "Asia" =
(select continent
from world.continents
where literacy.name=
continents.country)
order by 2;


I wonder why the first options below is not "false"?



 (a) The query syntax is not valid. 

(b) The outer query must pass values to the subquery
before the subquery can return values to the outer
query

(c) PROC SQL will not execute this query when it is
submitted

(d) After the query is submitted, the SAS log will
indicate whether the query has valid syntax


The answer is (d)
I was wondering why the query syntax is not valid?



Thank you very much!!







sql sas






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 24 '18 at 23:52









ChenChen

666




666













  • Option (a) is false, as it's a valid syntax. See the answer below.

    – cph_sto
    Nov 25 '18 at 0:59











  • Answer (d) does NOT say that the syntax is not valid. It says that SAS will write a message to the log that indicates WHETHER the syntax is valid.

    – Tom
    Nov 25 '18 at 2:13











  • Double negatives are the worst question types for testing knowledge, unless the knowledge domain is logic evaluation.

    – Richard
    Nov 25 '18 at 10:34



















  • Option (a) is false, as it's a valid syntax. See the answer below.

    – cph_sto
    Nov 25 '18 at 0:59











  • Answer (d) does NOT say that the syntax is not valid. It says that SAS will write a message to the log that indicates WHETHER the syntax is valid.

    – Tom
    Nov 25 '18 at 2:13











  • Double negatives are the worst question types for testing knowledge, unless the knowledge domain is logic evaluation.

    – Richard
    Nov 25 '18 at 10:34

















Option (a) is false, as it's a valid syntax. See the answer below.

– cph_sto
Nov 25 '18 at 0:59





Option (a) is false, as it's a valid syntax. See the answer below.

– cph_sto
Nov 25 '18 at 0:59













Answer (d) does NOT say that the syntax is not valid. It says that SAS will write a message to the log that indicates WHETHER the syntax is valid.

– Tom
Nov 25 '18 at 2:13





Answer (d) does NOT say that the syntax is not valid. It says that SAS will write a message to the log that indicates WHETHER the syntax is valid.

– Tom
Nov 25 '18 at 2:13













Double negatives are the worst question types for testing knowledge, unless the knowledge domain is logic evaluation.

– Richard
Nov 25 '18 at 10:34





Double negatives are the worst question types for testing knowledge, unless the knowledge domain is logic evaluation.

– Richard
Nov 25 '18 at 10:34












1 Answer
1






active

oldest

votes


















0














The query that you have posted has a correlated sub-query (from world.continents). This sub-query cannot be evaluated independently, but actually depends on the values passed to them by the outer query (world.literacy).



Let me explain each of the 4 options,



(a) The query syntax is not valid. - False


No, this is totally valid statement, where we have an outer-query and a sub-query.



(b) The outer query must pass values to the subquery before the 
subquery can return values to the outer query - True


As mentioned on the top, this is what actually happens.



(c) PROC SQL will not execute this query when it is submitted - True


As you can see in the doumentation, a validate statement only checks for the accuracy of a query expression's syntax and semantics without executing the expression.



(d) After the query is submitted, the SAS log will 
indicate whether the query has valid syntax - True


The same documentation also mentions that validate statement writes a message in the SAS log that states that the query is valid. If there are errors, then validate writes error messages to the SAS log.






share|improve this answer
























  • Thank you! Then I guess I had the wrong answer. Thanks!!

    – Chen
    Nov 25 '18 at 19:28











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
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53463451%2fsas-proc-sql-validate%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









0














The query that you have posted has a correlated sub-query (from world.continents). This sub-query cannot be evaluated independently, but actually depends on the values passed to them by the outer query (world.literacy).



Let me explain each of the 4 options,



(a) The query syntax is not valid. - False


No, this is totally valid statement, where we have an outer-query and a sub-query.



(b) The outer query must pass values to the subquery before the 
subquery can return values to the outer query - True


As mentioned on the top, this is what actually happens.



(c) PROC SQL will not execute this query when it is submitted - True


As you can see in the doumentation, a validate statement only checks for the accuracy of a query expression's syntax and semantics without executing the expression.



(d) After the query is submitted, the SAS log will 
indicate whether the query has valid syntax - True


The same documentation also mentions that validate statement writes a message in the SAS log that states that the query is valid. If there are errors, then validate writes error messages to the SAS log.






share|improve this answer
























  • Thank you! Then I guess I had the wrong answer. Thanks!!

    – Chen
    Nov 25 '18 at 19:28
















0














The query that you have posted has a correlated sub-query (from world.continents). This sub-query cannot be evaluated independently, but actually depends on the values passed to them by the outer query (world.literacy).



Let me explain each of the 4 options,



(a) The query syntax is not valid. - False


No, this is totally valid statement, where we have an outer-query and a sub-query.



(b) The outer query must pass values to the subquery before the 
subquery can return values to the outer query - True


As mentioned on the top, this is what actually happens.



(c) PROC SQL will not execute this query when it is submitted - True


As you can see in the doumentation, a validate statement only checks for the accuracy of a query expression's syntax and semantics without executing the expression.



(d) After the query is submitted, the SAS log will 
indicate whether the query has valid syntax - True


The same documentation also mentions that validate statement writes a message in the SAS log that states that the query is valid. If there are errors, then validate writes error messages to the SAS log.






share|improve this answer
























  • Thank you! Then I guess I had the wrong answer. Thanks!!

    – Chen
    Nov 25 '18 at 19:28














0












0








0







The query that you have posted has a correlated sub-query (from world.continents). This sub-query cannot be evaluated independently, but actually depends on the values passed to them by the outer query (world.literacy).



Let me explain each of the 4 options,



(a) The query syntax is not valid. - False


No, this is totally valid statement, where we have an outer-query and a sub-query.



(b) The outer query must pass values to the subquery before the 
subquery can return values to the outer query - True


As mentioned on the top, this is what actually happens.



(c) PROC SQL will not execute this query when it is submitted - True


As you can see in the doumentation, a validate statement only checks for the accuracy of a query expression's syntax and semantics without executing the expression.



(d) After the query is submitted, the SAS log will 
indicate whether the query has valid syntax - True


The same documentation also mentions that validate statement writes a message in the SAS log that states that the query is valid. If there are errors, then validate writes error messages to the SAS log.






share|improve this answer













The query that you have posted has a correlated sub-query (from world.continents). This sub-query cannot be evaluated independently, but actually depends on the values passed to them by the outer query (world.literacy).



Let me explain each of the 4 options,



(a) The query syntax is not valid. - False


No, this is totally valid statement, where we have an outer-query and a sub-query.



(b) The outer query must pass values to the subquery before the 
subquery can return values to the outer query - True


As mentioned on the top, this is what actually happens.



(c) PROC SQL will not execute this query when it is submitted - True


As you can see in the doumentation, a validate statement only checks for the accuracy of a query expression's syntax and semantics without executing the expression.



(d) After the query is submitted, the SAS log will 
indicate whether the query has valid syntax - True


The same documentation also mentions that validate statement writes a message in the SAS log that states that the query is valid. If there are errors, then validate writes error messages to the SAS log.







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 25 '18 at 0:56









cph_stocph_sto

2,3542421




2,3542421













  • Thank you! Then I guess I had the wrong answer. Thanks!!

    – Chen
    Nov 25 '18 at 19:28



















  • Thank you! Then I guess I had the wrong answer. Thanks!!

    – Chen
    Nov 25 '18 at 19:28

















Thank you! Then I guess I had the wrong answer. Thanks!!

– Chen
Nov 25 '18 at 19:28





Thank you! Then I guess I had the wrong answer. Thanks!!

– Chen
Nov 25 '18 at 19:28




















draft saved

draft discarded




















































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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53463451%2fsas-proc-sql-validate%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

404 Error Contact Form 7 ajax form submitting

How to know if a Active Directory user can login interactively

TypeError: fit_transform() missing 1 required positional argument: 'X'