As mentioned above, change your select query to: select field1, field2, field3, field4, ..... fieldn from mytable where comanyname = @EndDate RS...
quote: Michael Bourgon's noted here: http://www.developersdex.com/sql/message.asp?p=2290&r=4703342 Here's something I found a few months ago, and...
It seems to me the problem is not creating the new table, but the query you use to generate it. 3 days = 259,000 seconds = ~7 rows/second for 2...
Yes RS can do this quite easily. Look at the RS Advendure Works sales report example pivot-table report, and RS interface with excel excellent.
It's ugly, but you could add a part parameter to your function and pass 1, 2, 3 etc. to return first 8000 characters, 2nd 8000 etc. select col1,...
Right click my computer+manage+services find the SQL Server service, right click properties, click LogOn tab and enter a domain user and password....
Glad to help. It would be great if you could combine variable assignment with selects that return rows (which is what you would have to do to...
If I understand (but maybe I don't) declare @runlength int, @maxrun int, @delta int declare @id int select @id = 0, @runlength = 0, @maxrun = 0,...
Try changing FMT=FixedLength to FMT=Delimited
In 8 years of SQL programming I have never had to specify JOIN hints. Index tuning, proper statistics , and examining the query plans and output...
If the file is called stats.txt it is referenced by stats#txt. Not sure why but that's the way SQL Server does it. The path above is where you see...
You can create a linkned server to a text file (a folder actually) but you can also load directly from a text file with OPENDATASOURCE and not create...
Have you tried a clustered index on edsdate?
My bad Twan. I did not notice you added the group by to the view. Yes that seems better.
I think he would have to include WDate in the clustered unique index for the view (and a unique clustered index is required) because that is the...
Hard to tell without knowing how many rows are actually being used. Since you are summing on UnitsSold and ProdSales, there could be > 23,000 rows...
Modify the query to: set fmtonly off;exec proc
BCP will import data in the order it occurs in the input file. If there is a clustered index on the table, SQL will resort the rows as needed. If...
When I tried it before posting the HASH JOIN resulted in fewer logical reads. Twan's suggestion resulted in the same number of reads as the...
Try adding HASH JOIN hint SELECT dbo.Sales.SKUID AS ProdID, SUM(dbo.Sales.UnitsSold) AS UnitsSold, SUM(dbo.Sales.ProdSales) as TotalSales FROM...
Separate names with a comma.