Hi,
I am trying to create a select query which will show me only the records which have a value in 2 fields. I have tried the below and it seems to work okay except that i am still getting some records which have an 'empty' Text17. In the example below I do not expect to see the 2nd and 3rd record. (there are 4 columns here, RAM_PROCESS_CTR; RAM_ID; TEXT16; TEXT17 and the values in Text16 and Text17 will be numerical, record 1 & 4 have the values 1 & 2 in text16 + text17 and records 2 & 3 have only value 1 in text16)
RAM_PROCESS_CTR | RAM_ID | TEXT16 | TEXT17
255029 | RPP00476 | 1 | 2
255030 | RPP00477 | 1 |
255031 | RPP00478 | 1 |
255032 | RPP00479 | 1 | 2
Script:
SELECT [RAM_PROCESS_CTR]
,[RAM_ID]
,[TEXT16]
,[TEXT17]
FROM [probeta].[dbo].[RAMAPPLICATIONPROCESS]
Where RAM_ID like 'RPP%' and
STATUS = 'C' and
((
TEXT16 IS NOT NULL or
TEXT16 <> ''
)
and
(
TEXT17 IS NOT NULL or
TEXT17 <> ''
))
I have not been able to figure out what I am doing wrong here. Any help would be appreciated.
Thank you
I am trying to create a select query which will show me only the records which have a value in 2 fields. I have tried the below and it seems to work okay except that i am still getting some records which have an 'empty' Text17. In the example below I do not expect to see the 2nd and 3rd record. (there are 4 columns here, RAM_PROCESS_CTR; RAM_ID; TEXT16; TEXT17 and the values in Text16 and Text17 will be numerical, record 1 & 4 have the values 1 & 2 in text16 + text17 and records 2 & 3 have only value 1 in text16)
RAM_PROCESS_CTR | RAM_ID | TEXT16 | TEXT17
255029 | RPP00476 | 1 | 2
255030 | RPP00477 | 1 |
255031 | RPP00478 | 1 |
255032 | RPP00479 | 1 | 2
Script:
SELECT [RAM_PROCESS_CTR]
,[RAM_ID]
,[TEXT16]
,[TEXT17]
FROM [probeta].[dbo].[RAMAPPLICATIONPROCESS]
Where RAM_ID like 'RPP%' and
STATUS = 'C' and
((
TEXT16 IS NOT NULL or
TEXT16 <> ''
)
and
(
TEXT17 IS NOT NULL or
TEXT17 <> ''
))
I have not been able to figure out what I am doing wrong here. Any help would be appreciated.
Thank you