Viewing 15 posts - 4,726 through 4,740 (of 5,111 total)
IF my understanding is correct, STUFF and FOR XML PATH should do what you want. I haven't tested this mind, as I don't have any sample data or DDL.
CREATE...
December 7, 2016 at 10:02 am
Firstly, please put your code in IFCODE Tags, putting it straight into the box makes it quite difficult to read, and has no formatting.
Secondly, you've provided what you've attempted which...
December 7, 2016 at 9:57 am
Fast.Eddie (12/7/2016)
Thom A (12/7/2016)
December 7, 2016 at 7:47 am
Ok, I've used the Tally Table within the query, however, I still strongly suggest you have a Calendar table made on your SQL server. There's really no reason why your...
December 7, 2016 at 6:01 am
Fast.Eddie (12/7/2016)
December 7, 2016 at 5:47 am
Fast.Eddie (12/7/2016)
Thom A (12/7/2016)
This would be an extremely easy task with a Calendar Table[/url].This should get you started:
Thanks, but with our remote access to MS Server, we can't create Views...
December 7, 2016 at 5:35 am
This would be an extremely easy task with a Calendar Table[/url].
This should get you started:
USE DevTestDB;
GO
CREATE TABLE #OpeningHours
(
WorkingDay VARCHAR(12), --Why was this a TEXT field!? Use VARCHAR, TEXT is deprecated.
from_time...
December 7, 2016 at 5:01 am
Rechana Rajan (12/7/2016)
December 7, 2016 at 4:46 am
padmakumark26 (12/7/2016)
Thanks All.Schema prefix is must for function ? Like Select myschema.myfunction('Test')
Correct; if using a function, the schema must always be declared.
December 7, 2016 at 3:59 am
John Mitchell-245523 (12/7/2016)
December 7, 2016 at 2:53 am
padmakumark26 (12/7/2016)
Is it possible to create sqlserver objects with out schema like Test not like dbo.Test or Function like F_GetData not like dbo.F_getdata.
Schemas are a part of SQL Server. You...
December 7, 2016 at 2:29 am
drew.allen (12/6/2016)
adonetok (12/6/2016)
Where is "near '-'" from script?
(352866 row(s)...
December 7, 2016 at 1:55 am
Why do you want to Loop? That would be incredibly inefficient.
Are you sure that you want to do this to all fields, regardless? Do I assume that you don't...
December 6, 2016 at 9:02 am
From you initial description, I assume that you've created a separate dataset for each employee? What happens if an Employee leaves, or joins? You'd have to update the report (not...
December 6, 2016 at 8:43 am
If you're using SSIS, why are you completing this task in SQL? Would it not be easier to use the XML Task?
December 6, 2016 at 8:11 am
Viewing 15 posts - 4,726 through 4,740 (of 5,111 total)