Viewing 15 posts - 1,156 through 1,170 (of 13,838 total)
A combination of DATEDIFF() and LAG() will get this done for you. If you are prepared to produce your sample data in consumable format (ie, in the form of CREATE...
September 15, 2022 at 6:58 am
Timing is everything. I have a similar project except it uses flat files with header and detail records. My problem was that the header would not get saved before...
September 14, 2022 at 4:59 pm
How about providing an actual execution plan and asking for optimisation help?
I can't see how a FOR XML PATH solution (I assume that's what "stuff for xml" means) would be...
September 14, 2022 at 3:32 pm
So close! Add a step after the Excel file is generated which renames it to something meaningful – Invoices_z.xlsx, where 'z' represents the InvoiceId, for example.
September 14, 2022 at 2:11 pm
Data may or may not overlap.
So, just to confirm, if we added the following row to your sample data
('A', 202208,50)
you would still wish to generate the
('B',202208,0)
row?
September 14, 2022 at 8:45 am
Yes, my initial solution was not correct, which I realised after re-reading your post.
September 14, 2022 at 8:33 am
You have Data items A, B and C all happening on different yearwks. Will that always be the case, or could you have overlapping data items, eg
('A',202201,10) and ('B',202201,20)
?
September 14, 2022 at 8:25 am
Please see this link – it may help you get past these errors.
September 13, 2022 at 4:49 pm
You are seeing this error locally in SSDT, on the server, or both? Is this the same server that was running 2017, or a new server?
September 13, 2022 at 4:13 pm
I don't think there is any chance of finding something like this. C# and VB.NET are functionally equivalent, Excel and SQL Server are not.
A manual rewrite is required.
September 12, 2022 at 7:33 am
@jeffwilliams "It looks like you put a DISTINCT on every single statement - which either means a bad join or bad design." What will you recommend here or how...
September 11, 2022 at 3:13 pm
You should get into the habit of using 'YYYYMMDD' as your literal date format. This format is unambiguous and works regardless of which 'DATEFORMAT' is in place.
Regarding your question, your...
September 11, 2022 at 10:46 am
Are you sure it's the driver causing the issue, rather than the deprecated TLS protocol? You should probably be aiming to use TLS 1.2.
September 9, 2022 at 1:26 pm
Viewing 15 posts - 1,156 through 1,170 (of 13,838 total)