Viewing 15 posts - 736 through 750 (of 1,468 total)
September 13, 2018 at 10:16 pm
You could also create a re-usable function
CREATE FUNCTION dbo.GetJulianDate(
 @SomeDate datetime
)
RETURNS TABLE WITH SCHEMABINDING
AS RETURN
SELECT JDate = YEAR(@SomeDate)*1000 + DATEPART(dayofyear,@SomeDate);
September 13, 2018 at 2:10 pm
This will give you the current date in the format YYYYDDDSELECT YEAR(GETDATE())*1000 + DATEPART(dayofyear,GETDATE());
September 13, 2018 at 1:59 pm
September 13, 2018 at 1:27 pm
September 13, 2018 at 12:43 pm
Also note that your left join is effectively converted into an inner join by your where clause
September 12, 2018 at 10:33 pm
September 10, 2018 at 11:05 am
September 6, 2018 at 3:48 am
below86 - Wednesday, September 5, 2018 1:30 PM5150
Studio
September 5, 2018 at 1:35 pm
What about putting the staging tables in a separate DB on the same instance.
Then ensure that your ETL pushes from the staging DB to the final DB.
That way,...
September 5, 2018 at 1:00 pm
I would like to store the first "select" result into a variable to...
September 5, 2018 at 12:31 pm
September 4, 2018 at 10:51 am
September 3, 2018 at 10:32 pm
Without sample data or an expected outcome, I believe that the following SQL statement should do the trick.
DECLARE @campus_cd nvarchar(300)
  , @cmpy_code nvarchar(500)
  , @year1  ...
September 3, 2018 at 9:15 am
Viewing 15 posts - 736 through 750 (of 1,468 total)