Skip to content

Tag: sql-server

Migrate data from SQL Server to PostgreSQL

I have a stored procedure function as well as table in the SQL Server enterprise 2014. I also have data in the table. Now I need same table and data in PostgreSql(pgAdmin4). Can anyone suggest to me the idea to migrate data to POSTGRESQL or any idea on creating the SQL script so that I can use psql to run

Merge the table based on date and condition

I have following table: In this table type will be 1,2,3,4.. here date and type both are composite key. I need to merge the row based if same date exist to single row and merge based on only below condition and grp col is based on running count of date. Answer Try GROUP BY FIDDLE DEMO Output