TFS Query for Displaying How Long Tasks Take To Go From Created to Closed - tfs-2015

TFS 2015 Update 3
How can I create a TFS query that will display a list of tasks and how long it took for the task to go from created to closed? Maybe I will need to create an Excel report for this? Or to export the report I have to Excel and then add formulas there? I would prefer to not have to add formulas in Excel, but it's okay if I do.
Here is what I have so far:

There is no this kind of work item query will directly return the actual time taken for a Task from active to closed.
Your workaround extracting the data to Excel to analyse works perfect. I thins this is the simplest way to achieve what you want.
Moreover, you could also query the work item history with the TFS API and check the times tamps on when the state transitions occurred.

Related

Methods of Deleting Duplicates in SQL Server with SSDT

I'm currently setting up a database which has an upload process in SSDT. It pulls data over time from an Excel sheet. My issue is that the Excel sheet is appended onto as time continues but the upload process uploads the entire sheet every time the process is run. This results in exact, duplicate rows for the data which were in there previously.
I have attempted to solve this in a number of ways. I have attempted to use the Sort function included in SSDT but have not been able to get it to work for whatever reason. I am considering writing and SQL task to clean the database after each upload but am only so confident in my ability to do so. Is there some method I am not thinking of which would make this easier or a way to get the sort transformation to work? Thanks for the help in advance.
You can delete duplicate rows in SQL Server using a cte with row_number() window function.

Automate export from MS Excel to MS SQL Server

Is there a way to export data from a MS Excel file into a SQL Server table automatically? Maybe this is done using a script of some kind.
If it's not possible to be completely automated, perhaps there's a way to do it using minimal user effort. (For example clicking a button or link)
There is a MS Excel spreadsheet where the data keeps having to be manually exported to SQL Server.
I've done this using Excel to Access before, but not too certain on how to do it using SQL Server (MS).
*MS Office 2013 and MS SQL Server 2012.
The other answers are ok. I just want to suggest an additional alternative.
If it is just 1 specific Excel file that is frequently updated, I would consider using VBA. For example, write some VBA code in Excel that uploads changes to the database when the spreadsheet is saved (or the user presses a button).
The problem with using a scheduled job is that Excel is basically a single user application. If someone has the spreadsheet open or is doing something in it when the scheduled job runs or moves the spreadsheet to a different folder, then the job may fail.
This way you also get the updated data in your database in something close to real time instead of waiting on a job to run. This might take more time and effort to set up though than some of the other answers.
You can use SQL Server Agent to run a scheduled job that imports data from an Excel worksheet into a SQL Server table.
The import is relatively straightforward to do using Integration Services, but if you've not used either of these before you might need to do some reading up on it.
You can do the following:
You need to create an SSIS package and then create a job to run the package.
The easiest way to create the SSIS package is with "Import and Export Data" tool of SQL Server. It has a nice step by step wizard.
You set everything it asks you from the source and the destinations. Until you get here, select the "Save SSIS Package":
Then you only have to create the job to run it :)

MS Access reports issue?

I have an already existing report that runs off a particular query. This report runs perfectly. I was having an issue with one of the CLIENTs for the report, where I had to change a small piece of information. This required me to run some VBA code and insert all the info into a temp table. I'd like to run the same exact report, however, instead of using a query, to use the tempInfo table. Is there a way for me to do that? it's okay if I create another report, but the first report is somewhat complicated - so it would save a lot of time if I could just copy and paste at least the GROUP, SORT TOTAL so my data is displayed correctly. ANy suggestions?
Copy the report that you are wanting to use and paste it in the navigation menu to create a copy of it.
To use the "Temp Table" in your report, just go into design view of the newly copied report and change the Record Source to your "Temp Table."
You may also need to change the control source of any textboxes, labels, etc..

Create SQL Table that will import automatic from Excel whenever that Excel is updated

So I have an excel spreadsheet with Product and Notes. I'd like to import this information into SQL and everytime people enter more products and notes into this excel sheet, it will automatically updated to the new one whenever I run the syntax?
I finished creating Product - Notes, which I imported current data into that table.I was planning to use insert into function, and every day insert the new values in the table. But this seems too manual.
Is there a way i can do this? The excel spreadsheet is updated daily.
I'm using SQL Server 2008
I'm sure this is possible. You could have the excel connect to your database and then write some macros to save the data to the table when there are changes or new rows are written.
It would not be easy. There is a lot of complicated logic here and excel was not written to be a front end for a database.
I believe the time spent changing your spreadsheet to work this way would be better spent actually writing a client server application to modify the database using a web application or a local application. Client server front end applications are easy to write these days with lots of examples, tools and templates. For someone with experience a simple data entry / modification form is just a couple of days work for a robust application.
Changing the excel file would be much harder.
You could use SSIS to import the excel data into your database on a scheduled basis.

Generate Reports from Ms Access 2007 Using Queries automatically via VBA

I have a few queries which need to be exported into a report and I want this to be done automatically each time the database is opened. I'm guessing this would be possible using VBA to which i dont have much knowledge off.
Can anyone help with this please?
Thank You
The easiest way would be to build a report based on the queries and add an Autoexec macro to the database to print the report.
EDIT
Choose Create Macro, select Open Report as the Action, select the report name from the dropdown list, save the macro as AutoExec.
Maybe I'm missing something in your question but it sounds like you just need to base the report's record source on the SQL and don't need VBA. Copy and paste the SQL directly into the report record source. Every time you open the report it will automatically pull the most recent data.