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)
 want to query all data include in a database

Author  Topic 

PhoeNIx
Starting Member

9 Posts

Posted - 2006-12-04 : 00:47:14
hello, i want to query all data in all table include in a database from running qurey statement in query analyzer. if i have a chance, i want someone to write this query statement for me.

PhoeNIx

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2006-12-04 : 00:52:30
What is the purpose of this? how can you select from all unrelated tables without CROSS JOIN and that does not seems like good solution.

Harsh Athalye
India.
"Nothing is Impossible"
Go to Top of Page

PhoeNIx
Starting Member

9 Posts

Posted - 2006-12-04 : 02:58:17
quote:
Originally posted by harsh_athalye

What is the purpose of this? how can you select from all unrelated tables without CROSS JOIN and that does not seems like good solution.

Harsh Athalye
India.
"Nothing is Impossible"



thank for ur advice. plz have a look at my sample.
eg.USE Northwind
EXEC sp_help

it returns just all objects in Northwind

USE Northwind
EXEC sp_help tableName

it returns just the structure of tableName in Northwind


so i mean as above ways, is there any way to get the data in all tables in Northwind?





Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-12-09 : 06:29:43
Why do you want to get all data from all tables using query?
You should take backup

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

jezemine
Master Smack Fu Yak Hacker

2886 Posts

Posted - 2006-12-09 : 10:28:27
I am guessing maybe what you want is to search all tables in a database for a particular string?

If so here's one way:

http://vyaskn.tripod.com/search_all_columns_in_all_tables.htm


http://www.elsasoft.org
Go to Top of Page

Jeff Moden
Aged Yak Warrior

652 Posts

Posted - 2006-12-09 : 16:21:01
SELECT * FROM INFORMATION_SCHEMA.COLUMNS

--Jeff Moden
Go to Top of Page
   

- Advertisement -