Skip to content

CTE function with insert statement

I have 2 queries and I need to combine them into one query with an insert statement. This is my first query that already has an insert statement: with q as ( select s.department ,s….

Count records per month with condition

I have a table, let’s call them SUMMARYDATA NIP NAME DEPARTMENT STATUSIN STATUSOUT LATECOME —————————————————————————-…

REPLACE not removing the correct characters

Here is the query : SELECT ‘,’+ REPLACE(wo_note, ‘ ‘, ”), basically I want to remove the characters ‘amp;’ but it does remove it when I am entering it, SELECT ‘,’+ REPLACE(wo_note, ‘amp; ‘, ”) I …