Click here to Skip to main content
16,006,013 members
Home / Discussions / Database
   

Database

 
AnswerRe: Help !!! Pin
Colin Angus Mackay11-Sep-05 0:34
Colin Angus Mackay11-Sep-05 0:34 
GeneralRe: Help !!! Pin
WDI11-Sep-05 0:49
WDI11-Sep-05 0:49 
GeneralRe: Help !!! Pin
Colin Angus Mackay11-Sep-05 1:46
Colin Angus Mackay11-Sep-05 1:46 
QuestionStored Procedure - Verification Pin
phokojoe10-Sep-05 2:35
phokojoe10-Sep-05 2:35 
AnswerRe: Stored Procedure - Verification Pin
Colin Angus Mackay10-Sep-05 5:04
Colin Angus Mackay10-Sep-05 5:04 
GeneralRe: Stored Procedure - Verification Pin
phokojoe10-Sep-05 23:56
phokojoe10-Sep-05 23:56 
GeneralRe: Stored Procedure - Verification Pin
Colin Angus Mackay11-Sep-05 0:15
Colin Angus Mackay11-Sep-05 0:15 
GeneralRe: Stored Procedure - Verification Pin
Colin Angus Mackay11-Sep-05 0:21
Colin Angus Mackay11-Sep-05 0:21 
This stored procedure should be a bit easier - no dynamic SQL - but probably a bit more tedious as it is a bit repetative.

CREATE PROCEDURE dbo.GetEmptyColumnNames
@id int
AS
SELECT 'Sex' AS ColumnName 
FROM MyTable 
WHERE (Sex IS NULL OR Sex='..') AND id = @id
UNION
SELECT 'Subject1' AS ColumnName 
FROM MyTable 
WHERE (Subject1 IS NULL OR Subject1='..') AND id = @id
UNION
SELECT 'Subject2' AS ColumnName 
FROM MyTable 
WHERE (Subject2 IS NULL OR Subject2='..') AND id = @id
UNION -- And so on for all the columns in your table that you want to check.
GO


This just performs a number of SELECT statements and UNIONs them all together into one result set.

Does this help?


My: Blog | Photos

"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucious


GeneralRe: Stored Procedure - Verification Pin
phokojoe11-Sep-05 22:11
phokojoe11-Sep-05 22:11 
GeneralRe: Stored Procedure - Verification Pin
Colin Angus Mackay12-Sep-05 1:55
Colin Angus Mackay12-Sep-05 1:55 
QuestionFree Databases Pin
Robert M Greene9-Sep-05 16:56
Robert M Greene9-Sep-05 16:56 
QuestionSQL Restore Mystery Pin
mjackson119-Sep-05 13:06
mjackson119-Sep-05 13:06 
AnswerRe: SQL Restore Mystery Pin
Rahul Walavalkar13-Sep-05 0:11
Rahul Walavalkar13-Sep-05 0:11 
QuestionTimeout Expired The timeout period elapsed prior to completion Pin
Jaffer Mumtaz9-Sep-05 1:22
Jaffer Mumtaz9-Sep-05 1:22 
AnswerRe: Timeout Expired The timeout period elapsed prior to completion Pin
OMalleyW9-Sep-05 1:51
OMalleyW9-Sep-05 1:51 
AnswerRe: Timeout Expired The timeout period elapsed prior to completion Pin
miah alom9-Sep-05 5:39
miah alom9-Sep-05 5:39 
GeneralRe: Timeout Expired The timeout period elapsed prior to completion Pin
Andy Brummer9-Sep-05 5:57
sitebuilderAndy Brummer9-Sep-05 5:57 
GeneralRe: Timeout Expired The timeout period elapsed prior to completion Pin
miah alom9-Sep-05 6:12
miah alom9-Sep-05 6:12 
GeneralRe: Timeout Expired The timeout period elapsed prior to completion Pin
Andy Brummer9-Sep-05 11:28
sitebuilderAndy Brummer9-Sep-05 11:28 
AnswerRe: Timeout Expired The timeout period elapsed prior to completion Pin
OMalleyW9-Sep-05 6:48
OMalleyW9-Sep-05 6:48 
GeneralRe: Timeout Expired The timeout period elapsed prior to completion Pin
miah alom9-Sep-05 7:04
miah alom9-Sep-05 7:04 
GeneralRe: Timeout Expired The timeout period elapsed prior to completion Pin
OMalleyW9-Sep-05 7:34
OMalleyW9-Sep-05 7:34 
GeneralRe: Timeout Expired The timeout period elapsed prior to completion Pin
miah alom9-Sep-05 7:56
miah alom9-Sep-05 7:56 
GeneralRe: Timeout Expired The timeout period elapsed prior to completion Pin
Jaffer Mumtaz11-Sep-05 19:41
Jaffer Mumtaz11-Sep-05 19:41 
GeneralRe: Timeout Expired The timeout period elapsed prior to completion Pin
OMalleyW12-Sep-05 6:32
OMalleyW12-Sep-05 6:32 

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.