Skip to content

Tag: record

SQL Server check for prior record only

I have these columns: type(char), date , price. I would like to check if the same type’s price has not changed in the previous record. I tried this for start: I only want to check for the date prior not for every date that is smaller. This table stores price changes. product_type change_date price &#821…

How to edit and return a Cursor in plpgsql?

I am doing a simple query inside a function, and I need to change the values ​​of this query, but only for information. I don’t need to update the table as such. I managed to edit the values ​​but I don’t know how to return them. And below this function will be executed As you can see, the query d…