Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8826403
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T07:07:38+00:00 2026-06-14T07:07:38+00:00

I have a report with text parameters that represent Quarters and Years. For example,

  • 0

I have a report with text parameters that represent Quarters and Years. For example, ‘1Q11’ represents the 1st quarter of 2011, ‘2Q13’ represents the 2nd quarter of 2013, and so on. I also have records that that have a field using this format, ‘QuarterYear’.

The issue is, I need to incorporate this into a report, to have the data only display when the quarter and year is in between those specified in the parameter. For example, if a user selects ‘1Q12’ and ‘4Q12’, the report should display all records with a QuarterYear value of ‘1Q12′,’2Q12′,’3Q12’, and ‘4Q12’. If the user selects ‘1Q12’ and ‘2Q13’, the report should display records with QuarterYear value of ‘1Q12′,’2Q12′,’3Q12′,’4Q12′,’1Q13’, and ‘2Q13’.

It is difficult for me as these are not date values so I could not use a simple BETWEEN. Any suggestions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T07:07:39+00:00Added an answer on June 14, 2026 at 7:07 am

    For a relatively small table, the simplest way to do this might be to use string slicing – so your condition would be something like:

    where ...
    right(table_quarter,2)+left(table_quarter,1) >= right(@start,2) + left(@start,1) and
    right(table_quarter,2)+left(table_quarter,1) <= right(@end,2) + left(@end,1) 
    ...
    

    Note that this condition is non-sargable, ie. it won’t be possible to use any indexes on your table’s quarter-year column.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a report that takes two parameters from a couple of text boxes
I have some report and plenty of parameters inside that report. One of parameter
I have a report that is getting info from bsis, bsas, bsid, bsad, vbrk,
I have a report in InfoView that has in a footer showing the effective
I have a report that is basically a form with multiple empty fields and
I have a report that I run from a system once a week, and
I have a reporting module (C# asp.net) that uses dynamic controls to represent the
I have CMS table that contain CMS_STARTTIME and CMS_STOPTIME (attachment). alt text http://img339.imageshack.us/img339/755/exdatabase.jpg I
I have a basic report that has 7 fields. I want the data to
I have a Rails view that produces a HTML report based on the user

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.