{"action":"opened","issue":{"url":"https://api.github.com/repos/OHDSI/FeatureExtraction/issues/22","repository_url":"https://api.github.com/repos/OHDSI/FeatureExtraction","labels_url":"https://api.github.com/repos/OHDSI/FeatureExtraction/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/OHDSI/FeatureExtraction/issues/22/comments","events_url":"https://api.github.com/repos/OHDSI/FeatureExtraction/issues/22/events","html_url":"https://github.com/OHDSI/FeatureExtraction/issues/22","id":229068657,"number":22,"title":"Order by clause in GetCovariates.sql","user":{"login":"alondhe","id":8037742,"avatar_url":"https://avatars1.githubusercontent.com/u/8037742?v=3","gravatar_id":"","url":"https://api.github.com/users/alondhe","html_url":"https://github.com/alondhe","followers_url":"https://api.github.com/users/alondhe/followers","following_url":"https://api.github.com/users/alondhe/following{/other_user}","gists_url":"https://api.github.com/users/alondhe/gists{/gist_id}","starred_url":"https://api.github.com/users/alondhe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alondhe/subscriptions","organizations_url":"https://api.github.com/users/alondhe/orgs","repos_url":"https://api.github.com/users/alondhe/repos","events_url":"https://api.github.com/users/alondhe/events{/privacy}","received_events_url":"https://api.github.com/users/alondhe/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-05-16T15:11:09Z","updated_at":"2017-05-16T15:11:09Z","closed_at":null,"body":"Hi,\r\nIn the GetCovariates.sql file, we have some insert statements that also include \"order by\" clauses: \r\nhttps://github.com/OHDSI/FeatureExtraction/blob/119ca34ade7316635b723680ee5c3f70235271bc/inst/sql/sql_server/GetCovariates.sql#L2245-L2281 \r\n\r\nThat's not valid in PDW (and I think in most other dialects?):\r\n`The ORDER BY clause is invalid in views, CREATE TABLE AS SELECT, INSERT SELECT, inline functions, derived tables, subqueries, and common table expressions, unless TOP or FOR XML is also specified.)`\r\n\r\nDoes the ordering of these temp tables by source_code actually matter? Can the order by clauses be removed?\r\n\r\nThanks,\r\nAjit"}}
{"actor":{"display_login":"alondhe"}}