• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

Oracle DB query logic question..

mcplaayer

n00b
Joined
Dec 29, 2004
Messages
59
I have a query that is similar to this:

Code:
PRODUCT='YYY' AND VERSION='XXX' 
	AND 
	(
		TARGET_VERSION in ('50mp1','5.0MP1')
	)
	AND
	(
		(
			USER_DEFINED_LIST not in ('CVR','VVR') 
		
		) 
		OR
		(
			USER_DEFINED not in ('VVR','VRAS')
		)
	)

For some reason, when I specify 'not in' , it doesn't return entries that have empty strings for the field: USER_DEFINED and USER_DEFINED_LIST. Is this something that Oracle implements to confuse me or is there something wrong with my logic?
 
Code:
baninst1: PRGM> SELECT 8
  2  FROM DUAL
  3  WHERE NULL IN (1,2,3);

no rows selected

Elapsed: 00:00:00.00
baninst1: PRGM> select 8
  2  from dual
  3  where null not in (1,2,3);

no rows selected

Elapsed: 00:00:00.00

Most operators (and many functions) return null when given a null. Null or null = null. null and anything = null.

NVL() is your friend. Just remember that the empty string is also a null.
 
Back
Top