Showing posts with label studio. Show all posts
Showing posts with label studio. Show all posts

Sunday, March 25, 2012

Calling SQL editor dialog from application

The SQL (or query) editor in Visual Studio is a great tool. Is there a way to call the editor from my application to edit a SQL string?

This is not for the end user but as a developer tool for those who have a copy of Visual Studio. I would like to be able to visually design the SQL commands we are storing in a database.

Thanks, Dave C.

Hi Dave,
There is no direct way to launch the SQL Query editor based on a string in your application. The best you can do is save the string to a file and then use the command line parameters for loading that file into SSMS using SQLWB.EXE.
Thank you,
Bill Ramos, PM, SSMS

Tuesday, March 20, 2012

Calling debugger from SSMS

I realize that the DEBUG capability has been removed from SSMS and moved to the IDe for Visual Studio. As much as that annoys me , I am dealing with it.

Is there a way I can open a SP into the debugger from SSMS? I very much miss the ability to right click a SP in my list of 300 and choose form edit, run or debug. I dont care if hte debugger is a separate app, can't I have SSMS send my proc to the visual studio debugger?

Currently I have to open the VS app separately, and then establish connection, and the re-fnd my proc in that very long list of 300 that is in there.

Sorry, you need to use Visual Studio to debug stored procedures in SQL Server.|||

I know that.

The question more specifically is:

Is there a way to link the SSMS annd hte visual studio together such that I can tell visual studio to debug a SP I am pointing to in the SSMS?

I want to be able to right click a Sproc in SSMS, select "Step Into" and have the Visual studio open on its own with the correct SP in debug mode.

|||No this is not possible.|||

Hi,

I tried to configure t-sql debugger in my visual studio 2005. I have sql server 2005. I somehow unable to debug the stored procedure thru my server explorer in VS 2005. I can put a breakpt, but never be able to hit the brk point kept in stored procedure.

Please help me out to start t-sql debugging in my vs 2005.

Thanks,

Anni

Calling debugger from SSMS

I realize that the DEBUG capability has been removed from SSMS and moved to the IDe for Visual Studio. As much as that annoys me , I am dealing with it.

Is there a way I can open a SP into the debugger from SSMS? I very much miss the ability to right click a SP in my list of 300 and choose form edit, run or debug. I dont care if hte debugger is a separate app, can't I have SSMS send my proc to the visual studio debugger?

Currently I have to open the VS app separately, and then establish connection, and the re-fnd my proc in that very long list of 300 that is in there.

Sorry, you need to use Visual Studio to debug stored procedures in SQL Server.|||

I know that.

The question more specifically is:

Is there a way to link the SSMS annd hte visual studio together such that I can tell visual studio to debug a SP I am pointing to in the SSMS?

I want to be able to right click a Sproc in SSMS, select "Step Into" and have the Visual studio open on its own with the correct SP in debug mode.

|||No this is not possible.|||

Hi,

I tried to configure t-sql debugger in my visual studio 2005. I have sql server 2005. I somehow unable to debug the stored procedure thru my server explorer in VS 2005. I can put a breakpt, but never be able to hit the brk point kept in stored procedure.

Please help me out to start t-sql debugging in my vs 2005.

Thanks,

Anni

Sunday, February 19, 2012

Calculation using count function in SQL server Business Intelligence development studio

Hello All,

I am working on a report using SQL server Business Intelligence development studio in which I need to count the total number of saleslines that either has a status : Delivered or Invoiced.

I am using the inbuilt count function under the calcuations, as: Count(Fields!SalesStatus.Value, scope). I am not sure what scope means here however, I read that scope refers to some dataset, dataregion or grouping. I dont know what that means. I shall be really thankful if someone can help me with this.

Regards,

Rashi

Scope is optional and if not given, will refer to the current scope.

The current scope is exactly what you've said. If your dataset name is "dataset1" and you put a textbox outside a table or matrix and put the value: Count(Fields!SalesStatus.Value, "dataset1"), you'll get the accurate count of all items within that dataset.

If you were doing some grouping inside your table and wanted to get the count for each group, in a group header or footer, you could do: Count(Fields!SalesStatus.Value, "table1_YourGroupName") to acheive this.|||An alternative approach to using the Count function would be to add a calculated column to your dataset, setting the value to 0 or 1 depending on whether the row meets your conditions. Then sum the calculated column.|||

Thanks for your response!

Well, the dataset is salesstatus which is a field in the salestable. Now, this field "salesstatus" has some values like: invoiced, delivered, pending, on hold etc on each line-item. I just want to count the line items that have a sales status equals to delievered or invoiced. I am not sure if there is a way to calculate that. I am doing reporting for the first time so I might not be sure.

What I am trying to achieve is to calculate the total number of orders shipped. For this, I am thinkin if I can get a count of lineitems that have a salesstatus = delivered or invoiced I can acheive that. I would appreciate your response on this one.

Thanks,

Rashi

|||Try adding a calculated field with "=iif(fields!salesstatus = "delivered", 1, 0)" (freehanding this so it may not be 100% correct syntax, but it's close). To check additional values, you could use nested a nested iif, or the switch function.|||You can group by salestatus then count the group. You might want to add drill down capability on this group.|||

Thanks all

I have been able to figure it out. I grouped all and used a count function and it just works great!!!

Thanks again,

Rashi

Friday, February 10, 2012

Calculated Members are not displayed in SQL Server 2005 Management Studio

Hi, all here,

I am having a question about the visibility of calculated members. Why we can not see the calculated members from SQL Server 2005 Management Studio? But when we browse cubes, we can see the calculated members. But why Management studio dose not display the calculated members?

Thank you very much for any helpful guidance and advices for that.

With best regards,

Yours sincerely,

Yes Calculated members are only visible i BI-Developer Studio and in Management Studio if you start a MDX-query. The idea is to make all changes to the solution in BI-Developer Studio because you actually make scripts of all parts of a cube there. In management studio all your changes are not scripted but directly implemented. You can add users/roles i management studio but I recommend to use BI-Dev Studio for this. If you change parts of the cube in management studio your BI-Dev Studio version will not be correct and not include your changes in Management Studio.

You script/the solution can be easily transfered and kept in a repository that can detec changes.

If your cubes disappears due to a disk failure you can easily recreate them with your script in BI-Dev Studio.

Regards

Thomas Ivarsson

|||

Hi, Thomas,

Thank you very much for your guidances.

With best regards,

Yours sincerely,