Skip to content

TSQL query with aggregated data

I have a query that returns the min, max, avg and total for two different products. The client however wants the min, max, avg and total combined for both products. However I have an undesired result …

PostgreSQL check number of tables that match regex

It there a good way to check the number of existing table in the database that matches a particular format? For example, I am looking for any table names that starts with ‘rangtable’, such as ‘…

nested join in Db2

Folks, what is wrong with this query i get error stating below in DB2 LUW. [42703][-206] “d.sales” is not valid in the context where it is used.. SQLCODE=-206, SQLSTATE=42703, DRIVER=4.23.42 [56098]…

How to record who edited a table in my sql

Is there a function to automatically update a column specifying who created a new record in a sql table? Something similar to the timestamp, but that instead of the time it shows the user who has …

Multi Part Identifier Can Not be Bound

I’m having trouble getting past this error. I’m using SQL Server 2017 (v14): The multi-part identifier “PS_FFC.Date” could not be bound. The multi-part identifier “PS_FFC.Date: could not be bound. …