Can I get some help with creating this query.
I have one table which has the following columns I am interested in:
RecordID (FK, bigint, not null)
PropertyID (big int, not null)
PropertyVal (sql_variant, null)
And another table with the next columns I want:
RecordID (PK, not null)
NTName (nvarchar(400), not null)
Each user will have one entry in the UserProfile_Full table, but can, and usually will, have multiple values in the UserProfileValue table.
So, for example, my entry in the UserProfile_Full table would be:
And the matching records in the UserProfileValue would be:
2217 10002 Consumer
2217 10007 email@example.com
I want to return the data in the following style:
2217 darrylg Consumer firstname.lastname@example.org
I cannot remember the SQL syntax to produce these results, can you help?