New call-to-action
Results 1 to 2 of 2

Thread: SQL filter for "Ends In -001"

  1. #1
    "Certified" Alphaholic Rich Hartnett's Avatar
    Real Name
    Richard Hartnett
    Join Date
    Nov 2002
    Bowie, MD

    Default SQL filter for "Ends In -001"

    This is easy to do in A5's report builder, but I'm having a hard time figuring out how to write the expression in SQL Report Builder.

    I have a report that shows a list of police case numbers, and while most end in "-001," there are some supplemental reports that end in "-002, 003, 004, etc."


    But I only want to see reports ending in "-001." (The field containing the -001 is called "CaseReportNumber")
    How would I write the expression below, so that it prevents any reports with -002 or higher from being listed?


    Any help would be appreciated.
    Attached Images Attached Images
    Sergeant Richard Hartnett
    Hyattsville City Police Department

  2. #2
    "Certified" Alphaholic Lance Gurd's Avatar
    Real Name
    Lance Gurd
    Join Date
    Jun 2005
    Southampton, UK

    Default Re: SQL filter for "Ends In -001"

    Never used SQL Report Builder but can you just use something like a select statement with right(CaseReportNumber,3)='001' ?
    Something like
    SELECT * FROM tablename WHERE right(CaseReportNumber,3)='001'

Similar Threads

  1. having "fun" with '"+"Filter Strings"+"'
    By malsalcnc in forum Windows Desktop Applications
    Replies: 2
    Last Post: 10-23-2014, 09:13 PM
  2. Action Javascript "Filter Records in a List Control" - data RANGE filter
    By JPMPA in forum Mobile & Browser Applications
    Replies: 4
    Last Post: 08-19-2014, 10:15 AM
  3. append.m_exp24 = convert_type(time("",now()),"c") returns error -"improper characte
    By Freewilly3d in forum Alpha Five Version 11 - Desktop Applications
    Replies: 4
    Last Post: 04-08-2013, 08:12 PM
  4. "Object Is Not Defined" Error When I Use "Close Form" in the "OnInit"
    By nigeldude in forum Alpha Five Version 11 - Desktop Applications
    Replies: 5
    Last Post: 03-23-2013, 04:22 AM
  5. "Simple" filter problem using week() Function to filter grid
    By Scholin in forum Application Server Version 9 - Web/Browser Applications
    Replies: 2
    Last Post: 01-04-2009, 09:37 PM


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts