Solved

Logic in IDC&HTX

Posted on 1997-03-13
1
179 Views
Last Modified: 2013-12-25
I want to use logic SQL (and,or,not)in my IDC file
ex. In the library,I want to search "microprocessor&computer"
or "Introduction NLP",but library'database has "Introduction  to NLP"
    my original source code is
    select *
    from book
    where call_no like '%%%call_no%%%'
   
    How can I do?
    Thank you...
     
   
0
Comment
Question by:Donald021997
1 Comment
 
LVL 4

Accepted Solution

by:
jshamlin earned 30 total points
ID: 1853875
The precise syntax depends on the server you're using (the examples below works on MS SQL Server, but may not work elsewhere)

For a simple if/else, it's ...
+if ([test_condition])
+[commands_to_perform]
+else
+[commands_to_perform]

if the logic depends on the content of the records, you need to

SELECT
+WHERE [condition]
+AND [condition]  --optional--

For a NOT, you can alter the syntax of the AND condition

To be honest, I've never found a need for an OR - but if OR doesn't work, you should be able to repeat the WHILE and add a different condition - the records should be used in addition to those selected by the first WHILE (which is, essentially, what an OR does)
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Get to know the ins and outs of building a web-based ERP system for your enterprise. Development timeline, technology, and costs outlined.
Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
The viewer will learn how to count occurrences of each item in an array.

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question