Skip to content

Tag: sql-server

SELECT from a table partition by order and status

So I have the following Searches table: The status is a combination of ClosedOn and ClosedByUserID: Pending: If ClosedOn and ClosedByUserId are null Outdated: If ClosedOn is not null and ClosedByUserID is null Closed: If ClosedOn is not null and ClosedBYUserID is not null I am trying to select all records and…

Problems passing a Python String to SQL query

I got some issues passing my SQL query made in Python to MS SQL. Were talking about retrieving some code via pyodbc, editing it with regex, and passing it back into a new table of the Database. I also tried some print()-Commands to assure the Code is running in Python and being edited the right way, but I am …