I'm running a simple update on my base, however the set I'm giving is being replicated to all rows in the table.
Follow the script you ran:
update reference_vendor set internalid = v.internal_id
from reference_vendor rv
inner join c...
Well, how do I get the last day of the previous month dynamically (associated with the current date);
I have a column that is associated with the date in Milliseconds 'wo.CREATEDTIME' - Example of some dates in this format: >
152780...
I need to change a table field in my database to perform some tests, and would like to update only the last 100 records in the table. I already tried this code: UPDATE titulo SET autorizado='S' ORDER BY id_titulo DESC LIMIT 100; More this...
Situation
Let's say I have a form on which the user fills a date field, DD-MM-YYYY.
Question
How can I make postgres accept this format normally?
No need to to_timestamp('14/06/2016', 'DD-MM-YYYY')
Addendum
SELECT...
I'm creating a select where I need to check on one of the columns that is of type integer [] if it has one of the values passed in the condition.
For example:
idTarefa | Setores
1 | {1,3,4}
2 | {2}
Knowing that the Sectors...
I need to make the sum of all the differences of the intervals that fulfill the condition of the where. There is only one, however, if there is no end_date on this line, I need to pick up the current schedule and do the calculation with the curr...
Is there a difference in performance when querying the database, depending on the number of characters entered in the query?
For example, if a query is made for any record that has the 'a' character, will it spend more processing than searchi...
I am trying to compare 2 timestamp fields, which have different dates, ignoring the dates and using only the hour / minute simultaneously, to know, within one day which one is larger.
EX: '2000-10-10 10:00:22' > '2000-02-02 11:00:10'
In...
I have the following query :
SELECT
s1.suprimento,
e1.numeroserie,
s1.capacidade,
e1.numeronotafiscal,
e1.valorunitario,
e1.datanotafiscal
FROM
public.estoque e1,
public.suprimento s1,
public.fornec...
I'm currently developing a program to help manage a barracks in my city, I'm using Qt to create the graphical interface and other necessary libraries like database manipulation, for the server I'm using postgres , when trying to cre...