Re: [sqlite] How to retrieve table names for the given string

2018-09-28 Thread Keith Medcalf
What version of SQLite are you using? --- The fact that there's a Highway to Hell but only a Stairway to Heaven says a lot about anticipated traffic volume. >-Original Message- >From: sqlite-users [mailto:sqlite-users- >boun...@mailinglists.sqlite.org] On Behalf Of Revathi Narayanan

Re: [sqlite] A SQL statement reformatter

2018-09-28 Thread Simon Slavin
On 28 Sep 2018, at 3:49pm, Chris Brody wrote: > Someone should have make this tool 20-30 years ago! They did. There have been others available, I just posted a new one. The

Re: [sqlite] A SQL statement reformatter

2018-09-28 Thread Peter da Silva
Oh, nice! On Fri, Sep 28, 2018 at 9:50 AM Chris Brody wrote: > I found https://github.com/mjibson/sqlfmt through their about page. No > license though, just raised > https://github.com/mjibson/sqlfmt/issues/33. > > GitHub fork-me ribbon would also be nice I think. > > Someone should have make

Re: [sqlite] A SQL statement reformatter

2018-09-28 Thread Chris Brody
I found https://github.com/mjibson/sqlfmt through their about page. No license though, just raised https://github.com/mjibson/sqlfmt/issues/33. GitHub fork-me ribbon would also be nice I think. Someone should have make this tool 20-30 years ago! On Fri, Sep 28, 2018 at 10:44 AM Peter da Silva

Re: [sqlite] A SQL statement reformatter

2018-09-28 Thread Peter da Silva
Pity they aren't making the code available. Not sure I want to send company SQL to a random site. On Fri, Sep 28, 2018 at 7:48 AM Don V Nielsen wrote: > Slick. That line width slider feature is something we don't get using Poor > Man's Sql Formatter. > > Thanks! > > On Thu, Sep 27, 2018 at 7:03

Re: [sqlite] How to retrieve table names for the given string

2018-09-28 Thread Igor Tandetnik
On 9/28/2018 9:51 AM, Thomas Kurz wrote: No, it's PRAGMA table_info (...); It has to be pragma_table_info if you want to use it as part of a SELECT statement. See https://www.sqlite.org/pragma.html#pragfunc -- Igor Tandetnik ___ sqlite-users

Re: [sqlite] How to retrieve table names for the given string

2018-09-28 Thread Thomas Kurz
No, it's PRAGMA table_info (...); - Original Message - From: Igor Tandetnik To: sqlite-users@mailinglists.sqlite.org Sent: Friday, September 28, 2018, 15:35:30 Subject: [sqlite] How to retrieve table names for the given string On 9/28/2018 2:16 AM, Revathi Narayanan wrote: > Thanks

Re: [sqlite] How to retrieve table names for the given string

2018-09-28 Thread Igor Tandetnik
On 9/28/2018 2:16 AM, Revathi Narayanan wrote: Thanks Richard. But I am getting an error like near ( syntax error. Pragma table_info(a.name) It's pragma_table_info , in one word; two underscores, no spaces. -- Igor Tandetnik ___ sqlite-users

Re: [sqlite] How to retrieve table names for the given string

2018-09-28 Thread David Raymond
What if I ask you for tables with a column named "integer"? Or if there are comments in the table sql which might have the names of other tables? Give this a whirl and let me know if it works ok. (Also a good chance to use the statement reformatter from a recent post) with recursive foo

Re: [sqlite] A SQL statement reformatter

2018-09-28 Thread Don V Nielsen
Slick. That line width slider feature is something we don't get using Poor Man's Sql Formatter. Thanks! On Thu, Sep 27, 2018 at 7:03 PM Simon Slavin wrote: > For those times when you have to understand a poorly-formatted SQL > statement: > > > > I seem to prefer 'full'

Re: [sqlite] How to retrieve table names for the given string

2018-09-28 Thread Revathi Narayanan
I got the output by executing the below query, select * from sqlite_master where sql like '%column name% On Fri, Sep 28, 2018, 11:55 AM Revathi Narayanan wrote: > Thanks Keith.. but I am getting an error while joining pragma table info. > > On Fri, Sep 28, 2018, 6:30 AM Keith Medcalf wrote: >

Re: [sqlite] How to retrieve table names for the given string

2018-09-28 Thread Revathi Narayanan
Thanks Keith.. but I am getting an error while joining pragma table info. On Fri, Sep 28, 2018, 6:30 AM Keith Medcalf wrote: > > Insert the following schema views: > > > -- Catalog Views using sqlite_master for SysObjects (Object Names) > -- and the various pragma_(ObjectName) tables to

Re: [sqlite] How to retrieve table names for the given string

2018-09-28 Thread Revathi Narayanan
Thanks Richard. But I am getting an error like near ( syntax error. Pragma table_info(a.name) On Fri, Sep 28, 2018, 6:21 AM Richard Hipp wrote: > On 9/27/18, Revathi Narayanan wrote: > > Hi, > > > > I have one requirement like I want to display all the table names for the > > given column