Viewing 15 posts - 1,591 through 1,605 (of 6,036 total)
Orlando Colamatteo (2/28/2016)
Try this instead of going straight to a string:
DECLARE @D DATETIME = '2016-02-28 19:04:51.997';SELECT CAST(CAST(@D AS TIME(3)) AS VARCHAR(8));
It returns exactly the same result as the original conversion:DECLARE...
February 28, 2016 at 9:03 pm
INSERT INTO Table3 (MachineID, Timestamp, Account, BiosID, Serial number, Hostname )
select MachineID, Timestamp, Account, BiosID, Serial number, Hostname
FROM Table1
WHERE NOT EXISTS (select * from Table3 where Table3.UniqueKeyCol1 = Table1.UniqueKeyCol1...
February 28, 2016 at 1:59 pm
Oh yeah, and this:
(SELECT P.DateID FROM ADW.dim.Period P WHERE P.[Date] = IGY.DOS) AS Date_ID,
(SELECT P.DateID FROM ADW.dim.Period P WHERE P.[Date] = IGY.PostDate) AS PostDate,
...
February 24, 2016 at 8:21 pm
First, you need to replace this strange piece of code:
LEFT join ADW.DIM.Modality M
ON SO.ModalityCode = M.ModalityCode
JOIN ADW.dim.Department D
ON D.DepartmentID = CASE WHEN M.departmentID is null then...
February 24, 2016 at 8:15 pm
patrickmcginnis59 10839 (2/24/2016)I got 2 rows if I set xact_abort on, maybe that's his default?
Yep, spot on.
Isn't it anyone's default?
Same as ANSI_NULLS?
February 24, 2016 at 2:50 pm
The answer is plainly wrong.
Did anyone of you guys who think "3" is a correct answer actually run the script in a batch?
The question repeats the word "batch" so many...
February 23, 2016 at 8:55 pm
If you cannot change the indexes than you can maximise the effect of existing ones.
I may assume that ID's are generally inline with upsrt_dttm.
There might be some deviations, but they...
February 23, 2016 at 3:02 pm
Loner (2/19/2016)
As I said before, the database is created from the software company, I cannot create any index.
When a faulty part or design fault is discovered in certain model of...
February 23, 2016 at 1:47 pm
Agree with Hugo, you're using probably the worst possible way for the task.
You better retrieve the list of all files in one go, using, say, xp_dirtree:
EXEC master.sys.xp_dirtree 'C:\aaa\contracts\', insert...
February 22, 2016 at 3:29 pm
For non-delimited string you don't need a splitter, use just a Tally table:
DECLARE @prmCallType VARCHAR(8000) = 'ABC';
SELECT N, SUBSTRING(@prmCallType, N,1)
FROM dbo.TallyGenerator(1, LEN(@prmCallType), 1) tg
February 22, 2016 at 2:55 pm
Can you see how many rows are actually updated by the first statement?
February 18, 2016 at 6:59 pm
Phil Parkin (2/18/2016)
February 18, 2016 at 6:48 pm
Alan.B (2/17/2016)
Sergiy (2/17/2016)
Make the PK on UserID non-clustered and create a clustered index on UpdateDt.
Unless UpdateDt is not unique. Then perhaps a clustered index on composite key consisting of UpdateDt...
February 17, 2016 at 9:31 pm
Jacob Wilkins (2/17/2016)
Sergiy (2/17/2016)
Check for existence would do just fine:
select t1.[StockCode],t1.[SalesOrder],t1.[SalesOrderLine],t1.[LotNumber],t1.[Customer],
t2.[ShipDate][/i],
from table t1
WHERE EXISTS...
February 17, 2016 at 4:27 pm
Since you're not returning anything from table t2 there is no point in using a JOIN.
Check for existence would do just fine:
select t1.[StockCode], t1.[SalesOrder], t1.[SalesOrderLine], t1.[LotNumber], t1.[Customer], t2.[ShipDate],
from table...
February 17, 2016 at 4:18 pm
Viewing 15 posts - 1,591 through 1,605 (of 6,036 total)