Viewing 15 posts - 1 through 15 (of 638 total)
You could also import into a staging table with a VARCHAR(MAX) column. If I recall correctly an identity column will preserve the order of the rows from file to table....
June 5, 2025 at 3:27 pm
The source data Price and Factor come from 2 different tables. If I need to store data (and I think I do) I would create a new table.
The data could...
May 14, 2025 at 8:44 pm
Following up. Steve's solution using the recursive query works but unfortunately performance is abysmal with my live data. Performance is worse than a cursor. I looked at tuning with an...
May 12, 2025 at 3:29 pm
Thanks to all who responded. I'll review and post back.
April 16, 2025 at 4:42 pm
Why are you using these data types with this numerical precision?
The precision issue is a problem. I have a legacy system with certain data types and a cursor....
April 11, 2025 at 8:03 pm
A quirky update seems to work
Thanks Scott, appreciate it. I am trying to build a view since that is what my downstream processing expects. I forgot about the quirky...
April 10, 2025 at 5:41 pm
My current thinking is this needs to be done using recursion. The calculation need to reference the previous calculation which needs to reference the previous calculation etc. I was hoping...
April 9, 2025 at 5:01 pm
Thanks I'll take a look at that windowing method. I don't think this is a running total but rather a calculation which needs the calculation from the prior row.
Also I...
April 9, 2025 at 3:06 pm
This should do it
ON t.RowNumber >= cd.RowNumber AND t.RowNumber < cd.NextRowNumber
Have a great weekend!
January 10, 2025 at 11:55 pm
Actually getting some duplicate CreateDate rows in GroupingIdentifiers 2 and 3 using my sample data.
January 10, 2025 at 11:49 pm
Thanks Scott. Definitely looks good initially.
The row count will be in the hundreds. Let me bounce this against my actual data and see if that brings up any complexities.
January 10, 2025 at 11:11 pm
Thanks Jeff, Here is more realistic data. Won't work when there are more than 5 rows.
DROP TABLE IF EXISTS #Test
CREATE TABLE #Test (RowNumber INT,RowType VARCHAR(10),DelimitedColumn VARCHAR(MAX))
--Should all...
January 10, 2025 at 10:41 pm
Thanks Scott. I suspected this would be CIY-code it yourself. The other approach I considered is not inserting the bad row at all. SSIS has error output which does this....
December 27, 2024 at 4:38 pm
Sounds like you could declare a stored procedure output parameter and set it in your IF statement.
https://www.sqlservertutorial.net/sql-server-stored-procedures/stored-procedure-output-parameters/
Or if you need more flexibility you could use the OUTPUT clause.
https://www.sqlservercentral.com/articles/the-output-clause-for-insert-and-delete-statements
December 17, 2024 at 7:59 pm
Welcome to the wonderful world of linked server performance troubleshooting,
Some will say never use linked servers and look for alternatives. https://www.brentozar.com/archive/2021/07/why-are-linked-server-queries-so-bad/
Others will say they are OK in certain circumstances. I...
October 29, 2024 at 9:46 pm
Viewing 15 posts - 1 through 15 (of 638 total)
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy