Relative Content

Tag Archive for sql-servert-sql

Combine table fields into one unique value (as input for HASHBYTES)

Objective I want to combine the four fields of a row into one value, named “COMBINED_VALUE”. These strict rules apply: Two rows with the same field values in the same order must produce the same COMBINED_VALUE. No two different rows may produce the same COMBINED_VALUE. Order of fields makes a difference, trailing spaces make a […]

SQL Server: Invalid Column with view and multiple schemas

I have two tables and two schemas created. I’ve already have a VIEW using both tables and both schemas. But when I try to modify it I receive the error invalid column name. But if execute the query (only the SELECT statement) with f5 it works fine.

T-SQL claim subquery returns more than one value yet the data is unique

First Question. I am using SQL Server 2012. I couldn’t find a similar problem in other places, and I am still learning SQL.
I am trying to get a subquery to return one value. My table (JobMilestones) is unique when you compare JobPaperID AND Milestone. Any independent query will return only one value or no values. It gives and error –