SELECT some_column = (your select query
for xml path(''))
SELECT Documente = (SELECT coalesce(td.Descriere+',','') as [text()] FROM Document d
INNER JOIN TipDocument td ON d.TipDocumentId = td.Id for xml path(''))
SELECT some_column = (your select query
for xml path(''))
SELECT Documente = (SELECT coalesce(td.Descriere+',','') as [text()] FROM Document d
INNER JOIN TipDocument td ON d.TipDocumentId = td.Id for xml path(''))
If when you try to open a database or attaching a .mdf file you get the error:
is compressed but does not reside in a read-only database or filegroup. The file must be decompressed.
So here is the algorithm I followed to solve this issue:
1. only if an existing database gives this error detach the database – right click -> Detach
2. closed all SQL Server Management Studio instances
3. Stop the SQL Server service.. (Start->Run -> services.msc)
4. Selected .mdf file(should be blue if compressed ) Right click properties -> Advanced -> Uncheck "Compress files to save disk space"
5.(re)attach .mdf file
SET DATEFIRST 1 --start day is Monday
SET DATEFIRST 7 --start day is Sunday – default
To test it PRINT @@DATEFIRST
From the very first days in our lives as programmers , we’ve all dealt with data structures: Arrays, linked lists, trees, sets, stacks and...