Solved

CharIndex is not acceptable in dataview, what is the equivalent?

Posted on 2007-03-30
1
727 Views
Last Modified: 2008-01-09
Hi,

I have a filter in a dataview as:
dv.RowFilter = (CHARINDEX (fromAct, 'AASC ST LOUIS') > 0 OR CHARINDEX (toAct, 'AASC ST LOUIS') > 0) AND (CHARINDEX (fromAct, 'AAI MD') > 0 OR CHARINDEX (toAct, 'AAI MD') > 0) AND UpdDate >= 1/1/2000 AND UpdDate <= 3/30/2007

whereas dv is a dataview

At run time, I got "the expression contains undefined function call CHARINDEX()." error.

What is the equivalent of charindex for dataview rowfilter?

Many thanks,
Diane Ha
0
Comment
Question by:tnova1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 25

Accepted Solution

by:
dstanley9 earned 500 total points
ID: 18824421
There's not a direct equivalent, but you can use LIKE:

(fromAct LIKE '%AASC ST LOUIS%' OR toAct LIKE '%AASC ST LOUIS%')
AND (fromAct LIKE '%AAI MD%' OR toAct LIKE '%AAI MD%')
AND UpdDate >= 1/1/2000 AND UpdDate <= 3/30/2007
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

623 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