No, I hadn't tried doing that. It sounds like a good idea and I will try it out. I have gotten some pivots to work with arbitrary # of columns, but I've had to use dynamic sql.
T2102
Posts
-
Pivot 3 column stored procedure query record set in SQL Server -
How can I treat VT_DATE ?Similar to VT_R8, except that you know the range of values. It's fairly easy to convert back and forth from Excel 2003's date time serial noting the leap year error in 1900. If using Excel 2007 or 2010, you need to know what date format is being used in Excel.
-
Pivot 3 column stored procedure query record set in SQL ServerLet's say I have a store procedure returning Value, Desired_Row_Header, and Desired_Column_Header. EXEC [dbo].[scsp_My_Query] Can I pivot the results of the stored procedure directly or do I have to embed the pivot in the stored procedure? I am currently fetching the results off the database and manually creating pivot tables in code. I'd like to move it on the database, especially if I can do the pivot based on the column position without having to lookup the names of each column.
-
Any update on Intellisense for C++/CLI in VS2010I separate all of my C++/CLI code into two solutions; one in 2010 and one in 2008....
-
SQL Server Query Transportation Time Based on Latency and Internet Download SpeedThanks! I got a 2x to 6x speedup after raising the packet size to 32767. Now the query execution and transportation time is faster with the faster internet connection with slightly higher latency.
-
SQL Server Query Transportation Time Based on Latency and Internet Download SpeedI had asked this question elsewhere and was advised to ask here instead. I am wondering if anyone knows how internet connection latency and download speed affect query execution time in SQL Server Management Studio. Is that product similar to using a Data Reader instead of a Data Adapter? Is there a flag I can set to make it more like a Data Adapter? I am trying to get better performance on a remote office, especially since Disaster Recovery can be better handled from the headquarters. I ran a test in SQL Server Management against the same database across the country. One internet connection had 4x the download speed according to speedtest.net, but a larger latency in ms. The difference is that one connection was a slow ethernet connection and the other a faster wireless connection. Same locations, multiple tests with similar results. Somewhat surprisingly, the connection with the faster download speed took 50% longer to return a recordset in the 5-20 MB range. Is this because querying in SQL Server Management Studio is similar to executing a query with a Data Reader instead of a DataAdapter? If not, what is the issue?
-
Creating .dll linked to Excel, add function error [modified]You can't create any memory errors or access violations without destabilizing Excel.
-
boost::named_mutex not released after process abortIf you have time, you can try reading Lock & Wait Synchronization in C++[^] Why can't you prevent your process from being spawned by counting the number of running instances and not creating a new instance if one already exists? Then you only need a lock on that tiny code block.
-
shadow copy, deep copy and bitwie copy by constructorBitwise copy (AKA shallow copy) copies the bits of the struct/class, including arrays. So the destruction of either may cause problems if they are not destroyed together. A deep copy contains its own definition of all data including array to avoid this negative consequence.
-
Break point not hit error in VS2005My guess is that you need to recompile your dlls that you are using.
-
How can i delete History and Cookies Directory in Internet explorer?This solution only works for your personal desktop... I run CCleaner from the command line (scheduled task on shutdown) to delete histories, etc.
-
Break point not hit error in VS2005I understand that the breakpoints are set; this is a common problem most often due to #1 - 3 I mentioned before. Does your program rely on any dlls? Is it an exe or dll supporting excel for instance?
-
Break point not hit error in VS2005- Are you sure the location where you are placing a breakpoint is in the relevant project and not a dll that it depends on? 2) Have you compiled your add-in(s) recently and made sure the latest version in your path match the versions that you just compiled. 3) Do you have debug information enabled?
-
Visual Studio 2008 Sp1You should be able to download a solution that does not need internet access from another machine. The file would be a lot larger and you will have to search to find it.
-
what is wrong with this code?- Add a destructor ~A() { delete pi; } 2) Either A) Initialize the pointer to 0 first A() :pi(0) { pi=new int; } B) Initialize the pointer (preferred in this case since it is highly unlikely the memory allocation will fail) A() :pi(new int) {}
-
General Question about programming stepsIt is not always necessary to develop new classes, but that is better than creating slow bulky classes that are very general. This depends on your role and the organization. In general (assuming you are not doing complicated multi-threading), you are NOT going to spend as much time on documentation unless you are a low level grunt or you are a system architect giving high level instructions to your subordinates. Your code should be self-documenting with variable names that make sense unless your aim is to try to increase job security by writing code that no one else understands or wants to use.
-
Rounding double to a provided decimal placeI haven't looks at Round2, but cannot imagine a case where you would need to use exp and log to round.
-
How to get all instances of Excel.exeI am working on a similar problem. I know the HWND for each Excel instance and implemented the MFC ActiveX control you mention above. However, I have not used an ActiveX control in C++ before. Do you know how I can get m_pDocDisp? I tried putting just the code above in my native C++ / Excel C API application and it doesn't find it. http://www.codeproject.com/Messages/3730176/Get-Document-IDispatch-in-native-Cplusplus-possibl.aspx
-
Get Document IDispatch in native C++ (possibly using MFC ActiveX Control) [modified]I am trying to get the document idispatch. Note that I already know the hwnd for each instance of the application that I am interested in, but cannot get the right application idispatch with multiple application instances running. The GetDocDispatch method, referred to in the article referenced below, displays a message with the idispatch. How can I call the GetDocDispatch method or access the values from native C++? http://support.microsoft.com/kb/190985/[^]
modified on Wednesday, January 12, 2011 4:16 AM
-
Dual socket Core i5 2500K versus Core i7 2600KThanks. I'll probably go with single socket overclocking 2600K or dual socket 2500 without overclocking if I find a two socket board in the next month.