Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 SQL Query help

Author  Topic 

itsonlyme4
Posting Yak Master

109 Posts

Posted - 2007-06-12 : 10:46:17
SQL Query question.

what if I know what data I what to find in a database, but I don't know the table...

Do I have to do joins or something?

nr
SQLTeam MVY

12543 Posts

Posted - 2007-06-12 : 10:49:56
You would have to search each table in the database for it.
Means a loop and dynamic sql using the system tables and probably a long wait.


==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

itsonlyme4
Posting Yak Master

109 Posts

Posted - 2007-06-12 : 10:55:26
Thanks! I searched this forum again and found this:

http://vyaskn.tripod.com/search_all_columns_in_all_tables.htm
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2007-06-12 : 10:59:16
I usually do in order of table size so that the few large tables are last - and also write it sio that it will continue where it left off.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -