Viewing 15 posts - 1 through 15 (of 81 total)
DesNorton, your solution is so much simpler. Thank you very much!
April 28, 2022 at 7:13 pm
DECLARE @naam AS varchar(20) = 'I' + RIGHT(CAST(DATEPART(yy,GETDATE()) AS varchar),2) + RIGHT('0'+CAST(DATEPART(mm,GETDATE()) AS varchar),2) + '-' + @zeroes + @MAX_naam;
April 28, 2022 at 2:28 pm
Oh bless you, Scott Pletcher, this works wonderfully.
April 27, 2022 at 6:12 pm
OK, you're right. However, when I change my code to DECLARE @zeroes AS varchar(5) I get the same result. @zeroes = '0'
April 26, 2022 at 8:46 pm
Thank you very much for your feedback. You've given me a couple of useful options, plus a couple of things to think about. This is a query that came from...
January 13, 2022 at 5:40 pm
OK, here's the "harch" execution plan:
<?xml version="1.0" encoding="utf-16"?>
<ShowPlanXML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="1.5" Build="11.0.7493.4" xmlns="http://schemas.microsoft.com/sqlserver/2004/07/showplan">
<BatchSequence>
<Batch>
<Statements>
...
January 7, 2021 at 4:42 pm
I can upload the execution plans as XML. Is that OK?
January 7, 2021 at 4:29 pm
No, I didn't get an error message when I posted the files, but apparently they didn't upload. So here goes. First the DDL for vwRequests view:
USE [CMI]
GO
/******...
January 7, 2021 at 4:29 pm
Here are the defs of the 2 views. One thing I discovered is that ConflictCheckStatus, referenced in vwRequests, is a view. I add it here.
January 6, 2021 at 6:32 pm
OK, I'm posting the DDLs for all the tables used in both views. I'm also posting both execution plans, the one that takes 3 secs (chameleon) and the one that...
January 6, 2021 at 6:28 pm
Good observations. The view, like this query, is a mess. It joins 7 tables, including one in a database on another server with a different collation, and another view. However,...
January 6, 2021 at 3:55 pm
Yes, I understand completely. The software the vendor is selling allows our systems admins to give network credentials to no one. We will log into servers using dummy credentials via...
August 14, 2019 at 6:45 pm
OK, I think I got it. If I create a csv file with column names ONLY and then link to a Flat File Connection Manager with Column names in the...
April 22, 2019 at 6:16 pm
When I do that, I don't get the column names I assign in my SQL statement in the OLE DB Data Source; I get column names that the SSIS package...
April 22, 2019 at 3:41 pm
Viewing 15 posts - 1 through 15 (of 81 total)