Viewing 15 posts - 241 through 255 (of 670 total)
you can check to see if the start time > end time and subtract 1 from the date of the end time, but that only assumes that it will be...
July 24, 2018 at 9:54 am
Do you have a split string function already? If not you can find one here http://www.sqlservercentral.com/scripts/T-SQL/100014/
Then simple call to it
select *
July 19, 2018 at 1:36 pm
If the xml is the same, then you could use a dynamic pivot
Use TempDB
drop table if exists test
create table test (id...
July 19, 2018 at 10:55 am
I changed the join to numbers to cast the values as dates and it returns the 5th line I believe you are looking for. Also, I changed the data to...
July 16, 2018 at 6:49 am
why do you want to concatenate these 3 columns in the where clause anyway? Are you joining against a table where it concatenated together? Otherwise, why not just put in...
July 13, 2018 at 9:44 am
How is the data stored? Based on what you asked, you want to concatenate DOB to Fullname and then search by it. Something like:
where FullName in ('01/01/2000 Sarah...
July 13, 2018 at 9:03 am
There was some bad data in there, that e didn't account for. I added the criteria below
;WITH CTE AS (
select pcode,pkey, RowEffectiveDate, rowenddate,...
July 12, 2018 at 7:09 am
I don't see an attachment
July 11, 2018 at 1:47 pm
Try this.
btw, my table has over 200,000 records and the query returns in 5 seconds without the PCode = parameter
INSERT INTO #dimP (pcode, pkey,...
July 10, 2018 at 10:51 am
DECLARE @SQLString nvarchar(500);
SET @SQLString =
'declare @String nvarchar(500) = ''SELECT BusinessEntityID, NationalIDNumber, JobTitle, LoginID
FROM '' + @DbName + ''.HumanResources.Employee '' EXECUTE sp_executesql...
July 10, 2018 at 8:38 am
(DT_WSTR,4)...
July 10, 2018 at 7:04 am
Did you look at the plan to see what it was doing? How much is alot of data?
July 9, 2018 at 6:09 pm
This will convert it to YYYYMMDD which would be easier to find if more than one year is in the folder.
select convert(varchar(10), getdate() - datepart(DW, getdate())...
July 9, 2018 at 12:27 pm
Depends on which day is the first day of the week. I threw this together to get 2 Saturdays ago, but I'm sure there's a better way. Just ran out...
July 9, 2018 at 11:05 am
Drew is right, Put that in an Execute SQL task and assign it to a variable in the package, then in the Expression Builder, you can reference the variable. Set...
July 9, 2018 at 7:45 am
Viewing 15 posts - 241 through 255 (of 670 total)