Initial commit
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
USE [Database]
|
||||
|
||||
SELECT [p].[name] AS [product_name], [a].[name] AS [attribute_name],
|
||||
ISNULL(TRY_CONVERT(NVARCHAR(128), TRY_PARSE([pv].[value] AS datetime), 103), [pv].[value])
|
||||
FROM [Tables].[product_attributes] AS [pa]
|
||||
JOIN [Tables].[attributes] AS [a]
|
||||
ON [a].[id] = [pa].[attribute_id]
|
||||
JOIN [Tables].[products] AS [p]
|
||||
ON [p].[id] = [pa].[product_id]
|
||||
LEFT OUTER JOIN [Tables].[product_values] AS [pv]
|
||||
ON [pv].[product_id] = [pa].[product_id]
|
||||
AND [pv].[attribute_id] = [pa].[attribute_id]
|
||||
ORDER BY [p].[id];
|
||||
Reference in New Issue
Block a user