brenagwynn: (Default)
[personal profile] brenagwynn
Oracle меня расстроил. Есть у меня aFlags - такой себе table of number(1) index by binary_integer. Так вот:
SELECT   txs.ID taxid
    FROM taxes txs
   WHERE txs.payer = 1
     AND (   ((ID = 1) AND(aFlags(1) <> 0))
          OR ((ID = 2) AND(aFlags(2) <> 0))
          OR ((ID = 3) AND(aFlags(3) <> 0))
          OR ((ID = 4) AND(aFlags(4) <> 0))
         )
ORDER BY txs.sequentialno
- катит
а вот
SELECT   txs.ID taxid
    FROM taxes txs
   WHERE txs.payer = 1 AND aFlags(ID) <> 0
ORDER BY txs.sequentialno
- не катит, рассказывает, что, мол
(1): PLS-00201: identifier 'ID' must be declared
(2): PL/SQL: ORA-00904: : invalid identifier
 
Не, извратимшись, сделал то, что хотел. "Но осадок остался"
From:
Anonymous( )Anonymous This account has disabled anonymous posting.
OpenID( )OpenID You can comment on this post while signed in with an account from many other sites, once you have confirmed your email address. Sign in using OpenID.
User
Account name:
Password:
If you don't have an account you can create one now.
Subject:
HTML doesn't work in the subject.

Message:

 
Notice: This account is set to log the IP addresses of everyone who comments.
Links will be displayed as unclickable URLs to help prevent spam.

Profile

brenagwynn: (Default)
brenagwynn

June 2011

S M T W T F S
   1234
5678 91011
12131415161718
192021 2223 2425
2627282930  

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 26th, 2017 12:37 pm
Powered by Dreamwidth Studios