{"action":"created","issue":{"url":"https://api.github.com/repos/rails-sqlserver/activerecord-sqlserver-adapter/issues/407","labels_url":"https://api.github.com/repos/rails-sqlserver/activerecord-sqlserver-adapter/issues/407/labels{/name}","comments_url":"https://api.github.com/repos/rails-sqlserver/activerecord-sqlserver-adapter/issues/407/comments","events_url":"https://api.github.com/repos/rails-sqlserver/activerecord-sqlserver-adapter/issues/407/events","html_url":"https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/issues/407","id":92920069,"number":407,"title":"Listing Table names on Azure SQL server","user":{"login":"jwoertink","id":2391,"avatar_url":"https://avatars.githubusercontent.com/u/2391?v=3","gravatar_id":"","url":"https://api.github.com/users/jwoertink","html_url":"https://github.com/jwoertink","followers_url":"https://api.github.com/users/jwoertink/followers","following_url":"https://api.github.com/users/jwoertink/following{/other_user}","gists_url":"https://api.github.com/users/jwoertink/gists{/gist_id}","starred_url":"https://api.github.com/users/jwoertink/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwoertink/subscriptions","organizations_url":"https://api.github.com/users/jwoertink/orgs","repos_url":"https://api.github.com/users/jwoertink/repos","events_url":"https://api.github.com/users/jwoertink/events{/privacy}","received_events_url":"https://api.github.com/users/jwoertink/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-07-03T18:32:04Z","updated_at":"2015-07-05T22:05:59Z","closed_at":"2015-07-03T21:58:42Z","body":"I'm not very familiar with SQL Server, so not sure if this is a normal thing, or TinyTDS thing, or this gem, but here goes...\r\n\r\nI want to list all the names of the tables in my database that I'm connected to, but every example I've found on how to do this, I always get back an Integer instead of a list of table names..\r\n\r\n```ruby\r\nActiveRecord::Base.connection.execute(\"SELECT db.name, t.TABLE_NAME FROM sys.databases db INNER JOIN INFORMATION_SCHEMA.TABLES t ON db.name = t.TABLE_CATALOG\")\r\n# (77.3ms)  SELECT db.name, t.TABLE_NAME FROM sys.databases db INNER JOIN INFORMATION_SCHEMA.TABLES t ON db.name = t.TABLE_CATALOG\r\n# => 62 \r\n\r\nActiveRecord::Base.connection.execute(\"SELECT * FROM sys.Tables\")\r\n# (50.5ms)  SELECT * FROM sys.Tables\r\n# => 61\r\n\r\nActiveRecord::Base.connection.execute(\"SELECT * FROM sys.indexes\")\r\n# (48.0ms)  SELECT * FROM sys.indexes\r\n# => 183\r\n\r\nActiveRecord::Base.connection.execute(\"SELECT * FROM INFORMATION_SCHEMA.TABLES\")\r\n# (44.9ms)  SELECT * FROM INFORMATION_SCHEMA.TABLES\r\n# => 62\r\n```\r\n\r\nIs there something this gem does when running these SQL commands that require anything in particular, or are these the correct results?"},"comment":{"url":"https://api.github.com/repos/rails-sqlserver/activerecord-sqlserver-adapter/issues/comments/118670559","html_url":"https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/issues/407#issuecomment-118670559","issue_url":"https://api.github.com/repos/rails-sqlserver/activerecord-sqlserver-adapter/issues/407","id":118670559,"user":{"login":"metaskills","id":2381,"avatar_url":"https://avatars.githubusercontent.com/u/2381?v=3","gravatar_id":"","url":"https://api.github.com/users/metaskills","html_url":"https://github.com/metaskills","followers_url":"https://api.github.com/users/metaskills/followers","following_url":"https://api.github.com/users/metaskills/following{/other_user}","gists_url":"https://api.github.com/users/metaskills/gists{/gist_id}","starred_url":"https://api.github.com/users/metaskills/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/metaskills/subscriptions","organizations_url":"https://api.github.com/users/metaskills/orgs","repos_url":"https://api.github.com/users/metaskills/repos","events_url":"https://api.github.com/users/metaskills/events{/privacy}","received_events_url":"https://api.github.com/users/metaskills/received_events","type":"User","site_admin":false},"created_at":"2015-07-05T22:05:59Z","updated_at":"2015-07-05T22:05:59Z","body":":)"}}