Activity overview
Latest activity by buinauskas
@RichardL I've done it. Thanks! / comments
@RichardL I've done it. Thanks!
Code Coverage Error
Latest SQL Test comes with Code Coverage tool, however it doesn't start up. I'm getting the following exception:
SQLCover.SqlCoverException: SQL Cover was not started, or did not start correctly....
I've modified my test and have test case as follows:
SELECT @Output += s.name + '.' + t.name + CHAR(13) + CHAR(10)
FROM sys.tables AS t
INNER JOIN sys.schemas AS s
ON s.schema_id = t.schema_id
WHERE t.is_ms_shipped = 0
AND NOT EXISTS ( SELECT *
FROM sys.indexes AS i
WHERE i.object_id = t.object_id
AND i.is_primary_key = 1)
ORDER BY s.name, t.name;
Works like a charm. / comments
I've modified my test and have test case as follows:
SELECT @Output += s.name + '.' + t.name + CHAR(13) + CHAR(10)
FROM sys.tables AS t
INNER JOIN sys.schemas AS s
ON s.schema_i...
@Tianjiao_Li Hello, that's not a huge inconvenience at all. I'll submit it!
Thanks,
Evaldas / comments
@Tianjiao_Li Hello, that's not a huge inconvenience at all. I'll submit it!
Thanks,
Evaldas
Formatting SQL statements that contain WITH CHANGE_TRACKING_CONTEXT
So I've got SQL statement as follows:
WITH CHANGE_TRACKING_CONTEXT(@ContextID)
UPDATE lcoc
SET lcoc.cmpName = tmp.cmpName
, lcoc.ctyCode = tmp.ctyCode
, lcoc.cmpYearDead = tmp.cmpYearDead
, l...
@AlessandroAlpi I didn't know that! Should've been more careful and looked at documentation.
You are correct. Thanks a lot! [image] / comments
@AlessandroAlpi I didn't know that! Should've been more careful and looked at documentation.
You are correct. Thanks a lot!
@AlessandroAlpi hello!
I know I can ignore this rule just by excluding it. However that's not what I'd like to have.
User stored procedures can and should be executed in named parameter style. That makes code more readable and easier to understand.
However some built in (system) stored procedures can only be executed ONLY IN non-named parameter style (as far as I know). One of them is sys.sp_executesql.
So it kinda makes sense not to label these kind of procedures as code analysis violations because there's no way to execute it in named parameter style.
Also, this is not a deal breaker, but something rather nice to have.
Hope I'm clearer this time. / comments
@AlessandroAlpi hello!
I know I can ignore this rule just by excluding it. However that's not what I'd like to have.
User stored procedures can and should be executed in named parameter style. That...
Non-named parameter style for sp_executesql
I've got a perfectly valid sp_executesql statement to run my dynamic queries, however SQL Prompt marks it as an issue. There's no way to add parameter names to it.
Code sample:
EXECUTE sys.sp_execu...
@enoch I know it's poor. But I'm asking about using Git (doesn't matter whether it's GitHub, Gitlab, TFS Git) on shared development model. / comments
@enoch I know it's poor. But I'm asking about using Git (doesn't matter whether it's GitHub, Gitlab, TFS Git) on shared development model.