Click here to Skip to main content
16,005,697 members
Home / Discussions / Database
   

Database

 
AnswerRe: Sql Server Pin
Colin Angus Mackay18-Apr-06 1:48
Colin Angus Mackay18-Apr-06 1:48 
GeneralThank u Pin
Krishnatv18-Apr-06 2:30
Krishnatv18-Apr-06 2:30 
QuestionProblem Printing Labels using SQL 2000 Reporting Services Pin
slave11e18-Apr-06 0:15
slave11e18-Apr-06 0:15 
AnswerRe: Problem Printing Labels using SQL 2000 Reporting Services Pin
Darpan Gogia18-Apr-06 23:18
Darpan Gogia18-Apr-06 23:18 
Questionsql table index (SQL2005) Pin
Sk8tzz17-Apr-06 23:43
Sk8tzz17-Apr-06 23:43 
AnswerRe: sql table index (SQL2005) Pin
Colin Angus Mackay17-Apr-06 23:59
Colin Angus Mackay17-Apr-06 23:59 
GeneralRe: sql table index (SQL2005) Pin
Sk8tzz18-Apr-06 0:03
Sk8tzz18-Apr-06 0:03 
AnswerRe: sql table index (SQL2005) Pin
Eric Dahlvang19-Apr-06 3:59
Eric Dahlvang19-Apr-06 3:59 
Why not use sp_helpindex?

DECLARE tnames_cursor CURSOR
FOR
   SELECT TABLE_NAME 
   FROM INFORMATION_SCHEMA.TABLES
OPEN tnames_cursor

CREATE TABLE #TempIndexes (table_name varchar(255),index_name varchar(255),index_description varchar(255),index_keys nvarchar(2126))
CREATE TABLE #TempHoldIndexes (index_name varchar(255),index_description varchar(255),index_keys nvarchar(2126))

DECLARE @tablename sysname
FETCH NEXT FROM tnames_cursor INTO @tablename
WHILE (@@FETCH_STATUS <> -1)
BEGIN
   IF (@@FETCH_STATUS <> -2)
   BEGIN   
	SELECT @tablename = RTRIM(@tablename)
	INSERT #TempHoldIndexes EXEC sp_helpindex @tablename
	
	INSERT #TempIndexes SELECT @tablename, index_name,index_description,index_keys FROM #TempHoldIndexes
	DELETE FROM #TempHoldIndexes
   END
   FETCH NEXT FROM tnames_cursor INTO @tablename
END
CLOSE tnames_cursor
DEALLOCATE tnames_cursor

SELECT * FROM #TempIndexes
DROP TABLE #TempIndexes
DROP TABLE #TempHoldIndexes


----------
There go my people. I must find out where they are going so I can lead them.
- Alexander Ledru-Rollin

AnswerRe: sql table index (SQL2005) Pin
Eric Dahlvang19-Apr-06 4:01
Eric Dahlvang19-Apr-06 4:01 
GeneralRe: sql table index (SQL2005) Pin
Sk8tzz19-Apr-06 18:59
Sk8tzz19-Apr-06 18:59 
Questionintegrating 2 sql results Pin
dansoft17-Apr-06 18:21
dansoft17-Apr-06 18:21 
AnswerRe: integrating 2 sql results Pin
Colin Angus Mackay17-Apr-06 20:50
Colin Angus Mackay17-Apr-06 20:50 
GeneralRe: integrating 2 sql results Pin
dansoft18-Apr-06 4:30
dansoft18-Apr-06 4:30 
GeneralRe: integrating 2 sql results Pin
Darpan Gogia18-Apr-06 23:24
Darpan Gogia18-Apr-06 23:24 
GeneralRe: integrating 2 sql results Pin
dansoft19-Apr-06 2:40
dansoft19-Apr-06 2:40 
GeneralRe: integrating 2 sql results Pin
Darpan Gogia19-Apr-06 2:42
Darpan Gogia19-Apr-06 2:42 
GeneralRe: integrating 2 sql results Pin
dansoft19-Apr-06 2:55
dansoft19-Apr-06 2:55 
GeneralRe: integrating 2 sql results Pin
Darpan Gogia19-Apr-06 3:00
Darpan Gogia19-Apr-06 3:00 
GeneralRe: integrating 2 sql results Pin
dansoft19-Apr-06 3:11
dansoft19-Apr-06 3:11 
QuestionRe: integrating 2 sql results Pin
dansoft19-Apr-06 3:40
dansoft19-Apr-06 3:40 
AnswerRe: integrating 2 sql results Pin
Darpan Gogia19-Apr-06 3:56
Darpan Gogia19-Apr-06 3:56 
GeneralRe: integrating 2 sql results Pin
dansoft19-Apr-06 4:19
dansoft19-Apr-06 4:19 
GeneralRe: integrating 2 sql results Pin
dansoft19-Apr-06 6:03
dansoft19-Apr-06 6:03 
QuestionSql 2000 'text' datatype Pin
karinb17-Apr-06 9:52
karinb17-Apr-06 9:52 
AnswerRe: Sql 2000 'text' datatype Pin
Eric Dahlvang17-Apr-06 10:18
Eric Dahlvang17-Apr-06 10:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.