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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:19:10+00:00 2026-06-17T08:19:10+00:00

I am using an older version of sybase which does not have keywords like

  • 0

I am using an older version of sybase which does not have keywords like lead.

I have a table like one shown below.

Type  Row   Time        Quantity        
cat1  1      10:01:01.000     50          
cat1  2      10:01.01.001     0          
cat1  3      10:01:01.002    1000          
cat1  4      10:01.01.003    100          
cat1  5      10:01:03.001    100          

I have above data available for cat2, cat3, etc. as well. The data is arranged in increasing order of time.

I want to generate a new table from the above table where the values only starting at 10.01.01.002 and later would be present as it is the first row/time where the minimum required quantity of 1000 is satisfied. i.e. include rows 3, 4, and 5 in new table as it is only at 3rd row that minimum quantity is fulfilled. The above data is for cat1, cat2, etc.

The table above is massive so I am looking for an efficient method.

Thanks

  • 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-17T08:19:11+00:00Added an answer on June 17, 2026 at 8:19 am

    You can use TOP 1 to find the first item of your criteria then use that in a select statement.

    Like this (not sure your exact requirements)

    declare @marker datetime
    
    SELECT TOP 1 @marker = Time 
    FROM TableName 
    WHERE Quantity > 1000 ORDER BY Row DESC
    
    SELECT * 
    FROM TableName 
    WHERE Time > @marker
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using an older version of sybase which does not have keywords like
I have a drag and drop script using an older version of jquery which
Previously I've been using some older version of django-registration which seems to be deprecated
I am using an older version of SQL Server (2000). I do not want
I am currently using an older version of Umbraco (4.03) and I have several
I have been using the older version of analytics code and used the following
This code (by someone else) might have been written using an older version of
First off, I'm using an older version of Restlet (1.1). Secondly, I'm not sure
I have 2 different tables which look something like the following: --------Table 1--------------------------------------------------------- Cat1
I am using an older version of Xcode - 3.1.3. and want to install

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.