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

Database

 
Questionstored procedures problem in SQL Server 2000 Pin
pankajgarg1222-Apr-06 21:40
pankajgarg1222-Apr-06 21:40 
AnswerRe: stored procedures problem in SQL Server 2000 Pin
Colin Angus Mackay22-Apr-06 22:38
Colin Angus Mackay22-Apr-06 22:38 
AnswerRe: stored procedures problem in SQL Server 2000 Pin
dadax_8523-Apr-06 2:38
dadax_8523-Apr-06 2:38 
QuestionSqlParameter Pin
WDI22-Apr-06 19:40
WDI22-Apr-06 19:40 
AnswerRe: SqlParameter Pin
Colin Angus Mackay23-Apr-06 0:12
Colin Angus Mackay23-Apr-06 0:12 
QuestionUpdate Database through Dataset using DataAdapter? Pin
MudkiSekhon21-Apr-06 21:20
MudkiSekhon21-Apr-06 21:20 
QuestionTextBox databinding Problem Pin
wasife21-Apr-06 19:36
wasife21-Apr-06 19:36 
GeneralDocument SQLServer Indexes Pin
Tim Carmichael21-Apr-06 5:52
Tim Carmichael21-Apr-06 5:52 
Recently, I 'inherited' an application using SQLServer... I was asked to document what tables have indexes, etc. and what they are...

Like most programmers, I HATE repetitive work, so, after much digging, the following statement has been created to list table index attributes.

Hopefully, it will save someone else the pain I endured...

select O.name, I.name, c.name, case isnull(c.autoval,0) when 0 then 'No' else 'Yes' end AutoVal,
Nullable = case isnullable when 0 then 'No' else 'Yes' end,
CASE
WHEN I.status & 2 = 2 THEN 'Yes'
ELSE 'No'
END AS is_unique,
CASE
WHEN I.status & 16 = 16 THEN 'Yes'
ELSE 'No'
END AS is_clustered,
CASE
WHEN I.status & 2048 = 2048 THEN 'Yes'
ELSE 'No'
END AS is_PK_CNS,
CASE
WHEN I.status & 4096 = 4096 THEN 'Yes'
ELSE 'No'
END AS is_UNQ_CNS
from sysindexes I
inner join sysobjects O ON I.id = O.ID
inner join sysindexkeys K ON I.id = K.ID AND I.INDID = K.INDID
inner join syscolumns C ON K.colid = C.colid and c.id = o.id
inner join sysobjects IO on i.name = io.name
WHERE O.Type = 'U'
and i.name not like '_wa%'
order by 1, 2 desc, 3
GeneralRe: Document SQLServer Indexes Pin
Paul Brower21-Apr-06 6:00
Paul Brower21-Apr-06 6:00 
QuestionSearching Capabilities Pin
Usman Tasleem Akshaf21-Apr-06 2:25
Usman Tasleem Akshaf21-Apr-06 2:25 
AnswerRe: Searching Capabilities Pin
Colin Angus Mackay21-Apr-06 2:36
Colin Angus Mackay21-Apr-06 2:36 
QuestionSQL 2000 RS Help needed! Pin
Hans Vergouwen21-Apr-06 0:16
Hans Vergouwen21-Apr-06 0:16 
QuestionSuggestions for JOINs for audit tables Pin
Daire Cunningham20-Apr-06 23:20
Daire Cunningham20-Apr-06 23:20 
Questionpassing paramter to sp_ExecuteSql Pin
rohitgraycell20-Apr-06 23:12
rohitgraycell20-Apr-06 23:12 
AnswerRe: passing paramter to sp_ExecuteSql Pin
Colin Angus Mackay21-Apr-06 1:11
Colin Angus Mackay21-Apr-06 1:11 
QuestionBackup on 2005 and restore on 2000 Pin
phimix20-Apr-06 21:56
phimix20-Apr-06 21:56 
QuestionSQL select Statement Pin
alexfromto20-Apr-06 6:26
alexfromto20-Apr-06 6:26 
AnswerRe: SQL select Statement Pin
Eric Dahlvang20-Apr-06 8:39
Eric Dahlvang20-Apr-06 8:39 
GeneralRe: SQL select Statement Pin
alexfromto21-Apr-06 2:49
alexfromto21-Apr-06 2:49 
AnswerRe: SQL select Statement Pin
Luis Alonso Ramos20-Apr-06 15:57
Luis Alonso Ramos20-Apr-06 15:57 
QuestionHow to make Web Application more Secure in Asp.Net???? Pin
pal_vaidya20-Apr-06 4:14
pal_vaidya20-Apr-06 4:14 
Question[FYI]Service pack release for both Server and Express edition of SQL2005 Pin
Jerry Hammond20-Apr-06 4:12
Jerry Hammond20-Apr-06 4:12 
AnswerRe: [FYI]Service pack release for both Server and Express edition of SQL2005 Pin
Paul Conrad20-Apr-06 4:45
professionalPaul Conrad20-Apr-06 4:45 
Question????How to do it???? Pin
papa198020-Apr-06 1:32
papa198020-Apr-06 1:32 
Question[SQL Server] Alter a function which is used as a column default Pin
Duncan Edwards Jones20-Apr-06 1:16
professionalDuncan Edwards Jones20-Apr-06 1:16 

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.