Click here to Skip to main content
15,913,939 members
Home / Discussions / Database
   

Database

 
QuestionManipulating the DataSet Index Pin
watagal12-Sep-05 13:16
watagal12-Sep-05 13:16 
AnswerRe: Manipulating the DataSet Index Pin
Frank Kerrigan13-Sep-05 3:05
Frank Kerrigan13-Sep-05 3:05 
QuestionMSDE Pin
Ahsan Askare12-Sep-05 1:56
Ahsan Askare12-Sep-05 1:56 
AnswerRe: MSDE Pin
rwestgraham12-Sep-05 6:21
rwestgraham12-Sep-05 6:21 
AnswerRe: MSDE Pin
Luis Alonso Ramos12-Sep-05 14:14
Luis Alonso Ramos12-Sep-05 14:14 
QuestionThe question about DataView.Filter Pin
dreamwinter11-Sep-05 19:24
dreamwinter11-Sep-05 19:24 
AnswerRe: The question about DataView.Filter Pin
miah alom12-Sep-05 3:13
miah alom12-Sep-05 3:13 
QuestionHelp !!! Pin
WDI10-Sep-05 22:14
WDI10-Sep-05 22:14 
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 
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 
I notice that you are putting things like
SELECT 'a1' AS A1...
SELECT 'a2' AS A2...

Remember this is UNIONing all these into one set so it might confuse it* if you give all these different column names, they are supposed to be returning the result into a single column

So, my first suggestion (and its a long shot) is to ensure that the A1, A2, A3 are all the same column name (If I remember I said ColumnName)

DROP PROCEDURE dbo.GetEmptyColumnNames
 
CREATE PROCEDURE dbo.GetEmptyColumnNames
@id numeric
AS
Select 'a1' as ColumnName
FROM hhdata
WHERE (a1 IS NULL Or a1='..') AND refno = @id
UNION
Select 'a2' as ColumnName
FROM hhdata
WHERE (a2 IS NULL Or a2='..') AND refno = @id
UNION
Select 'a3' as ColumnName
FROM hhdata
WHERE (a3 IS NULL Or a3='.') AND refno = @id



phokojoe wrote:
where 043701137010041 is a record in the refno and of course there are many records in the refno column, I thought it will return all the column names in that 043701137010041 which are null or '..'. Infact that is what I want to see.

I'm getting confused by your terminology.

"043701137010041 is a record in the refno" --> a column value in the refno column??
"there are many records in the refno column" --> there are many rows with the same refno??? (A column does not contain records, it contains values)



* DISCLAIMER: I've never thought of putting different column names here, so I don't know what the result would be, but it could explain why you only get the first result back.


My: Blog | Photos

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


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 

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.