id,summary,reporter,owner,description,type,status,component,version,severity,resolution,keywords,cc,stage,has_patch,needs_docs,needs_tests,needs_better_patch,easy,ui_ux 21001,Non working SQL generated for Oracle when doing .exclude(''),greenRocker,nobody,"I have a query to exclude all entries with an empty char field. This works as expected on sqlite and Postgres, but fails on Oracle. On Oracle the exclude does not exclude a single item. {{{ valid_accounts = get_bank_accounts().exclude(account_number='') }}} SQL generated for Postgres looks like this (the exclude part only): {{{ AND NOT (""accounts"".""account_number"" = )) }}} On Oracle, it looks like this: {{{ AND NOT ((""ACCOUNTS"".""ACCOUNT_NUMBER"" IS NULL AND ""ACCOUNTS"".""ACCOUNT_NUMBER"" IS NOT NULL)) }}} So, in order to work on Oracle, I have to resort to: {{{ valid_accounts = get_bank_accounts().filter(account_number__gte=1) }}} ",Bug,closed,"Database layer (models, ORM)",1.4,Normal,fixed,oracle,Simon Charette,Accepted,1,0,0,0,0,0