Viewing 15 posts - 721 through 735 (of 13,878 total)
This will be easier to answer if you provide the DDL for the underlying table, including PK and Index definitions. If the query really is as simple as you suggest,...
January 2, 2024 at 11:36 am
This issue happening in prod environment ,but not in staging and local development environment, is there any setting for clearing tempdb cache of sql server
Possibly because the prod environment...
December 28, 2023 at 8:38 am
What is the text of the error you are receiving?
Is the data exactly the same across the different environments?
December 27, 2023 at 4:55 pm
You need to find out more from the person asking you to do this. Questions such as
What sort of validation? Data within certain limits? Data has only predefined values? Data...
December 24, 2023 at 10:05 pm
Wow, don't be offended, but what a mess! It might be time to think about a divide and conquer approach. Build up your result sets individually and then assemble them...
December 19, 2023 at 8:30 pm
We can't even properly see your query! How is anyone supposed to know what code is in that function?
December 19, 2023 at 5:11 pm
It's varchar(15). Casting as varchar(max) was the seemingly only way to avoid this error:
"STRING_AGG aggregation result exceeded the limit of 8000 bytes. Use LOB types to avoid result truncation."
After...
December 19, 2023 at 3:32 pm
What is the datatype of SERVICE_CD? CASTing every element to VARCHAR(MAX) sounds like madness.
December 19, 2023 at 3:25 pm
Your DISTINCT is applied to the result of the STRING_AGG, not to the elements it contains.
Remove the dupes in a CTE and select your STRING_AGG from that.
December 19, 2023 at 3:22 pm
Thank you all for the help! Phil's suggestion worked for me, I was trying to avoid it as there is no leading index on the date columns.
I as well...
December 18, 2023 at 2:35 pm
I don't see why there should be a cast-iron association between tableAID and LastUpdateDateTime, assuming that any row, old or new, can be updated (and thus have its LastUpdateDateTime modified).
Instead,...
December 18, 2023 at 1:38 pm
While this is an interesting technique, I'd suggest that the C# script could easily be modified to do the actual copy/move, obviating the need for a Foreach loop. This would,...
December 18, 2023 at 9:00 am
Something like this, perhaps.
PrevSickBalance = LAG(Accrue_Sick_Balance,1,0) OVER (Partition By Employee_ID ORDER BY Payroll_Detail_ID)
December 14, 2023 at 5:48 pm
How about providing your sample data in consumable format, along with your desired results? You've been here long enough to know better
December 13, 2023 at 2:12 pm
That's a huge chunk of code and, in my opinion, asking such general questions is the sort of thing you'd employ a paid consultant to help with.
If you take the...
December 12, 2023 at 6:21 pm
Viewing 15 posts - 721 through 735 (of 13,878 total)