[b]Parameter with logical operator.[/b]

I have where clause in SQL like this :
WHERE (Date#1 = '31-JAN-2005' AND Date#2 BETWEEN '01-JAN-2005' AND '31-JAN-2005')
OR (Date#1 = '28-FEB-2005' AND Date#2 BETWEEN '01-FEB-2005' AND '28-FEB-2005')
OR (Date#1 = '31-MAR-2005' AND Date#2 BETWEEN '01-MAR-2005' AND '31-MAR-2005')
I will enter the value of column Date#1 in the range value such as Date#1 between '31-JAN-2005' and '31-MAR-2005'.
How to use parameters with this WHERE clause?
Note: Date#1, Date#2 is the column in the table.
S. Vilas

Vilas,
You can implement this by using 3 parameters (one for Date#1 i.e., Date1; and two for Date#2 i.e., Date2From and Date2To) and a condition (i.e., Cond1):
1)Date1: For Item "Date#1", with "=" condition operator
2)Date2From: For Item "Date#2", with "=" condition operator
3)Date2To: For Item "Date#2", with "=" condition operator
4)Cond1: Item "Date1", condition "=", values ":Date1"; Group "OR"; Item "Date#2", Condition "Between" Values :Date2From and:Date2To
Best wishes.
Zahid

Similar Messages

  • Regular expression evaluation with logical operator

    Hi All,
    I am bit confuse with expression evaluation with logical operator. I am trying to understand below expression.
    eXa.getTrue() && eXa.getFalse() || eXa.getFalse() && eXa.getTrue() || eXa.getFalse() comes as false and True Count: 1 False Count: 3
    As per understanding it should be true with True Count: 1 False Count: 3
    it should execute 1st getTrue() and then 1stGetFalse() and then 2nd getfalse() and should skip 2nd getTrue() and execute 3rd fetFalse()
    eXa.getTrue() && eXa.getTrue() || eXa.getFalse() && eXa.getTrue() || eXa.getFalse() comes as true and True Count: 2 False Count: 0
    As per understanding it should be true with True Count: 3 False Count: 0
    it should execute 1st 2 getTrue() and skip 1st getFalse() and then execute 3rd getTrue() and skip last getFalse().
    eXa.getTrue() || eXa.getFalse() && eXa.getFalse() || eXa.getTrue() && eXa.getFalse() comes as true and True Count: 1 False Count: 0
    As per understanding it should be true with True Count: 2 False Count: 2
    it should execute 1st getTrue() and skip 1st getFalse() and then execute 2nd getFalse() and then execute 2nd getTrue() and then 3rd getFalse()
    Please help me to understand above expressions.
    Here is the methods definition:
    private boolean getTrue() {
              trueCount++;
              boolean retrunValue = 4 > 3;
              return retrunValue;
    private boolean getFalse() {
              falseCount++;
              boolean retrunValue = 3 > 4;
              return retrunValue;
    Thanks for ur help

    >
    adding parenthesis to make order of ops more obvious. adding "?" to show un-executed calls.
    (eXa.getTrue() && eXa.getFalse()) || (eXa.getFalse() && eXa.getTrue()) || eXa.getFalse()  comes as false and True Count: 1 False Count: 3
    (T && F) = F
    (F && ?) = F
    (F) = F
    F || F || F = F
    (eXa.getTrue() && eXa.getTrue()) || (eXa.getFalse() && eXa.getTrue()) || eXa.getFalse()  comes as true and True Count: 2 False Count: 0
    (T && T) = T
    (? && ?) = ?
    (?) = ?
    T || ? || ? = T
    eXa.getTrue() || (eXa.getFalse() && eXa.getFalse()) || (eXa.getTrue() && eXa.getFalse())  comes as true and True Count: 1 False Count: 0
    (T) = T
    (? && ?) = ?
    (? && ?) = ?
    T || ? || ? = T

  • Issue with logical operator using SetEnvIF in OHS

    We have a requirement to set constant value in ssl.conf (OHS) based on Request_URI & referrer. For example, if (Request_URI=/forms/base/login) and (Referer=http://example.com), then we need to set variable value with 1. Similarly we some more conditions. I am trying to use 'SetEnvIf', but it is not allowing to use logical operations (and, or, &, |).
    Can any let us know in resolving issues?

    Just to confuse matters, this problem is intermittent and I haven't been able to successfully replicate it in our Test environment.
    That would seem to indicate something else was going on in the DB that was interfering with the clear, but the logs aren't showing any errors, locks, etc that could have caused the problem.

  • Url with logical operator for filter

    hi all,
    maybe its a stupid question, but I didn't find any
    answer for this and I need urgent help:
    How do we build URLs with filter for more than 1 value.
    Is there a way to combine with Operators like AND / OR ??
    e.g something like this:
    url=url+"&FILTER_IOBJNM_2=ZZZD&FILTER_VALUE_2=(A OR B);
    how is this correctly solved ? May someone give me an example URL ?
    Thanks a lot.

    I am not too sure if you can do an OR in restricting a query either.
    For multiple values as restrictions - AND condition
    &FILTER)IOBJNM_1=ZCUSTOMER&FILTER_VALUE_1=SDN&FILTER_IOBJNM_2=ZCUSTOMER&FILTER_VALUE_2=SAP AND SO ON.
    I am not too sure but there must be a way to pass the range.
    For OR condition at runtime I am not sure if it is possible , I think you could exclude values but I am not too sure if it can be done either... anyone ?
    Arun

  • Unable to drill down with binary logical operation issues

    QSError: 10058] A general error has occurred. [nQSError: 59001] Binary logical operation is not permitted on Double operand(s) (S1000)
    Basically this comes from my drill down report. I have 2 hierarchies on one report, 3 columns --- months, state, measures..
    If I drill down from STate ----> lowest, then drill month--->lowest, things works fine; but if I start with month---> lowest, then drill state down, I will get this above error..
    I checked the column data types from DB, month is char, week is date, state is char, measure is double
    SO let me know what you think?
    Thanks

    is it helpful?
    On Paass Navigation for another report

  • The Problems With Logic (as I see them) - PART TWO!

    Hello again,
    It seems to be a tradition now that as I compose on a track, I keep a text editor open so that I can jot down all the annoyances and problems that I encounter during my creative process... Anyone who missed the previous edition of this topic, please visit PART ONE, here:
    http://discussions.apple.com/message.jspa?messageID=3605456#3605456
    That said, here I give you "The Problems With Logic Part II":
    1. Logic should clear the playback buffer everytime you play. Quite often you start playing and there is trailing reverb/note events from various audio instruments and plug-ins.
    2. The sample edtor "save selection as" has no memory of where you previously were in the file browser.
    3. If you double click on a wave form, the sample editor opens up with the wave form you double clicked on... Great.. But now, if you go and double click on another wave form somewhere, it just takes you back to the sample editor with the same previous wave form selected (not great). This is incredibly annoying if you are attempting to save out certain edits-- Quite often you will end up saving 5 or 6 of the same exact waveform, thinking you were saving each individual one. GRR!
    4. Key commands.. if you try to assign a key command to something that is already used by another feature, you are presented with a window warning you that it already exists.. If you click cancel, then you can no longer enter any keys in the key field.. You are forced to close the key commands preferences window and start over.
    5. Key command window: You should be able to search by command.. For example, if I want to find out what "o" is assigned to, I should be able to search by O-- Further, you should be able to sort the key commands by clicking the column titles "key", "command" -- or "midi"... After all, we can sort by name, date, size, etc in the finder by clicking on these column titles.
    6. Tempo Tap feature-- I am quite confused by this. There should be a simple way to tap and define a tempo. When ever i try to do this, the tempo is only temporarily changed until I stop playing, and most of the time I get error alerts about trying to sync audio and midi (mind you, when there are absolutely no parts in the entire arrange window). The manual states that with "tempo recording" checked on the tempo interpreter window, that the taps will record tempo changes, but this does not work. I tried doing this, tapping the key command I defined to tempo tap (ctrl-shift-t), and I was tapping at various speeds-- many taps fast.. and Logic recorded tempos of 99-101bpm.. I was tapping atleast around 175-180bpm. I then tried tapping slowing, and Logic recorded tempos of 99-101 again... so this feature obviously is full of bugs.
    7. When loading songs, as soon as various plugins such as Kontakt, exs24 begin loading samples, it brings logic to the front. If you're working in the background in other applications while waiting for your songs to load, you are rudely interrupted from what you're doing (such as, selecting from a menu, typing a document, etc) only to be forced to watch a status bar fill up.. and then all key presses at that point become error beeps.
    8. Logic's sample memory easily becomes messed up and crazy. Quite often when using AU instruments such as BFD, Culture, and even Synthogy's Ivory. I will switch to that particular track to play on my keyboard, and each sample will be full of horrible pops and clicks-- the kind that destroy speakers. Other times, in a sample of a string for instance, all of a sudden after one second will be a pop and then the sample will be playing at a completely different pitch... I have to remove the AU instrument and reload it at this point.. This happens quite often. Logic should offer a 'buffer reset' so that you can just flash plugins but they reload whatever preset they were set to.
    9. Volume faders resolution are lame! There is no reason why you shouldnt be able to access +1.0, +1.1, +1.2, +1.3, +1.4, +1.5, +1.6, +1.7, +1.8, +1.9... Further the display is only so wide and you can't even read the decimal values for numbers -10 and lower. They just appear as 10.
    10. When a movie is open, and you are viewing the video output via FIREWIRE, there is a mini-floating window which contains the smpte, position, and movie start information-- However you cannot modify any of these values. You have to switch video output back to "WINDOW" to change the start position of the movie. This is obviously a bug.
    11. Changing the movie's start time is very user unfriendly. There should be a simple way to specify to start at a moment of time relative to SMPTE-- So you can just say "+9:15" for example, and it would take you in 9 minutes and 15 seconds, rather than how it is now where you have to think backwards from SMPTE code and subtract.
    12. You cannot view video as a window AND output to firewire. There is no reason why you shouldn't be able to do this. For example, if I wanted to output my video to a monitor in a vocal booth-- I can do this.. but I can't see what the vocalist is seeing on my own screen! This is just nonsense. You should be able to output to the screen (desktop mode or floating window) as well as an external firewire device.
    13. Saving a song with a movie open should mean that when you load that song, the movie should be up and exactly as it was prior to saving. As it is now you have to select "open movie again".
    14. There is still definitely a bug in track automation-- this was really bad back in version 4, but there is still something not quite right here where starting playback will not always guarantee that the automation data is being read.. And in my experiences it results in volumes being incorrect until you stop and play again, and in some cases it will not work at all unless you plot some automation points. This is an intermittent issue-- but quite often activated by placing an audio region from the audio window on a track (SEE VIDEO).
    WATCH VIDEO OF THIS BUG:
    http://collinatorstudios.com/www/logicbugs/logicautomationbug.mov
    15. In the arrange window, sometimes when zoomed in tightly, all parts on a track are selected, and you think that only the part that you are looking at is selected.. you move this part, and now all of your parts are off. Logic should have some kind of visual aid to let you know when ever you are moving multiple selections... Something like, the parts you are moving will highlight a dfferent color or something... This is a similar problem I have with the loop area of the screen.. You can accidentally turn it on when in the matrix window, and have no idea unless you look down at the transport, but with me for example, my transport is at the very bottom of the screen and I am not looking there most of the time.
    16. Automation data, when two points are semi-close to each other, suddenly the value of the data is no longer shown.. I can understand that when you are zoomed out, and there is simply no space for this to visually appear, that's appropriate. But as it is now, it doesn't display this information when there is plenty of space for it to be visible.
    17. Logic should let you set audio track inputs to the various outputs (1-2, 3-4, etc) and buses.
    18. clicking on a track selects ALL parts. This is so so so annoying. How many times have I been editing voice over, and selecting a track, thinking I am shrinking the length of a part, and to find that ALL parts have been shrunk.. SO ANNOYING!!!! This needs to not happen, and there should be a simple way to right-click a track and it will have an option "select all regions"... also, when you click on a track and all parts are selected, if you horizontally zoom, logic zooms into the beginning of the track, rather than the song locator. I don't know what the LOGIC behind this is, but it's not very helpful, it actually is very frustrating.. Zooming should always move towards the song locator position.
    19. EXS 24 should have a "reverse/backwards" button so that samples played are backwards.
    20. Logic should offer a way to globally increase or decrease a specific automation type (especially volume) globally for all tracks... So if you have detailed crescendos that start at -3.8 and end at +1.6, you can add 3db to this and it will now be at 0.8 and end at 4.6.
    21. If you have multiple tracks of the same track (such as three Audio track #1's)-- say you are recording guitar parts, and just copying the track and muting the previous track as a method of maintaining multiple takes for later auditioning. If you draw automation volume data on this track (it appears on all 3 tracks), and then if you delete the audio from one of the muted tracks and tell logic to KEEP it, suddenly all automation data is gone. GRR!!!
    22. Several times I have opened Kontakt, and attempted to load an instrument while outputting a movie via firewire video to my monitor. As soon as I try to load the instrument, the firewire video output on my monitor goes crazy, and then comes back on.. Logic then crashes. This has happened 3 times randomly...
    23. UNDO does not work on every function. for example, if you change an output to bus 1 instead of 1-2, you cannot undo this. Undo should undo whatever the last command was, no matter what it was. This is what the word LOGICal is supposed to represent.
    24. Floating windows (as in plugin windows) should close with apple-w!!!
    25. *BUG* If you are in a part that is say 10 measures long, zoom in horizontally 100% in the matrix window-- You then isolate one specific quarter note pitch in the middle of this measure, and have cycle turned on, looping over this one quarter note, if you are not looking at this note event/loop region when you hit play, the display will jump to the beginning of the part and never show you this note event as it loops. However if you have the note event on screen when you hit play, then it will behave properly. This makes it extremely difficult and frustrating to perform detailed hyper-draw work. (SEE VIDEO)
    WATCH VIDEO OF THIS BUG:
    http://collinatorstudios.com/www/logicbugs/logicloopbug.mov
    26. *BUG* Host Automation is not accurate. I assigned Kontakt's tune knob to C#000, and If I place a dip, the knob begins to move way before the automation data is even present.... So basically what I was trying to do, can't even be accomplished because Logic screws everything up by pitching the instrument too early... Such a shame.. By the way, I previously mentioned the importance of being able to display part data in the arrange window as matrix data (horizontal lines) rather than score data. Someone argued what good this would do-- Well this is a perfect example, if I am attempting to affect a particular section of a note with automation, I can't possible visually see where this is because the length is not described by the current score representation. Having a horizontal representation would solve this problem... (SEE VIDEO)
    WATCH VIDEO OF THIS BUG:
    http://collinatorstudios.com/www/logicbugs/logicctrlchngbug.mov
    27. There should be a way to convert stereo samples to mono in the sample editor.
    28. When you view "as text" in the environmentt, you cannot drag an object to the arrange window-- Such as to create a bus track.. Now mind you I don't know why you can't just select "BUS" when editing a track in the arrange window in the first place, however there is no reason why 'view as text' should behave differently than when it's viewed as icons.
    29. When you drag a bus from the environment to the arrange window, it replaces whatever track was there. It should ADD a track instead of replace-- atleast there should be a preference for how this behaves.
    30. Occasionally when dragging a bus from the environment, there is some visual garbage in the track automation (see screenshot).
    31. There should be a way to LOAD and SAVE selections in the arrange window. Quite often when editing audio from a countless number of parts/regions, it becomes painful when you have to select and move 100s of audio files. There should be a way that you can just select a ton of regions and save that selection, and reload it at anytime. There are a few 'select' tools/options under the edit window, however they are song specific-- not track specific. So they are completely usesless for what I need.
    32. Logic should offer a feature to collect sysex data from midi devices so that patch names show up and can be selected via program change.
    33. When no track or part is selected, and you vertically zoom in, Logic should zoom into the center most track.. It behaves very oddly and zooms in more towards the top. This becomes extremely annoying when dealing with a sequence involving 100 tracks, and a part is selected but you scroll far below where the part is.. When you begin to zoom in, it takes you towards the selected part, yet it's not displayed on the screen and you have no reference for what you are even looking at. The rule should be this: If the part is on the screen, zooming vertically will bring you to it. If it's off the screen, you will zoom into the center track of whatever is currently on the screen.
    34. I mentioned this in a thread earlier... http://discussions.apple.com/thread.jspa?threadID=752485&tstart=0
    There is a bug when using the transform tool involving the 'position' variable. In my example, I was attempting to reverse the time placement of three chords, that occured in a part somewhere in the middle of my song. By selecting the measure start and end of this part, Logic was unable to select or operate with the transform tool (and I tried a variety of transform options). If I moved this part to the beginning of the song, then the transform tool would suddenly work. After some research, I found online someone had said "Position Time position of the event, referenced to the start of the MIDI Region (not of the song)."--- But if I still doubt this is true, because I then placed the part on a new track with no other data, and placed it in the middle of the sequence and in the transform tool under position I selected '1 1 1 1' to '5 5 5 5' as well i tried setting the position to 'all', and none of this worked. This obviously is a bug... If it's not then it's a very serious design flaw. The position should relate to measure numbers of a song, and nothing else.
    WATCH VIDEO OF THIS BUG:
    http://collinatorstudios.com/video/transform.mov
    That is all for now...
    For those who firmly agree with me and all of the points that I have brought up now and in the past, I encourage you to contact Peggie Louie, (the Logic HR department contact) at (408) 996-1010 and suggest that she hire me as a consultant to help eliminate Logic's many annoyances. I have tried to pursue this heavily in the past, but sadly I was completely ignored by her on all levels. Maybe you all can help make a difference?
    Fighting the good fight,
    Patrick J. Collins
    http://collinatorstudios.com

    11. Changing the movie's start time is very user
    unfriendly. There should be a simple way to specify
    to start at a moment of time relative to SMPTE-- So
    you can just say "+9:15" for example, and it would
    take you in 9 minutes and 15 seconds, rather than how
    it is now where you have to think backwards from
    SMPTE code and subtract.
    For this one I'd suggest getting SMPTE calculator. Entering timecode numbers and having to add and subtract is not so difficult, and AFAIC part of a composer's gig. But what I would add, instead, is that it would be fantastic if Logic provided a timecode calculator (edit: even if it was in the form of a custom Logic widget).
    13. Saving a song with a movie open should mean that
    when you load that song, the movie should be up and
    exactly as it was prior to saving. As it is now you
    have to select "open movie again".
    This doesn't always happen. I've struggled with this for a long time, and I don't know why sometimes the movie will load and not other times. I would also add here that Logic should show the file pathname to the movie. Somewhere...
    18. clicking on a track selects ALL parts. This is
    so so so annoying.
    You can prevent this from happening if you have cycle turned on and set to a set of locators that "contain" the parts you might want to select en masse. I always work with cycle=on so this is not a problem.
    21. If you have multiple tracks of the same track
    (such as three Audio track #1's)-- say you are
    recording guitar parts, and just copying the track
    and muting the previous track as a method of
    maintaining multiple takes for later auditioning. If
    you draw automation volume data on this track (it
    appears on all 3 tracks), and then if you delete the
    audio from one of the muted tracks and tell logic to
    KEEP it, suddenly all automation data is gone.
    GRR!!!
    Never had that happen. In my experience, telling Logic to keep the data always works.
    23. UNDO does not work on every function. for
    example, if you change an output to bus 1 instead of
    1-2, you cannot undo this. Undo should undo whatever
    the last command was, no matter what it was. This is
    what the word LOGICal is supposed to represent.
    Undo in Logic is highly problematic for other reasons. Here, I think there should be a specific Environment Undo, just like there's a separate undo for audio edits.
    29. When you drag a bus from the environment to the
    arrange window, it replaces whatever track was there.
    It should ADD a track instead of replace-- atleast
    there should be a preference for how this behaves.
    Right. This is a matter of personal preference. But still there are other ways to get an object assigned to a track. The "thru tool", for instance. No dragging required.
    32. Logic should offer a feature to collect sysex
    data from midi devices so that patch names show up
    and can be selected via program change.
    My guess: considering how much sheer time it takes to write this kind of software, let alone debug it with every conceivable device, it's not likely this is going to happen.
    That is all for now...
    For those who firmly agree with me and all of the
    points that I have brought up now and in the past, I
    encourage you to contact Peggie Louie, (the Logic HR
    department contact) at (408) 996-1010 and suggest
    that she hire me as a consultant to help eliminate
    Logic's many annoyances. I have tried to pursue this
    heavily in the past, but sadly I was completely
    ignored by her on all levels. Maybe you all can help
    make a difference?
    Wait in line buddy!
    (LOL)
    I must say, I'm very impressed with your list and attention to detail. And I feel your pain, trust me. But many of the things you've listed are feature requests and not bugs. And some of the behaviors you've described I have yet to run across. So this is typical with Logic, that it can be operated in so many diverse ways that no two people run it in the same way, nor would two people conceive the program's capabilities in the same way. But I digress...
    I also think there's a certain amount of Logic convention that I don't think you've adopted yet, hence your wish for behaviors that don't yet exist.
    I don't disagree with most of your feature requests, and I'm (quite unfortunately) able to say that I'm familiar with most of these bugs and about 9 dozen more. But again, it's important to distinguish between bug, feature request, time to RTFM, and errant behavior that's experienced by a very limited number of users.
    There's no doubt that this program has its problems. In particular, your #1 re the playback buffer. And I'm glad you've brought many of the bugs into the light for people to read. Good work.

  • Nqs error 59001: Binary logical operation error in OBIEE 11g

    Hi,
    Requirement: Need to calculate YTD for invoiced amount and Prior YTD for invoiced amount and last year total invoiced amount.
    Logic we used: For YTD Invoiced amount we used “Year To Date” time series function in rpd.
    For Prior YTD we used “Ago function on Calculated YTD column”.
    For Last Year Invoiced amount we used “ CASE function and dynamic variables” as:
    CASE WHEN year=valueOf(previous_year) THEN invoiced_amount END;
    Now, when I’m creating a report, I’m getting the following error as:
    *[nQSError: 43119] Query Failed: [nQSError: 59001] Binary Logical operation is not permitted on VARBINARY, INTEGER operand(s). (HY000)*
    Please help me to solve this, i need to release the instance by EOD

    Hi,
    As per my understanding the ValueOf(previous_year) is double precesion so it wont allow to use binary logical operator.Change to integer becos we can manage year with interger data type.
    [nQSError: 59001] Binary Logical operation is not permitted on DOUBLE PRECISION, VARBINARY operand(s).
    mark if helpful/correct
    thanks,
    prassu

  • How to apply different Logical operations to N.of Signals

    Hello all,
    Please help me if anyone have idea about this.
    I have “N” number of signals. I want to apply different Logical operations for this.
    For Example:
          (((SigA >= 30 && SigB <=55) || (SigC = 42)) && (SigD > 45))
    ((((SigD >= 89.25 && SigF <=55.568) ||(SigG = 156.89)) && (SigA >= 45)) || ((SigF – Sig A) >25))
    Here Conditions will change every time. User can input different conditions (like Excel calculations). I need to check signals as per these type of conditions. Is there is any tool kits available in LabVIEW / we need to develop?
    Currently I’m thinking about string manipulations to extract the each condition . Once first condition is finished then check this results with next conditions (so on..)
    Munna

    Hi GerdW,
    After long time again I stated doing this task. Could you please help me in this.
    As per my snippet, at 1st making array based on given String. From that string I need to check where open & closed brackets are coming to do logical operations.
    For Example: (2 OR ((1 AND 2) OR 3))
    Index
    0
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    String
    2
    O
    R
    1
    A
    N
    D
    2
    O
    R
    3
    Please give me any idea/sample VI for the same.
    Here, 1,2 & 3 are Indices of Boolean 2D Array.
    Munna

  • Logic operations on a string of bits

    Hi, I have a very simple question that I cannot seem to figure out.  I would just like to perform logic operations (AND, OR, etc.) on 2 strings of bits that are 24 bits long each, however I cannot find in the functions palette a function that acts as a binary constant.  I only see numeric constant and hex functions.  Can somone please let me know where I can find this.  For example, I would like to AND '111111111111111111111111' & '000000000000000000000000'.    
    Solved!
    Go to Solution.

    I think that these bitwise operations should work directly on strings too. Thus I wrote up this idea.  
    LabVIEW Champion . Do more with less code and in less time .

  • Logical operations on different systemgroups

    Hi,
    I want to define several systemgroups in the transaction RZ21 on a central monitoring system. Afterwards I want to make logical operations on these groups (like: group1 and group2) in the monitor definition. Is this possible and in what way? I hadn't found hints on sap-notes.
    Greetings
    Christian Wosgien

    > I think you mixed up bit and binary datatype.
    > Binary datatype is normally used for images, text, storing a pdf in your db, etc
    I'm aware that's what they're usually used for (although I have thought varbinary would have been better)
    but I need to store lots of bit fields and  was hoping I could use a binary datatype, rather than have status1, status2, status3, etc
    > If you want 1 column to store multiple values using bitmasks, than you can use an integer to do that.
    > e.g. see examples in system tables like sysdatabases..status (small int) and sysdatabases..status4 (int)
    That's what we're using at the moment - if fact we're now using unisgned bigint - that gives 64 bits.
    The fact that sys* tables have multiple status fields shows it would be useful here.
    > Sybooks: The bitwise operators are a Transact-SQL extension for use with integer type data.
    > So it looks like you've got to use multiple columns to achieve wat you want.
    Yep - that's exactly what we've found.
    It seems unfortunate to not allow bitwise operations on binary datatypes. Its not a common use of them I know
    but I've worked at couple of places which would have benefited from this.
    We've spent some time writing our own functions that implement bitwise operations on binary fields, but would have been better if these were build in.
    > Why would you want to store 200 bitfields in 1 column?
    For a similar reason as the sys* tables have multiple status columns - If binary columns allowed bitwise operations - they'd only need 1 status field.

  • Logical operator 'like'

    I have a small query where I have to retrieve vendor details not including the vendors starting with '9'.
    I have written the below query for that.
    select b~lifnr  " Vendor number
         into corresponding fields of table gi_output_vendors
    from  lfa1
    where  lifnr   not like  '9%'.
    But the output I am getting contains vendor numbers '0000950000' where I wanted to eliminate these type of numbers also. i.e, I don't want to consider leading zeroes.
    So, the below code I have written for that.
    The problem is with if condition or delete statement  'like' logical operator is not being allowed.
    loop at gi_output_vendors into wa_output_vendors.
    shift wa_output_vendors-lifnr left deleting leading '0'.
    if wa_output_vendors-lifnr like '9%'   " didn't work delete gi_output_vendors from wa_output_vendors   where
                  lifnr like '9%'. "didn't work
    endif.
    endloop.
    When I use 'like' with 'if' condition or 'delete' statement, I am getting error saying that 'Like operator is not allowed'.
    How could I deal with this situation.
    Thanks in advance.
    Vishnu Priya

    If you can guarantee the 9 will always be in the same place then it would be better to use offset logic or something like 'lifnr NOT LIKE '00009'' - incidentally, I believe the % wildcard only replaces one character so '9%' will be looking for a 2 char string containing a 9 followed by ONE other character.  Using '9' will look for a 9 followed by any number of other characters. Since lifnr is a 10 char field (according to your example) '9%' will always fail. I would suggest using the Data Browser (SE11) selection screens to try out some of the possibilities and see what works.
    Hope that's of some help!
    Andy
    By the way, I wouldn't recommend using '9' becasue this will look for a 9 <b>anywhere</b> in the lifnr field i.e. it could exclude a perfectly valid number just because it ends in a 9!
    Message was edited by: Andrew Wright
    Sorry, ignore me, in SQL you should use % and not * for multiple characters.  However, the same applies if you can guarantee the position of the 9.
    Message was edited by: Andrew Wright

  • Logical operator

    Hi Experts,
    Can we use logical operator in where clause of select statement?????
    My requirement is i want to CA logical operator in select statement.Is there any possibility????????
    If there please tell me???????????\
    Nice answers reward with maxi points.................

    Hi Subash,
    Prakash is right with his idea to go by range,
    but it won't work like this.
    Instead build your range like this:
    ranges r_matnr for Tnnnn-MATNR.
    r_matnr-sign = 'I'.
    r_matnr-option = 'BT'.
    r_matnr-low = '0'.
    r_matnr-high = '9999999999'.
    "max length of matnr filled with 9
    APPEND r_matnr.
    then
    SELECT * FROM Tnnnn WHERE MATNR IN r_matnr
    AND ......
    this will get you only those entries with plain numerical MATNR.
    For the opposit selection, just replace 'I' wit 'E' in r_matnr-option.
    hope that helps.
    Regards
    JW
    Edited by: Joerg Wulf on Jan 8, 2008 10:43 PM

  • Modify the logical operator in an Expression

    Hi,
    How to alter an Operator ("LIKE" to "EQUAL") inside an Expression already built - before execution ?
    Let me explain my problem :
    I have a central Toplink Adapter class which is responsible for executing all Expressions passed from different modules.
    Each module is passing an Expression object to this Adapter.
    There is a DeletionStatus column in almost all the tables whose value could be "Y" or "N".
    Almost all Expressions append (through AND) this DeletionStatus column checking the value to "Y" or "N".
    The problem here is the subordinates while building the Expression have used LIKE operator many places on this DeletionStatus column rather than EQUAL (or EQUALS).
    My objective now is to regulate within the adapter class that EQUAL/s to be used to improve performance.
    Sitting in the Adapter class...after accepting the Expression object as a parameter...how can i alter the Expression(/query) such that if the DeletionStatus column is part of the Expression built...then modify the Operator to be EQUAL/s only and not LIKE.
    Seamlessly.....irrespective of the Operator used by the subordinates....the Adapter always executes with EQUALS operator thereby improving on the performance of SQL execution.
    Please help.
    Thank you very much in advance.
    Regards,

    I would think you would be best off change the code that is using like() and change it to equal() instead of leaving this code incorrect, and trying to mung it elsewhere.
    If you really want to mung it, you could walk the Expression tree and look for LIKE and the field and switch the operator of the RelationExpression.
    James : http://www.eclipselink.org

  • How to use varaible in place of logical operator in query

    Hi Experts,
    How can we use a variable in place of logical operator (OR, AND) ?
    For ex:
    select * from sflight where carrid = 'LH' AND connid = 100.
    data x type string.
    x = 'AND'.
    Now, I want to replace AND with the variable x.
    Query will be:
    select * from sflight where carrid = 'LH'  x connid = 100.
    I am doing this because user can select any logical operator while creating the search criteria at run time .
    I already tried this but i am getting following compilation error:
    Error: Incorrect expression used in place of logical expression.

    hi,
    Check out this sample code
    Display of flight connections after input of airline and flight number:
    PARAMETERS: carr_id TYPE spfli-carrid,
                conn_id TYPE spfli-connid.
    DATA:       where_clause TYPE  STRING,
                and(4),
                wa_spfli TYPE spfli.
    IF carr_id IS NOT INITIAL.
      CONCATENATE 'CARRID = ''' carr_id '''' INTO where_clause.
      and = ' AND'.
    ENDIF.
    IF conn_id IS NOT INITIAL.
      CONCATENATE where_clause and ' CONNID = ''' conn_id ''''
        INTO where_clause.
    ENDIF.
    SELECT * FROM spfli INTO wa_spfli WHERE (where_clause).
      WRITE: / wa_spfli-carrid, wa_spfli-connid, wa_spfli-cityfrom,
               wa_spfli-cityto, wa_spfli-deptime.
    ENDSELECT.
    Regards,
    Santosh

  • Multi Value Parameter with ODBC Connection

    Hi Everyone . . .
    I am stuck, and have been since Monday :/ . . .
    Backgroud:
    I am using Report Builder 3.0 with an ODBC connection to build reports off of our Vertica DB.  This part is going swimmingly, thanks to the help I recieved from this forum.
    Now, some of the queries that I am using (or reports I guess) require parameters.  I was attempting the @Parameter and quickly realized this was not possible with the ODBC connection.  I have solved this issue by using the ? as the parameter. 
    Works nicely, not as clean, but serves the purpose.
    Most, all of my parameters to this point have been single value parameters.  Now, however, we are dabbling in allowing our report users to select multiple Users as a parameter.  This is where I am stuck...
    I have flipped the parameter checkbox to "Allow multiple values", I then recieved an error saying this: 
    Cannot add multi value query parameter 'UserName' for dataset 'RankingQuery' because it is not supported by the data extension.
    Here is what I have done:  I have gone to the Dataset properties for the appropriate query that the parameter is being fed into > then to the Parameters tab.  In the Parameters tab instead of selecting the @UserName parameter from the drop down
    I clicked the Fx buttone and inserted the UserName Parameter from there it looks like this: =Parameters!UserName.Value(0)
    Now because of this last step my report runs without error, however, when I select multiple user names from the parameter drop down I only recieve data for the first person selected in that drop down.
    Am I missing something?  Does anyone know how to fix this?  Please help!
    Thanks everyone.
    Travis

    Hi There
    Thanks for your posting. Can you please try this way? Go to your dataset properties and then go to filter tab and add filter like this
    Please choose your dataset filed name from the dataset in which you would like to apply the filter for your parameter
    UserName
    Put operator=in 
    And please put value like= Parameters!UserName.Value
    Please do not put Parameters!UserName.Value(0)
    I hope this will resolve your problem
    Many thanks
    Syed

Maybe you are looking for