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

  • SEARCH
  • Home
  • 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 3603688
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T20:54:11+00:00 2026-05-18T20:54:11+00:00

Background Im trying to create a report via ingres where i provide 2 dates

  • 0

Background
Im trying to create a report via ingres where i provide 2 dates ($begin_date and $end_date)
this report will provide me with errors from a system that occured between the two dates.
If these dates are less than one day apart, I should have a more detailed report.

Question
Is there any way to have more than one select in this report dependent on the difference between the dates?
like:

$end_date - $begin_date = difference
.QUERY

if difference < 1 day
    select col1, col2, count(*) as number from table
    group by col1, col2
else
    select col1, count(*) as number from table
    group by col1

Or instead have a if statement inside the SELECT, im not an experienced sql user so not sure about that last one, if its even possible.

Any help would be awesome, or any pointers what I should search for.

  • 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-05-18T20:54:11+00:00Added an answer on May 18, 2026 at 8:54 pm

    Create a proc, and use $begin_date & @end_date parameters.

    Add your logic in proc, and output is dynamic table structure.

    You should allow the object to automatically adapt to the structure in the program.

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

Sidebar

Related Questions

I am trying to create CGImage from NSTextField. I got some success in this.
Background I am trying to create a copy of a business object I have
Background: I'm trying to create a pure D language implementation of functionality that's roughly
Here's some background on what I'm trying to do: Open a serial port from
Background: I'm trying to create a simple feed reader for which I'm using the
A little background: I am trying to create a lightweight cookieless database-backed user session
I'm trying to create a variable background, where the image changes based on the
I'm trying to create standard button in android with a background and some text
I'm trying to create a transparent (no button background) ImageButton that has a custom
I'm trying to create a button with icon like this : HTML: <div id='button'>

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.