Skip to content
Advertisement

How to list relations in postgres schema

I need help with a pretty basic Postgres command, but I cannot find a reference anywhere. My cluster is set up like this: database_1 – schema_1 – schema_2 – relation_1 – …

How to get missing values in sql?

I need help. I have a sql table t2 related to two other tables t1 and t3. t2 has fields: I’m searching for values, where ifFromt3 is missing. I want to fint in this example, the value ifFromt3 = 3, because of it’s not present. I’m doing it like this example, but it doesn’t work correctly. This are the 3

using DateDiff to find duration in minutes

I am trying to use Datediff to find out the duration between columnA and columnB. This produces errors. Can anyone please help me with what I’m doing wrong? Answer how about trying this, not sure why you have stime = [exceptions2].starttime and etime = [exceptions2].endtime

How to divide two columns?

I tried to divide two columns from joined tables but the result (value of column relative_duration) is always 0. The query is the following: SELECT t1.[user_1] ,t1.[user_2] ,t1.[…

Update values in identity column

How do I override the identity column in MSSQL? I tried : SET IDENTITY_INSERT GeoCountry ON UPDATE GeoCountry SET CountryID = 18 WHERE CountryID = 250 But I get back a Line 2: Cannot …

Advertisement