473,407 Members | 2,629 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Rewrite Query

Hi,
is there a way to rewrite this code to make it short. The query won't run
because it max the # of characters allowed. sorry it's written in caps.
thanks in advance:
Expand|Select|Wrap|Line Numbers
  1. BASE ADMIN: IIf(CDPINC_ARIBD!IDACCTREV="5021-0PENSN-QTV" Or CDPINC_ARIBD!
  2. IDACCTREV="5021-0PENSN-SAV" Or CDPINC_ARIBD!IDACCTREV="5021-0PENSN-ANV" Or
  3. CDPINC_ARIBD!IDACCTREV="5021-0PENSN-RSA" Or CDPINC_ARIBD!IDACCTREV="5021-
  4. 0PENSN-PER" Or CDPINC_ARIBD!IDACCTREV="5021-0PENSN-DOC" Or CDPINC_ARIBD!
  5. IDACCTREV="5021-0PENSN-SDI" Or CDPINC_ARIBD!IDACCTREV="5021-0PENSN-SVC" Or
  6. CDPINC_ARIBD!IDACCTREV="5020-0PENSN-QTV" Or CDPINC_ARIBD!IDACCTREV="5020-
  7. 0PENSN-STQ" Or CDPINC_ARIBD!IDACCTREV="5020-0PENSN-MSC" Or CDPINC_ARIBD!
  8. IDACCTREV="5020-0PENSN-PER" Or CDPINC_ARIBD!IDACCTREV="5020-0PENSN-DOC" Or
  9. CDPINC_ARIBD!IDACCTREV="5020-0PENSN-SDI" Or CDPINC_ARIBD!IDACCTREV="5020-
  10. 0PENSN-SVC",CDPINC_ARIBD!AMTTXBL,0)
Apr 24 '08 #1
1 1589
NeoPa
32,556 Expert Mod 16PB
Use the In() structure :
Expand|Select|Wrap|Line Numbers
  1. BASE ADMIN: IIf(CDPINC_ARIBD.IDACCTREV In('5021-0PENSN-QTV','5021-0PENSN-SAV','5021-0PENSN-ANV','5021-0PENSN-RSA','5021-0PENSN-PER','5021-0PENSN-DOC','5021-0PENSN-SDI','5021-0PENSN-SVC','5020-0PENSN-QTV','5020-0PENSN-STQ','5020-0PENSN-MSC','5020-0PENSN-PER','5020-0PENSN-DOC','5020-0PENSN-SDI','5020-0PENSN-SVC'),CDPINC_ARIBD.AMTTXBL,0)
Apr 25 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: krystoffff | last post by:
Hi all For speed reasons, I would like to rewrite the following query without the subquery : SELECT * FROM table1 WHERE field1 NOT IN (SELECT field1 FROM table2 where field2=X); I thought...
14
by: joshsackett | last post by:
I have a WHERE clause that could be an "=" or a "LIKE" depending upon if the passed variable is populated or not. I would like to know the best way to write the WHERE clause to make it dynamically...
4
by: rajesh.balu | last post by:
I created a MQT defined as: select a.col1,a.col2,a.col3,b.col1.b.col2 from a , b where a.id = b.id Now, I execute this query which get rewritten to the MQT: select a.col1,b.col1, c.val from...
1
by: DDK | last post by:
How would you go about rewriting a URL such as: http://www.mysite.com/folder/page.aspx?query=WordnotNumber to: http://www.mysite.com/folder/WordnotNumber In other words I would like to put...
0
by: Brian | last post by:
I've deployed a 'URL rewriter' version of our application almost two months ago and it is working great (.NET 1.1, Win2k, IIS5). Since then, I've gotten just FOUR exceptions that look like this: ...
14
by: Stan Canepa | last post by:
This post is mostly for discussion. Why rewrite in .NET? Just a general discussion not related to any specific details. I was just looking to see what reasons developers are looking to, to help...
1
by: soniamuk | last post by:
i am facing a typical issue with apache where i have a filter context(written in c++) which pulls information from apache server. in this process when i am trying to fetch an url where rewrite rule...
6
by: greenxiar | last post by:
How to get the function from "rewrited interface implement"? interface I { int Value { get; } } class A : I { int I.Value { get { return 1; } } } class B : I { int I.Value { get { return 2;...
1
by: polilop | last post by:
Is there a URL rewrite module that allows to rewrite url by looking at the database. Egxample: http://www.somesite.com/object.aspx?objectCountryId=1&objectId=22 now i look into the database, see...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.