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 9238913
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T07:52:11+00:00 2026-06-18T07:52:11+00:00

I am implementing booking tool for process. There is inventory you can use –

  • 0

I am implementing booking tool for process. There is inventory you can use – if you want to book process for a day AM and PM slot of this day is being used up. Then when calendar is being displayed, it brings all existing bookings showing for example that this room is not available in specific period of time.

Difficulty I am having is, that returned entries that are being displayed NOT in order so ‘AM’ slot after ‘PM’ slot. it all seem quite random it might be confusing for end user.

SELECT * FROM 
(
select 

query to select room 1 where slot is AM

UNION ALL

query to select room 1 where slot is PM

UNION ALL

query to select room 2 ( this room can be booked only for whole day )

)

ORDER BY slot ASC

this is structure of query I used. It returns entries correctly but not in order. I presume it is due to nested select statements.

What is the best approach to solve this problem?

  • 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-18T07:52:12+00:00Added an answer on June 18, 2026 at 7:52 am

    After losing hope to over come this problem I accidentally stumbled across solution for the problem. Basically Apex calendar rely on date column but if there more than one record assigned to one day then it display them in random order. Some people suggested adding another column to add some ordering into it, however this would produce another layer of complexity which is not necessary. Solution:

    SELECT ename, hiredate  +  rownum / 24 / 60 FROM 
    (SELECT   ename, hiredate
        FROM emp
       ORDER BY ename)
    

    by adding rownum parameter to date column Apex can pick up difference between records and suddenly everything works as it should be with normal order by.

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

Sidebar

Related Questions

implementing publishActivity in PHP using the REST API using this code: $activity = array(
Implementing a custom membership provider, there are certain properties such as MinRequiredPasswordLength that only
when implementing a recursive function during development, i will use a counter and exit
I have tried to find out the working solution for implementing simple events booking
Implementing a custom VM and I've come to use registers (these will store pointers
Implementing a low pass FIR filter, when should one use FFT and IFFT instead
Im implementing NFS and almoste done but the RFC section 3.3.8 says this in
Im Implementing a video broadcasting website. For that I planned to use silverlight player
Implementing/handling idempotency in c# with Jolivers EventStore. Does this mean just taking care of
I am implementing a business requirement for boats booking, each booking is a period

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.