Loading ...
Sorry, an error occurred while loading the content.
 

SQL Search

Expand Messages
  • dadams_retina
    Is there a way to search all my SQL Server tables at once to find out which ones contain the data I need? Basically I want to find any table/column that
    Message 1 of 5 , Oct 31, 2008
      Is there a way to search all my SQL Server tables at once to find out
      which ones contain the data I need? Basically I want to find any
      table/column that contains a record that has "Payment BCBS EFT" in it.
      Is this possible?

      Diana Adams
    • Arnie Rowland
      Yes, it is possible, but it would be an expensive operation. What version of SQL Server are you searching? Regards, Arnie Rowland, MVP (SQL Server) Fortune
      Message 2 of 5 , Nov 1, 2008
        Yes, it is possible, but it would be an 'expensive' operation.

        What version of SQL Server are you searching?


        Regards,

        Arnie Rowland, MVP (SQL Server)

        "Fortune favors the prepared mind." Louis Pasteur

        -----Original Message-----
        From: SQLQueriesNoCode@yahoogroups.com
        [mailto:SQLQueriesNoCode@yahoogroups.com] On Behalf Of dadams_retina
        Sent: Saturday, November 01, 2008 9:59 AM
        To: Arnie
        Subject: [SQLQueriesNoCode] SQL Search

        Is there a way to search all my SQL Server tables at once to find out
        which ones contain the data I need? Basically I want to find any
        table/column that contains a record that has "Payment BCBS EFT" in it.
        Is this possible?

        Diana Adams


        ------------------------------------

        Yahoo! Groups Links







        Disclaimer - November 1, 2008
        This email and any files transmitted with it are confidential and intended solely for SQLQueriesNoCode@yahoogroups.com. If you are not the named addressee you should not disseminate, distribute, copy or alter this email. Any views or opinions presented in this email are solely those of the author and might not represent those of Westwood Consulting, Inc. Warning: Although Westwood Consulting, Inc has taken reasonable precautions to ensure no viruses are present in this email, the company cannot accept responsibility for any loss or damage arising from the use of this email or attachments.
        This disclaimer was added by Policy Patrol: http://www.policypatrol.com/
      • Noman Aftab
        This might help you. http://www.databasejournal.com/features/mssql/article.php/1490661 e.g. Print All table names: exec sp_MSforeachtable print ? Show
        Message 3 of 5 , Nov 2, 2008
          This might help you.
          http://www.databasejournal.com/features/mssql/article.php/1490661

          e.g.
          Print All table names:
          exec sp_MSforeachtable 'print "?"'

          Show number of records in each table:
          exec sp_MSforeachtable 'select count(*) as "?" from ?'
           Noman Muhammad Aftab
          Software Engineer
          Avanza Solutions
          Tel:    +92   21 567 5240 – 42 (ext: 762)
          Fax:   +92   21 567 5244Cell:   +92 333 231 0594
          URL:   http://www.avanzasolutions.comEmail: noman.aftab@...

          --- On Fri, 31/10/08, dadams_retina <dadams@...> wrote:
          From: dadams_retina <dadams@...>
          Subject: [SQLQueriesNoCode] SQL Search
          To: SQLQueriesNoCode@yahoogroups.com
          Date: Friday, 31 October, 2008, 11:41 PM











          Is there a way to search all my SQL Server tables at once to find out

          which ones contain the data I need? Basically I want to find any

          table/column that contains a record that has "Payment BCBS EFT" in it.

          Is this possible?



          Diana Adams





























          [Non-text portions of this message have been removed]
        • Diana Adams
          Thanks! Diana Adams Insurance Specialist NextGen EMR/EPM NCP Retina Associates of Missouri, PC 201 W. Broadway, Bldg 5B Columbia, MO 65203 573-874-1616 (Phone)
          Message 4 of 5 , Nov 3, 2008
            Thanks!



            Diana Adams

            Insurance Specialist

            NextGen EMR/EPM NCP

            Retina Associates of Missouri, PC

            201 W. Broadway, Bldg 5B

            Columbia, MO 65203

            573-874-1616 (Phone)

            573-875-0300 (Fax)

            dadams@...

            ________________________________

            From: SQLQueriesNoCode@yahoogroups.com
            [mailto:SQLQueriesNoCode@yahoogroups.com] On Behalf Of Noman Aftab
            Sent: Monday, November 03, 2008 1:05 AM
            To: SQLQueriesNoCode@yahoogroups.com
            Subject: Re: [SQLQueriesNoCode] SQL Search



            This might help you.
            http://www.databasejournal.com/features/mssql/article.php/1490661
            <http://www.databasejournal.com/features/mssql/article.php/1490661>

            e.g.
            Print All table names:
            exec sp_MSforeachtable 'print "?"'

            Show number of records in each table:
            exec sp_MSforeachtable 'select count(*) as "?" from ?'
            Noman Muhammad Aftab
            Software Engineer
            Avanza Solutions
            Tel: +92 21 567 5240 - 42 (ext: 762)
            Fax: +92 21 567 5244Cell: +92 333 231 0594
            URL: http://www.avanzasolutions.comEmail:
            <http://www.avanzasolutions.comEmail:> noman.aftab@...
            <mailto:noman.aftab%40avanzasolutions.com>

            --- On Fri, 31/10/08, dadams_retina <dadams@...
            <mailto:dadams%40retinamo.com> > wrote:
            From: dadams_retina <dadams@... <mailto:dadams%40retinamo.com>
            >
            Subject: [SQLQueriesNoCode] SQL Search
            To: SQLQueriesNoCode@yahoogroups.com
            <mailto:SQLQueriesNoCode%40yahoogroups.com>
            Date: Friday, 31 October, 2008, 11:41 PM

            Is there a way to search all my SQL Server tables at once to find out

            which ones contain the data I need? Basically I want to find any

            table/column that contains a record that has "Payment BCBS EFT" in it.

            Is this possible?

            Diana Adams











            [Non-text portions of this message have been removed]





            [Non-text portions of this message have been removed]
          • Agent Orange
            you can create a stored procedure.. 1. get all table 2. loop on each table 3. get all colum of table 4. fire your search string for each column. i dont think
            Message 5 of 5 , Nov 4, 2008
              you can create a stored procedure..

              1. get all table
              2. loop on each table
              3. get all colum of table
              4. fire your search string for each column.

              i dont think one statement can do such thing :)

              AgEnT^^^OrAnGe

              My Greatest Fear is to stop Learning....

              Proud to be a Pinoy Expat...

              http://www.nhowetech.com/

              --- On Sat, 11/1/08, dadams_retina <dadams@...> wrote:
              From: dadams_retina <dadams@...>
              Subject: [SQLQueriesNoCode] SQL Search
              To: SQLQueriesNoCode@yahoogroups.com
              Date: Saturday, November 1, 2008, 2:41 AM











              Is there a way to search all my SQL Server tables at once to find out

              which ones contain the data I need? Basically I want to find any

              table/column that contains a record that has "Payment BCBS EFT" in it.

              Is this possible?



              Diana Adams





























              [Non-text portions of this message have been removed]
            Your message has been successfully submitted and would be delivered to recipients shortly.