Skip to content

Tag: sql-server

SQL multiple rows calculate

I have a table in SQL Server and I am trying to calculate if a number is bigger than a selected row, but only if the rows that exist are greater than 1. I’ve looked online and looked into Union, …

Yesterday SQL Server

I know very little SQL and have been asked to fix a problem in existing code. The code is PHP but the SQL causing the problem is: $sql = “INSERT INTO Intranet.dbo.DailyBilling (Date, JobCode, SubJob,…

Select Subquery Group By

I am having an issue with this simple query. I get the error “Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, , >= or when the subquery is …

Cannot insert the value NULL into column ‘ExampleID’

Upon executing I keep receiving the error: Cannot insert the value NULL into column ‘ExampleID’, table ‘DB_Example.dbo.tbl_Example’; column does not allow nulls. INSERT fails. However I don’t think any NULL values are present. I am trying to simply fill a table with specific valu…