Viewing 15 posts - 1,351 through 1,365 (of 1,419 total)
I can always change a select-insert into a merge. There's never going to be a "WHEN MATCHED". Must try to see if it solves the problem.
Yep
declare...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
September 7, 2019 at 1:07 pm
This is done. I couldn't find any satisfactory solution to placeholder replacement so the string formatting still happens in C#. All of the text files and templates have been moved...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
September 6, 2019 at 8:40 pm
I think I see what you are saying about how many times the function could execute and the fact that I don't have a FROM clause. Are you saying...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
September 6, 2019 at 3:47 pm
If you run it a million times. In this case here the OP has no 'from' clause so it only executes once. I actually did read your article a while...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
September 4, 2019 at 10:59 pm
If you're looking for something simple a scalar function could work. The calculation requires no rows or columns. If you know the function is accessed by query(s) in a proc...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
September 4, 2019 at 6:23 pm
Set operators work best when the tables are identical. In this case there are different collations between tables. Since "we're talking about thousands of columns across 100s of tables" it...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
September 4, 2019 at 1:07 pm
The procedure could be named whatever you wish. "spFindExistingOrCreateNewProject" seems ok but a maybe little long...
If the goal is to tighten/shorten the code then here are a few suggestions:
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
September 3, 2019 at 12:05 pm
Currently there are 2 procs:
Proc 1 ("spNewProject") does 3 things: 1) returns all project records if all inputs are nulls, 2) if necessary creates new project and returns new record,...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
September 3, 2019 at 12:33 am
Are you certain so much individual error checking is necessary? Sometimes it can be less wordy to "jfdi", or just f---ing do it. Whatever you're trying to do once all...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
September 2, 2019 at 3:11 pm
Hi there,
"The OLE DB provider "MSDASQL" for linked server..." Are you using the “OLE DB Provider for ODBC Drivers”? MSDASQL is a very old interface, it's either deprecated or on...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
August 29, 2019 at 12:09 pm
There are a bunch of issues with the code you've posted. Have a look at this code (I don't have 2008 so please un-d.i.e the objects). The 2 procs are...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
August 22, 2019 at 11:45 pm
Does the REG.MENU table have a primary key? If so wouldn't you want to output that from the procedure as well?
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
August 22, 2019 at 9:06 pm
There are only 4 input scenarios? If so it's just as easy to not use dynamic sql. This proc allows null inputs and filters in 4 ways (including no filter):
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
August 22, 2019 at 12:14 pm
Have a look at this code:
declare
@start_dtdate,
@frequencyint,
@end_dtdate;
select
@start_dt='2019-09-01',
@frequency=14;
/* the end_dt is always set to the last day of the...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
August 21, 2019 at 7:24 pm
"WHERE crc.[value] < parms.end_dt" was not necessary at all so I deleted it. Your function obviated that necessity. I wrote that but then I pasted it in with...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
August 21, 2019 at 6:08 pm
Viewing 15 posts - 1,351 through 1,365 (of 1,419 total)