Viewing 15 posts - 4,351 through 4,365 (of 5,111 total)
Steve Jones - SSC Editor - Monday, January 30, 2017 8:54 AMTabs or space in source?
Spaces.
January 30, 2017 at 9:03 am
This is what it looks like for me.
If you compare to the text file, the alignment is completely different. (see image below from SSMS)
It seems...
January 30, 2017 at 4:07 am
Welcome to SSC.
Posting your data in a Excel probably isn't going to get you as many responses as you'd like, the best way is to always provide your...
January 30, 2017 at 3:18 am
You could check for the status of the job after running:IF (SELECT TOP 1 run_status FROM msdb.dbo.sysjobhistory WHERE job_id = '756E4E19-E6CC-4874-A7D7-B3EBE44A09D4' AND step_name = '(Job outcome)' ORDER...
January 30, 2017 at 2:41 am
Cube data warehouses relying heavily on foreign keys, I'm surprised that the 2018/2019 years could be entered if they don't exist in your Year Dimension (this implies that you don't...
January 30, 2017 at 2:34 am
Does this work?
DECLARE @Birthday DATE,
@AsOf Date;
SET @Birthday = '01-May-1987';
SET @AsOf = '19-May-2000';
SELECT DATEDIFF(YEAR, @Birthday, DATEADD(YEAR, DATEDIFF(YEAR, 0, @AsOf),0)) -
January 27, 2017 at 2:56 pm
Are you able to provide any sample data which shows the error occurring? There could be a number of reasons the conversion is failing, but without data it's a bit...
January 27, 2017 at 1:06 pm
Have you tried wrapping your cities in Quotes?
City = '"' + STUFF((SELECT ',' + City + CHAR(10) + FROM ##DATA s WHERE s.District = b.District FOR...
January 27, 2017 at 10:04 am
I've been having a Google of the problem, which discusses that the issue is due to having a timezone of greater than UTC +00:00, however, this was "resolved" in CU1,...
January 27, 2017 at 9:12 am
The dbcreator role does provide a login with db_owner user permissins on databases they create. Note, however, that it won't give db_owner to other Logins with the dbcreator server role.
January 27, 2017 at 7:19 am
January 27, 2017 at 5:23 am
CREATE TABLE #Date (DateColumn DATE)
GO
INSERT INTO #Date
SELECT '01-Jan-2017';
GO
SELECT CASE WHEN DateColumn BETWEEN DATEADD(DAY,-7, CAST(GETDATE() AS DATE)) AND GETDATE() THEN 1
January 27, 2017 at 5:19 am
CASE WHEN DateColumn BETWEEN DATEADD(DAY,-7, CAST(GETDATE() AS DATE)) AND GETDATE() THEN 1
WHEN DateColumn BETWEEN DATEADD(DAY,-14, CAST(GETDATE() AS DATE)) AND DATEADD(DAY, -7, CAST(GETDATE() AS DATE))...
January 27, 2017 at 5:12 am
DateColumn BETWEEN DATEADD(DAY-7, CAST(GETDATE() AS DATE)) AND GETDATE() --Would return rows where the DateColumn has a value 20-Jan-2017 to now INCLUSIVE
DateColumn BETWEEN DATEADD(DAY-14, CAST(GETDATE() AS DATE))...
January 27, 2017 at 4:41 am
Viewing 15 posts - 4,351 through 4,365 (of 5,111 total)