Viewing 15 posts - 376 through 390 (of 7,187 total)
All you need to do in the database is associate the user with the login. The permissions come over with the database so you don't need to touch them. From...
November 11, 2019 at 4:21 pm
Why does it need to be improved - does it not work?
I would start by making sure you have the same number of ENDs as BEGINs. Then I would consider...
November 11, 2019 at 9:31 am
You'll need to change the collation of the databases or of the server (not a trivial task), or insert COLLATE clauses in your code. You'll probably find you need a...
November 8, 2019 at 12:47 pm
Yes, I agree, Phil. Casting to date preserves sargability; converting to varchar doesn't.
John
November 8, 2019 at 12:29 pm
Well, if those logins have a default database that doesn't exist, or if you are specifying a non-existent database at connect time, then the connections will fail.
John
November 8, 2019 at 11:33 am
It tells you how to evaluate the SET options in the documentation for dm_exec_plan_attributes. You can use the bitwise operators to do it programmatically.
I don't know whether there's anything...
November 8, 2019 at 10:58 am
In which case there must be multiple rows in Base_Risks with the same [pol_numpol contract_id] and [sor_ident contract_update_id] for the value for which you're getting the duplicates.
John
November 8, 2019 at 10:42 am
Without seeing your data, it's very difficult to help you. What happens if you run only the query in the echantillon CTE? Do you get the duplicate then?
John
November 8, 2019 at 10:28 am
Temp tables will be created in tempdb regardless of your database context. Yes, of course creating them takes resource - disk space, processor, memory, IO. Do you have a link...
November 8, 2019 at 10:14 am
I like it! And you can simplify it further:
SELECT batch_Id
, get_customeVal_3 =...
November 7, 2019 at 4:16 pm
I'd guess that if XACT_ABORT is OFF then only the statement that's running at the moment of the timeout will be rolled back. Whether that rollback occurs gracefully and expeditiously...
November 7, 2019 at 3:12 pm
WITH Last24Hrs AS (
SELECT
VisitID
,IdentifierID
,ActivityDateTime
,DATEADD(HOUR,-24,MAX(ActivityDateTime) OVER (PARTITION BY VisitID)) AS _24HrsBefore
FROM #T1
)
SELECT
VisitID
,IdentifierID
,ActivityDateTime
FROM Last24Hrs t
WHERE t.ActivityDateTime >= t._24HrsBefore;
John
November 7, 2019 at 2:54 pm
This is a good reference for connection strings. If you can't find what you're looking for there, just include the SET statement in your code. Probably best to do...
November 7, 2019 at 11:57 am
OK, are you telling me that in case I'm interested, or do you have a follow-up question? Note that it says "Default connection options" in that dialog box. As I...
November 7, 2019 at 11:04 am
Viewing 15 posts - 376 through 390 (of 7,187 total)