Skip to content

Issues creating a function

Thank you for reading my post and trying to assist. I am pretty new with PostgreSQL and am struggling with trying to create a Function to transform a table column that is currently integer (1,0) into ‘Yes’ or ‘No” and redisplaying the table after the change, what’s your recommend…

What part of my query is invalid with MySQL 5.7?

I have created the following query: It works during development but after testing it on the production server (which is uses MySQL 5.7) I get the following error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘cte1 A…

Parameter returning not in the correct format

I have an async task method that queries a database table for the total amount of Credits in a specific column. I have a string parameter in the method that I use for the query to identify which user is logged in, which is stored in Properties.Settings.Default.Student_Number;. The column for the student numbe…

SQL Query Subtracting Values from Two Tables

I have two tables, demand and fte, that have department, shift and demand or fte. I need to calculate the need (demand – fte). What I get is a table with 9 entries. I’ve run into this before and for …

how to use first_value with reset

WITH t AS ( SELECT * FROM (VALUES (‘2021-10-09 23:58:34.000’, ‘2021-10-10 00:00:00.000’, ‘task_completed’, ‘00001’), (‘2021-10-10 00:00:01.000’, ‘2021-10-10 00:…