Solved

Logic in IDC&HTX

Posted on 1997-03-13
1
172 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
Comment Utility
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Both Easy and Powerful How easy is PHP? http://lmgtfy.com?q=how+easy+is+php (http://lmgtfy.com?q=how+easy+is+php)  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now