{"action":"created","issue":{"url":"https://api.github.com/repos/OHDSI/ETL-CDMBuilder/issues/12","repository_url":"https://api.github.com/repos/OHDSI/ETL-CDMBuilder","labels_url":"https://api.github.com/repos/OHDSI/ETL-CDMBuilder/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/OHDSI/ETL-CDMBuilder/issues/12/comments","events_url":"https://api.github.com/repos/OHDSI/ETL-CDMBuilder/issues/12/events","html_url":"https://github.com/OHDSI/ETL-CDMBuilder/issues/12","id":182317367,"number":12,"title":"\"Incorrect syntax near GO\" when using with SQL Server","user":{"login":"ajmazurie","id":240550,"avatar_url":"https://avatars.githubusercontent.com/u/240550?v=3","gravatar_id":"","url":"https://api.github.com/users/ajmazurie","html_url":"https://github.com/ajmazurie","followers_url":"https://api.github.com/users/ajmazurie/followers","following_url":"https://api.github.com/users/ajmazurie/following{/other_user}","gists_url":"https://api.github.com/users/ajmazurie/gists{/gist_id}","starred_url":"https://api.github.com/users/ajmazurie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajmazurie/subscriptions","organizations_url":"https://api.github.com/users/ajmazurie/orgs","repos_url":"https://api.github.com/users/ajmazurie/repos","events_url":"https://api.github.com/users/ajmazurie/events{/privacy}","received_events_url":"https://api.github.com/users/ajmazurie/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-11T16:53:45Z","updated_at":"2016-10-11T17:51:09Z","closed_at":null,"body":"Hi,\r\nWe are trying to use **ETL-CDMBuilder** to import a Truven database to CDMv5, using SQL Server 2016 as the backend\r\n\r\nWhen running the Building Manager we get an error message `Incorrect syntax near 'GO'` in  `org.ohdsi.cdm.framework.data.DbLayer.DbSource.CreateIndexesChunkTable()`\r\n\r\nLooking at http://stackoverflow.com/a/25681013/6621470 it would appear that the `GO` statement should be removed from the various SQL files this code is calling, starting with `CreateIndexesChunkTable.sql`. Is that correct? Did you run into this problem before?\r\n\r\nBest, Aurélien"},"comment":{"url":"https://api.github.com/repos/OHDSI/ETL-CDMBuilder/issues/comments/252992626","html_url":"https://github.com/OHDSI/ETL-CDMBuilder/issues/12#issuecomment-252992626","issue_url":"https://api.github.com/repos/OHDSI/ETL-CDMBuilder/issues/12","id":252992626,"user":{"login":"bradanton","id":13117785,"avatar_url":"https://avatars.githubusercontent.com/u/13117785?v=3","gravatar_id":"","url":"https://api.github.com/users/bradanton","html_url":"https://github.com/bradanton","followers_url":"https://api.github.com/users/bradanton/followers","following_url":"https://api.github.com/users/bradanton/following{/other_user}","gists_url":"https://api.github.com/users/bradanton/gists{/gist_id}","starred_url":"https://api.github.com/users/bradanton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradanton/subscriptions","organizations_url":"https://api.github.com/users/bradanton/orgs","repos_url":"https://api.github.com/users/bradanton/repos","events_url":"https://api.github.com/users/bradanton/events{/privacy}","received_events_url":"https://api.github.com/users/bradanton/received_events","type":"User","site_admin":false},"created_at":"2016-10-11T17:51:09Z","updated_at":"2016-10-11T17:51:09Z","body":"Hi Aurélien,\r\n\r\nCreateIndexesChunkTable.sql query has NewLine (\\n) symbols after 'GO'\r\nand after below code, GO statement should be removed. I have checked and it works correct on my side.\r\n\r\nforeach (var subQuery in query.Split(new[] {\"GO\" + Environment.NewLine}, StringSplitOptions.RemoveEmptyEntries))\r\n{\r\n  ...\r\n}\r\n\r\nDid you use bin or you run from visual studio?\r\n\r\nThanks,\r\nAnton"}}
{"actor":{"display_login":"bradanton"}}