Viewing 15 posts - 181 through 195 (of 4,087 total)
The problem here is that the regex search and replace for SSMS was changed to use Visual Studio regex search and replace https://docs.microsoft.com/en-us/visualstudio/ide/using-regular-expressions-in-visual-studio?view=vs-2022 but the documentation was never updated...
September 15, 2022 at 8:11 pm
You're not checking to see whether the bank name has already been updated, so you keep updating the same 4999 records repeatedly. Add something to the WHERE
clause to check...
September 15, 2022 at 6:23 pm
SELECT 'class1' AS [@ClassName]
, 'String' AS [ExternalId/@TYPE]
, a.AccountNumber AS ExternalId
FROM #Account AS a
FOR XML PATH('Element')
Drew
September 7, 2022 at 7:44 pm
To put it another way, you have to first update the existing table to replace all NULL values in that column with non-NULL values before you can alter the table...
September 6, 2022 at 3:46 pm
It's not clear what you mean by "complete attr3". I've tried several possibilities and none of them work for all records. This is the closest that I got. It uses...
September 6, 2022 at 3:43 pm
So the wrong solution to the wrong problem, What you actually need is a table (or tables) that ulimately hold the commission allocation details: SalesMan, Customer, Start, End and...
September 1, 2022 at 3:26 pm
I believe that this does close to what you are looking for. It can probably be massaged to do exactly what you want. The big problem is that the trailing...
September 1, 2022 at 3:16 pm
Ive been writing t-SQL code for 25 years and NEVER come across FIRST_VALUE, LAST_VALUE. I have always written a RANK() OVER() or a MIN() OVER() in a CTE and...
September 1, 2022 at 2:59 pm
This is a personal preference, but I find your case structure difficult to parse and comprehend.
Instead of your
where finvdate < Case when Month(current_timestamp) = 1 then
Dateadd(year,...
August 31, 2022 at 2:12 pm
First, whenever you use date/time intervals, you should always use half-closed intervals (one side includes '=' and the other does not). This is required for DATE data, but it's good...
August 29, 2022 at 6:52 pm
i get an error that why i was asking help.
We're not mind readers. You got an error message, but failed to mention that in your original post. How are...
August 23, 2022 at 6:26 pm
The best way to answer questions like this is to try it. If it works, great! If it doesn't work, then you can post here to figure out why it...
August 23, 2022 at 5:40 pm
Also, don't cross post. You now have four separate threads with the same question.
August 18, 2022 at 8:15 pm
My best guess is that you are using the wrong partition. Without data is hard to determine what the correct partition is, but I would hazard that you should be...
August 11, 2022 at 3:25 pm
I need all the patient ids returned but no duplicates, only the record that has the highest ProcedureCodeId.
SELECT PatientID, MAX(ProcedureCodeID) AS MaxCodeID FROM t GROUP BY PatientID
If you need...
August 9, 2022 at 2:27 pm
Viewing 15 posts - 181 through 195 (of 4,087 total)