Hi fellows, +------------------------------------------------------------ |
I think that the WINDOW clause can help you with this. Probably something like this:
|
Hi fellows, +------------------------------------------------------------ |
I think that the WINDOW clause can help you with this. Probably something like this:
|
Once you sign in you will be able to subscribe for any updates here
By RSS:Markdown Basics
Question tags:
question asked: 06 Sep '16, 15:32
question was seen: 1,544 times
last updated: 12 Sep '16, 15:51
Please show us the details of your two tables (i.e. the CREATE TABLE statements and the data (at least some sample data) and the queries you have tried so far...
What SQL Anywhere version do you use ("select @@version")?
I tried to exemplify and simplify above, my version is 12.0.1.3152
Hm, I have not yet understood your real requirements. What result would you expect based on your sample data?
In case you have to somehow "split" the invoices/purchases over a series of stocks (i.e. you have to check whether the fifth invoice belongs to that or the next stock, the following FAQ may give an idea - it's a different real world situation but possibly a similar usage of "the one-dimensional "First Fit" heuristic algorithm, according to Nick:
http://sqlanywhere-forum.sap.com/questions/21487/use-this-sql-with-sybase