Viewing 15 posts - 3,286 through 3,300 (of 7,609 total)
Before loading the #Paid table, cluster it on all the GROUP BY columns:
Yr
,YrMnth
,Market
,AType
,Groups
,Code
July 5, 2018 at 8:30 am
To answer the original q, yes, there is a very easy way to "tell" the trigger not to do the INSERTs into table B.
Use specific byte(s) of CONTEXT_INFO...
July 5, 2018 at 8:24 am
Once you've sent a 9-digit number to them, and they've validated it, you shouldn't need to send them that exact same number again. That is, keep a cache of the...
July 3, 2018 at 11:07 am
Do you actually have NULL employee ids? That's rather bizarre.
If you do, use Thom's code. If not, all you need to write is:
where employee.cgId = @employeeid
If...
July 3, 2018 at 7:49 am
July 2, 2018 at 4:11 pm
You don't state what issue happens when you add the WHERE. [You don't need the N' and shouldn't use it.]
Perhaps there's some other character in the column besides...
July 2, 2018 at 3:01 pm
We could give a more specific answer if you'd show the actual code.
But, for example, if it's something like this:
WHERE ISNULL(date_column, '19000101') >= '20170101'
then you don't...
July 2, 2018 at 2:58 pm
INSERT INTO dbo.Tbl3 ( ID1, ID2 )
SELECT (SELECT ID1 FROM dbo.Tbl1 WHERE Name1 = @Name1),
(SELECT ID2 FROM dbo.Tbl2 WHERE Name2 = @Name2)
July 2, 2018 at 1:51 pm
SELECT Total_Input, Total_OK, Total_Fail,
CASE WHEN Total_Fail > 0 AND Total_Fail > Total_OK THEN Total_OK
WHEN Total_Fail > 0 THEN Total_Fail
...
July 2, 2018 at 1:42 pm
SELECT b.time * 1.0 credit, 0.0 credits, b.Id, b.date
FROM staff b
INNER JOIN (
SELECT *, isnull(dbo.ConvDate2(e.Startdate),'20111101') AS Startdate_converted
FROM emp
July 2, 2018 at 9:18 am
Viewing 15 posts - 3,286 through 3,300 (of 7,609 total)