Viewing 15 posts - 1,171 through 1,185 (of 13,878 total)
Hello!
I have a table with 2 million rows. I need to insert data into new table for each batch of 100000 rows.
Thanks in advance.
This is a requirement, not a...
September 30, 2022 at 8:34 am
Use a query to get your data from SQL Server into SSIS and use CAST in the query to get the BLOB into string format
DROP TABLE IF...
September 30, 2022 at 8:30 am
Please provide your sample data in the form of CREATE TABLE/INSERT statements. Also provide your desired results, based on the sample data.
September 29, 2022 at 7:10 pm
I have two unique keys in one table and I want to write a query that connects me to two unique keys and displays them in one record. Right...
September 29, 2022 at 3:00 pm
That is a lot of data. Have you looked at the execution plan? Are the underlying tables appropriately keyed and indexed?
September 29, 2022 at 7:15 am
That made it more complicated than I had expected and I had to adopt a different method, unfortunately containing cascading CTEs. Does this get you close?
WITH BaseData1
AS...
September 28, 2022 at 6:35 pm
Which column, or columns, of data should be considered when generating the Sales = 0 rows?
September 28, 2022 at 1:46 pm
Well done on providing the sample data, though please use one or more code blocks next time. In future, please use temp tables (avoids others having to create and drop...
September 28, 2022 at 9:04 am
OK, I see the problem. The query logic is such that the generation of a notional Sales = 0 row depends on column 'Data', not on EmpId.
In the case where...
September 28, 2022 at 8:48 am
Are you saying that the line in blue is incorrect?
September 27, 2022 at 3:24 pm
Yes there is.
SQLPackage /Action:Publish, with appropriate parameters.
Set the CreateNewDatabase flag to false.
September 27, 2022 at 3:19 pm
That looks trivial and is something which I suggest you attempt yourself.
Just add the columns to the BaseData CTE and then to the SELECT ... FROM BaseData.
September 27, 2022 at 12:14 pm
Please read this article. The FORMAT() function performs very badly.
September 26, 2022 at 10:27 am
Like this?
SELECT t.VID
,t.OrdDate
,t.Prg1
,NewCol = (CASE
...
September 25, 2022 at 5:11 pm
Your query does not parse (it has two WHERE clauses). But no matter, for (current) YTD, use something like
WHERE SomeDate >= DATEFROMPARTS(YEAR(GETDATE()),1,1) AND SomeDate <= GETDATE()
September 25, 2022 at 4:08 pm
Viewing 15 posts - 1,171 through 1,185 (of 13,878 total)