March 29, 2017 at 4:09 pm
If I forgot to mention it, huge thanks to those responsible for getting this new forum software. Really nice !
March 30, 2017 at 1:00 am
Have you tried to post any code, yet?
--Jeff Moden
Change is inevitable... Change for the better is not.
March 30, 2017 at 6:01 am
Yes that works well. And I see you can do some common formatting such as Control B for bold without having to access the Format button. The preview is immediate and very helpful. Adding a file is easier than what I recall in the past. Haven't tried the double quote button or IF CODE yet.
EXEC sp_whoisactive @find_block_leaders = 1, --@get_additional_info = 1,--@format_output = 2,
@sort_order = '[blocked_session_count] desc',-- '[cpu] desc', --
@output_column_list = '[dd hh:mm:ss.mss][session_id][database_name][block%][sql_text][host_name][login_name][start_time][login_time][percent_complete][sql_command][used_memory][temp%]
[wait_info][?tasks][tran_log%][cpu%][reads%][writes%][context%][physical%][quer?y_plan][locks][collection_time]';
go
Direct paste from SSMS Grid results:
dd hh:mm:ss.mss session_id database_name blocking_session_id blocked_session_count
11 01:53:33.010 51 master NULL 0
00 00:00:00.573 83 COLLATERALMANAGER NULL 0
00 00:02:12.520 123 Reporting NULL 0
Direct Paste ssms results from Excel -- gridlines are dropped -- good formatting otherwise
tablename | name | type_desc | is_unique | data_space_id |
ifts_comp_fragment_2009058193_33698738 | clust | CLUSTERED | 1 | 66865 |
ACCOUNT_OWNERSHIP_DOC_SUMMARY | ACCOUNT_OWNERSHIP_DOC_SUMMARY_UC1 | NONCLUSTERED | 1 | 65628 |
SSMS Grid Result pasted into HTML Outlook Email, then copied here ( forum software Pop-up note - We've noticed you are pasting content from Microsoft Word. Would you like to clean the content so it appears correctly) Seems like I saw this work fairly well on some things, but not here.
dd hh:mm:ss.mss session_id database_name blocking_session_id blocked_session_count
11 01:53:33.010 51 master NULL 0
00 00:00:00.573 83 COLLATERALMANAGER NULL 0
00 00:02:12.520 123 Reporting NULL 0
login_name start_time login_time percent_complete
NT AUTHORITY\SYSTEM 2017-03-19 02:53:35.310 2017-03-19 02:53:35.307 NULL
CM\DefaultAppPoolID 2017-03-30 04:47:07.747 2017-03-30 04:47:07.747 NULL
CM\DefaultAppPoolID 2017-03-30 04:44:55.800 2017-03-30 02:31:56.683 NULL
CM\FdiEvent_Prod 2017-03-30 04:47:08.290 2017-03-30 04:47:07.860 NULL
CM\DefaultAppPoolID 2017-03-30 04:47:01.827 2017-03-30 04:47:01.820 NULL
CM\FdiEvent_Prod 2017-03-30 04:47:08.293 2017-03-30 04:47:07.973 NULL
March 30, 2017 at 8:10 am
I've found that copying and pasting from SSMS directly to an SQL Code window makes a train wreck of things. Turns out that they only have limited support for IE pastes. I have to copy from SSMS into Notepad and then copy'n'paste from that to the SQL Code window.
What was the method you used to copy to the code window above and which web browser are you using?
--Jeff Moden
Change is inevitable... Change for the better is not.
March 30, 2017 at 8:49 am
Jeff Moden - Thursday, March 30, 2017 8:10 AMI've found that copying and pasting from SSMS directly to an SQL Code window makes a train wreck of things. Turns out that they only have limited support for IE pastes. I have to copy from SSMS into Notepad and then copy'n'paste from that to the SQL Code window.What was the method you used to copy to the code window above and which web browser are you using?
posting tsql directly from SSMS into SSC post using copy and paste and the "SQLcode" shortcut give this for me using Chrome
DECLARE @sql AS VARCHAR(MAX);
WITH cte
AS (SELECT DISTINCT
CAST(WeekNo AS DATE) AS WeekNo
FROM dbo.Staging
WHERE WeekNo <> '')
SELECT @sql = 'SELECT [ProjectWork Number]'+CHAR(13)+CHAR(10)+
(
SELECT ' , ISNULL(MAX(CASE WHEN CAST(WeekNo AS DATE) = '+''''+CAST(WeekNo AS VARCHAR(12))+''''+' THEN WeekValue END), 0) AS '+''''+CAST(WeekNo AS VARCHAR(12))+''''+CHAR(13)+CHAR(10)
FROM cte
ORDER BY WeekNo
FOR XML PATH(''), TYPE
).value('./text()[1]', 'nvarchar(MAX)')+' FROM Staging'+CHAR(13)+CHAR(10)+' GROUP BY [ProjectWork Number]';
PRINT @sql;
EXECUTE (@sql);
which is good for me.
What grinds my gears on this new software
But what grinds my gears more than anything else....the total lack of information that could be displayed on the "unread" page....so much white space and no info
________________________________________________________________
you can lead a user to data....but you cannot make them think
and remember....every day is a school day
March 30, 2017 at 9:08 am
Jeff
I use Chrome and if I use the Sql Code button below, pasting in Tsql works just fine. It's the results that are problematic -- ssms grid results.
It's just an extra step to paste into excel, add gridlines, make sure date/times show properly, then save the file and add to a post here.
That's the only really clean way I've found to get results in here.
I've found that copying and pasting from SSMS directly to an SQL Code window makes a train wreck of things. Turns out that they only have limited support for IE pastes. I have to copy from SSMS into Notepad and then copy'n'paste from that to the SQL Code window.
What was the method you used to copy to the code window above and which web browser are you using?
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply