How to avoid using multiple ors?

I have a query that returns a number where I need to change
certain text if that number matches my criteria..the code looks
like this (just an example)
<cfquery name="getNumber"
datasource="#Application.dsn#">
Select SomeNumber
From Users
Where blah = blah
</cfquery>
Is there a cleaner way to do this? (see code below)
Thanks for your help.

aasdf334 wrote:
> MrBonk: I'm not exactly sure how to get this
working...this is what i'm trying
> to do but it isnt working
>
> <cfif
listFind(GetNumber.SomeNumber,130|135|144|149|157|196,"|") gt 0>
> Found it!
> <cfelse>
> Didn't find it
> </cfif>
>
> Dan Bracuk: The query is only returning one row
>
> Thanks to both of you for your help - I hope to get this
working properly
>
it's the other way around, and don't forget to quote your
list:
<cfif
listFind("130|135|144|149|157|196",GetNumber.SomeNumber,"|") gt
0>
show some text here
<cfelse>
show some other text here
</cfif>
Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com

Similar Messages

  • How do you use multiple outputs on a VSTi like Kontakt or Battery?

    how do you use multiple outputs on a VSTi like Kontakt or Battery with Logic Pro 7.1? I've heard someting about using AUX busses, but can anyone please provide an actual clear, step by step basic guide?
    I've had Logic 3 months now and just don't know how to do this yet, and have yet to actually find it in the manual!!
    thx

    http://www.sonikmatter.com/wiki/index.php/Tutorial:MultiChanAudioSetup

  • How can I use multiple row insert or update into DB in JSP?

    Hi all,
    pls help for my question.
    "How can I use multiple rows insert or update into DB in JSP?"
    I mean I will insert or update the multiple records like grid component. All the data I enter will go into the DB.
    With thanks,

    That isn't true. Different SQL databases have
    different capabilities and use different syntax, That's true - every database has its own quirks and extensions. No disagreement there. But they all follow ANSI SQL for CRUD operations. Since the OP said they wanted to do INSERTs and UPDATEs in batches, I assumed that ANSI SQL was sufficient.
    I'd argue that it's best to use ANSI SQL as much as possible, especially if you want your JDBC code to be portable between databases.
    and there are also a lot of different ways of talking to
    SQL databases that are possible in JSP, from using
    plain old java.sql.* in scriptlets to using the
    jstlsql taglib. I've done maintenance on both, and
    they are as different as night and day.Right, because you don't maintain JSP and Java classes the same way. No news there. Both java.sql and JSTL sql taglib are both based on SQL and JDBC. Same difference, except that one uses tags and the other doesn't. Both are Java JDBC code in the end.
    Well, sure. As long as you only want to update rows
    with the same value in column 2. I had the impression
    he wanted to update a whole table. If he only meant
    update all rows with the same value in a given column
    with the same value, that's trivial. All updates do
    that. But as far as I know there's know way to update
    more than one row where the values are different.I used this as an example to demonstrate that it's possible to UPDATE more than one row at a time. If I have 1,000 rows, and each one is a separate UPDATE statement that's unique from all the others, I guess I'd have to write 1,000 UPDATE statements. It's possible to have them all either succeed or fail as a single unit of work. I'm pointing out transaction, because they weren't coming up in the discussion.
    Unless you're using MySQL, for instance. I only have
    experience with MySQL and M$ SQL Server, so I don't
    know what PostgreSQL, Oracle, Sybase, DB2 and all the
    rest are capable of, but I know for sure that MySQL
    can insert multiple rows while SQL Server can't (or at
    least I've never seen the syntax for doing it if it
    does).Right, but this syntax seems to be specific to MySQL The moment you use it, you're locked into MySQL. There are other ways to accomplish the same thing with ANSI SQL.
    Don't assume that all SQL databases are the same.
    They're not, and it can really screw you up badly if
    you assume you can deploy a project you've developed
    with one database in an environment where you have to
    use a different one. Even different versions of the
    same database can have huge differences. I recommend
    you get a copy of the O'Reilly book, SQL in a
    Nutshell. It covers the most common DBMSes and does a
    good job of pointing out the differences.Yes, I understand that.
    It's funny that you're telling me not to assume that all SQL databases are the same. You're the one who's proposing that the OP use a MySQL-specific extension.
    I haven't looked at the MySQL docs to find out how the syntax you're suggesting works. What if one value set INSERT succeeds and the next one fails? Does MySQL roll back the successful INSERT? Is the unit of work under the JDBC driver's control with autoCommit?
    The OP is free to follow your suggestion. I'm pointing out that there are transactions for units of work and ANSI SQL ways to accomplish the same thing.

  • How Can I Use Multiple Weblogic Instances in a Single OS

    Hello Everyone,
    Actually I have to install Some different applications. Few of them need weblogic 10.3.6 and others need 10.3.4. The OS am using is Oracle  Enterprise Linux 5.
    Now I am able to install 2 separate(One of 10.3.4 and 10.3.6) instances with two different users,In two different directories.
    I have installed the weblogic 10.3.6 version with a user webadmin and installed node manager with port 5556. This is working fine.
    The main problem here is :
    In the second instance (10.3.4 ) installed with a a different user and gave the port number to NodeManager as 1600 and its not getting started. Its throwing error and also after some errors in the terminal am able to see that its reverting to port number 5556 only.
    What might be the issue?
    I have to install 2 different versions of weblogic in a single Server. But am failing with NodeManager. What Can I do to have multiple weblogic instances with multiple versions in a single server ?
    Can anyone suggest a resolution for this please ?
    Thanks in advance.

    Pl do not spam these forums with multiple posts - How Can I Use Multiple Weblogic Instances in a Single OS

  • How can we use multiple transactions by using bdc_insert.

    HI
    How can we use multiple transactions by using bdc_insert.

    Hi,
    In between the Open and Close we have to use the BDC_INSERT for the Tcodes you have to do.
    BDC_OPEN_GROUP
    BSD_INSERT
    TCODE = tcode1
    BDC_INSERT
    TCODE = tcode 2
    BDC_CLOSE_GROUP
    check the SDN for more on this.
    Regards
    Lekha

  • How to avoid purchasing multiple things that are the same but different titles

    How can I avoid purchasing multiple things that are the same but have multiple names but is the same purchase for the same use?

    "Things"?  What things?  Apps for keeping track of when to change cat litter?  30 different versions of "twinkle, twinkle little star" played by everything from punk rockers to Gregorian chant?  Videos on the best way to make Christmas cake?

  • How do I use multiple addresses at one time?

    Shouldn't the Adobe server page that allows for the entry of a recipients address tell users how to add another address?  Do we separate them with semicolons? Commas?  Or is it even possible to use multiple addresses?

    Yes, Adobe Send.
    Unfortunately, it is NOT spelled out on the page where you enter email addresses of recipients, nor is it revealed if you click on the question mark box by email address.
    Frank
    =========================
    Frank Schmalleger, Ph.D.
    Distinguished Professor Emeritus
    The University of North Carolina
    Website: www.schmalleger.com
    Amazon Author Page: http://tinyurl.com/78nly4s
    Mailing Address:
    Ste 203-332
    4300 S. U.S. Hwy 1
    Jupiter, FL 33477
    Ph. 561.225.1760

  • How do I use multiple accounts on the same Mac with Apple TV2?

    I have home sharing turned on in two separate accounts on a single MacPro.  When I am logged into both accounts, I can see both accounts' iTunes Libraries available in the AppleTV2.  However, when I try to open each account iTunes Library in the AppleTV2, only one account will open (whichever one I logged into first).  (In other words, I log into Account1 then open iTunes with Home Sharing On, then log into Account2 (while Account1 is still logged on), open iTunes with Home Sharing On. AppleTV2 shows Account1 Library and Account2 Library under Computers, but will only load Account1 Library.  Account2 Library will just cause AppleTV2 to search for the Library then give an error.)  How come AppleTV2 can see both Libraries but will only open one Library?  How can I fix this?
    Thanks,
    zpockets

    Thank you for replying.  Both of the accounts are Admin accounts.  The Libraries are kept in the user/music/itunes/itunes media folder on each account.  However, I do use multiple iTunes Libraries on my Account1.  One of the Libraries I use in Account1 is on a separate internal HD.  However, the other Libraries I use in Account1 are stored in user/music/itunes/itunes media folder on the main HD (which hosts both Account1 and Account2).  It doesn't seem to matter whether I am using an iTunes Library on an external drive or the main drive in Account1, I still get the same problem: only account1 library will load.  AppleTV sees that the Account2 Library is there, but it won't load it.

  • How can I use multiple icloud Accounts with Fotos?

    Hello.
    Yesterday, my wife and I started using the new App "Fotos" on OSX and iOS.
    What I can't figure out, and where I would like to get some insight and help, is how we should use our icloud Accounts.
    How it is right now:
    - Wife (MacBook and iPhone)
    Has her own icloud-Account ([email protected]) for Backup (iOS) and Fotosync, Keychainsync, Bookmarks. 20GB iCloud-Account (18GB free).
    - Husband (MacBook, Mac Mini and iPhone and iPad)
    Has his own icloud-Account ([email protected]) for Backup (iOS) and Fotosync, Keychainsync, Bookmarks. 20GB iCloud Account (10 GB free).
    - Husband has about 400 GB of Photos from over 10 Years on Mac Mini
    How I want it to be:
    - Husband
    upgrades to at least the 500GB Account, to use for all 400GB of Photos and Backup, Keychainsync, Bookmarks.
    - Wife
    Has her own Account ([email protected]) for Keychain and Bookmark, but uses [email protected] on MacBook and iPhone for Backup an Fotosync, so that all Photos are stored in a single one family "container". All Photos in one Place without being able to forget to put them there.
    I don't see, how I can accomplish that, since only one "real" icloud account seems to be possible in iOS, so that if i put my account in her iPhone I would get the Photo and Backup I want, but she would not be able to sync her own bookmarks an keychain any more.
    Any thought on how to resolve this?
    Am I missing something?
    Thanks for your ideas,
    thomas

    Yes, you could have multiple iCloud accounts for Mail, Contacts, Calendars, Reminders, Safari, Notes, and Find My iPhone, but only one primary iCloud account for Photo Stream, Documents & Data, and Storage & Backup.

  • How to avoid using constants ?

    Hello,
    I am starting a new project and I am thinking of a way to avoid using constants.
    For example, in a report, it selects all the order with types ZLN and ZLB.
    I know that I have several possibilities :
    - hard code it in the program (using constants which I want to avoid)
    - create a specific table with all the types that I want to select (this may be the best solution but it can be very long -> too much table to create)
    - put the parameter in the selection screen (but then we have to put default values which come back to the same problem)
    So, I didn't found any perfect solution, Do you know what is the method recommended by SAP ?
    What kind of technics did you use in you projects ?
    Thank you for your help !

    Hi Friend ,
    As you taught , there are  multiple  ways to handle the constants in the program.
    But finally time & efficency matters alot  .
    so my  idea would be  i will  list all the constant & get the quick understanding of the constant type's.
    For example : Order type is Customizing data  which will maintained  by Fun.Consultant  , so i will give work for him to maitain the Varient against  Order type in the TVARC table .so that  in the program  i will declare one order type vraible  under atselection-screen event i will write select Query to get the vaule from the TVARC table which will be maintaine . we can write the execption also with sy-subrc <> o.if it is not maintianed .so far all customizing data fields  this would be the best way for constants maintaining outside your program  .
    Similarly if any system constants then we can get it in runtime  with SYST table parameters .
    if there are any  ABAP Program Constants  ( Titles,labels ,case condition parameters,ect) maintain in the tprogram ext elements , or you can generically maintain a Utility class where you can create an attribute  so that whereeven you want you can reuse the same  .
    Regards,

  • How do you use multiple displays with a MacBook Pro and iMac

    I have an iMac and a MacbookPro laptop both upgraded to OS X 10.9 (Mavericks).  I'd like to use multiple displays with them.  Can I do this without an Apple TV?  They are both on the same network.  If I can, can someone please give some instructions on how this can be done?
    Thanks!

    Both computers have ports for external monitors. Check your user manuals. Only one display can be added to the MBP, but newer iMacs have dual Thunderbolt ports.
    Do your own Google research to learn what to do, but reading your manuals should be all you really need. It' not rocket science yet.

  • How can i use multiple row subquery in update statement

    Hai All
    I using group function in my update statement.. and i need to update more rows so i need to use multiple row
    subquery pls tell me how to use multiple row subquery in update statement
    For example
    while i am using this like this i got an error
    update dail_att set outtime in (select max(r2.ptime) from temp_att where empcode=r2.enpno and
    barcode=r2.cardn and attend_date=r2.pdate group by enpno,pdate,cardn);
    Pls tell me how to use with example
    Thanks & regards
    Srikkanth.M

    Hai Man
    Thanks for ur response Let me clear what i need
    First step Fetch the records as text file and stores into table T1
    and the next step is i have seperated the text using substring and stores in different columns of a table
    There are two shifts 0815 to 1645 and 1200 and 2000
    Here I rep IN and O rep OUT
    Empno date time inout
    001 01-01-10 0815 I
    002 01-01-10 0815 I
    003 01-01-10 0818 I
    001 01-01-10 1100 0
    001 01-01-10 1130 I
    002 01-01-10 1145 0
    002 01-01-10 1215 I
    004 01-01-10 1200 I
    005 01-01-10 1215 I
    004 01-01-10 1315 O
    004 01-01-10 1345 I
    001 01-01-10 1645 0
    002 01-01-10 1715 0
    003 01-01-10 1718 0
    004 01-01-10 2010 0
    005 01-01-10 2015 0
    This is my T1 table i have taken data from text file and stored in this table from this table i need to move data to another table T2
    T2 contains like this
    Empno Intime Intrin Introut Outtime Date
    001 0815 1100 1130 1645 01-01-10
    002 0815 1145 1215 1715 01-01-10
    003 0818 1718 01-01-10
    004 1200 1315 1345 2010 01-01-10
    005 1215 2015 01-01-10
    This what i am trying to do man but i have little bit problems Pls give some solution with good example
    And my coding is
    declare
         emp_code varchar2(25);
    in_time varchar2(25);
    out_time varchar2(25);
    Cursor P1 is
    Select REASON,ECODE,READMODE,EMPD,ENPNO,FILL,PDATE,PTIME,INOUT,CARDN,READERN
    From temp_att
    group by REASON,ECODE,READMODE,EMPD,ENPNO,FILL,PDATE,PTIME,INOUT,CARDN,READERN
    ORDER BY enpno,pdate,ptime;
    begin
         for r2 in p1 loop
    declare
    bar_code varchar2(25);
    begin
    select barcode into bar_code from dail_att where empcode=r2.enpno and attend_date=r2.pdate;
    For r3 in (select empcode,empname,barcode,intime,intrin,introut,addin,addout,outtime,attend_date from dail_att)loop
    if r2.inout ='O' then
    update dail_att set outtime =(select max(r2.ptime) from temp_att where empcode=r2.enpno and barcode=r2.cardn and attend_date=r2.pdate group by r2.cardn,r2.enpno,r2.pdate );
    end if;
    end loop;     
    exception
         when no_data_found then
         if r2.inout ='I' then
                   insert into dail_att(barcode,empcode,intime,attend_date)(select r2.cardn,r2.enpno,min(r2.ptime),r2.pdate from temp_att group by r2.cardn,r2.enpno,r2.pdate );
         end if;
    end;
    end loop;
    commit;     
         end;
    Pls tell me what correction i need to do i the update statement i have used a subquery with group function but when i used it will return only one row but my need is to return many rows and i need to use multiple row subquery
    and how can i use it in the update statement
    Thanks In Advance
    Srikkanth.M

  • With Pages 5.2 how can i use multiple language types in a single document

    My Macbook Air Has the version 10.9.3
    I'm used to work with the old version of Page.
    But now I am using the new version of Pages 5.2 (1860).
    I want to know with the new version how do I use an multiple language types in a single document option.
    In the old  version of Pages I was using  Inspector -> Text -> "More" tab -> Language: British Inglese.
    In the new Pages 5.2 I do not know how to do it
    Could you help me?
    melo

    It's not possible to tag text with multiple languages in Pages 5.  Go back to Pages 4, which should still be in you iWork folder.
    For the whole doc in Pages 5, use Edit > Spellling and Grammar > Show Spelling and Grammar.

  • How do I use multiple librarys to organize my projects

    Is there a way to use multiple libraries to organize my projects. I don't like having all my projects in one library. I'd like separate libraries for Family_Movies, BirthdaysandHolidays, Vacations, etc...
    Thanks.

    You can create multiple folders in your Project Library. I have a folder for each year. Then within the year, if I make several videos on one subject (say a trip to Europe) I will create sub folders within the year.
    There is no limitation on what you name your Folders, so you could name them Family Movies, Vacations, Birthdays, etc.
    When you are in the Project Library View, you can click FILE/NEW FOLDER. For a subfolder, click on the parent folder and then click New Folder.
    Message was edited by: AppleMan1958

  • How do I use multiple VPP accounts in a school system with 1 Profile manager server?

    I have 40 schools with their own money they want to spend on apps. I need these accounts to be seperate. We are registered in the Device enrollment program and are using Apple's profile manager to distribute VPP apps. In the DEP website you can add existing vpp admins. I had hoped when these accounts purchased apps, the apps would show up in Profile Manager which uses the master Apple ID, but this didn't happen. Anyone know what the correct process is for doing this?

    If you haven't found the answer: You have to install the correct token for each account.  Apple Servers, as far as I know, do not support using multiple tokens at once.  As a result, you will have to swap out each of the 40 tokens anytime anyone wants to buy something then assign it to a user then push the app.
    Or just buy it with a redemption code and give that code to your users.

Maybe you are looking for

  • How can I get a refund for an in app purchase I did not want?

    How can I get a refund for an in app purchase I did not want? The app took over $35 from my account and there is no way this was authorized.  Please advise on how I can recover these funds.

  • Wireless connection drops on 1/2 of computers on network

    I have an Apple Airport Extreme N Router setup to feed my NAS wirelessly to all computers on my network. Some computers on the network can sign in wirelessly (Via TP-Link TEWDN3200 USB Adaptor) and connect to the NAS. The other half drop connections

  • Invalid number error when calculating with sysdate

    Hello - I am getting invalid number error for query below: SELECT * FROM trkg WHERE trkg.tran_type=500 AND trkg.mod_date_time>sysdate-0.5 I am not sure what is wrong with above query. Strange part is that it executes fine in one environmnet and retur

  • Saleorder vs PIR (Demand)

    Hi Gurus, I am using  Strategy 40 Ex:PIR(Demand) i have 50 now am rerciving Sale order 40,once entry of sale order PIR gets consumed right.So now remaing PIR will be 10,here i need to check for which sale order how much demand (PIR) has consumed.(In

  • Keep getting an odd display on the screen.

    In almost anything I do, I keep getting a little pop-up like this: and sometimes like this:  Is there any way to disable it? It doesn't happen on my other iMac.