Red Gate forums :: View topic - String Formatting
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Prompt 5
SQL Prompt 5 forum

String Formatting

Search in SQL Prompt 5 forum
Post new topic   Reply to topic
Jump to:  
Author Message
cabolet



Joined: 15 Feb 2006
Posts: 5

PostPosted: Sat Feb 16, 2013 4:25 pm    Post subject: String Formatting Reply with quote

It would be nice if SQL-Prompt had an option to change the output to a string that I can use in programming language.
Example:
Code:
 
SELECT DISTINCT
    SSD_ServerName
,   SSD_InstanceName
,   SSD_DatabaseName
,   SUM(SSD_DBFileSize_MB)
FROM
    dbo.tbl_SSD_SQLServerDatabase
WHERE
    SSD_SQS_ID         = @iInstanceID
    AND SSD_DBFileType   = 'LOG'
GROUP BY
    SSD_ServerName
,   SSD_InstanceName
,   SSD_DatabaseName

Change into:
strSQL = "SELECT DISTINCT " _
   & "     SSD_ServerName " _
   & " ,   SSD_InstanceName " _
   & " ,   SSD_DatabaseName " _
   & " ,   SUM(SSD_DBFileSize_MB) " _
   & " FROM " _
   & "     dbo.tbl_SSD_SQLServerDatabase " _
   & " WHERE " _
   & "     SSD_SQS_ID         = @iInstanceID " _
   & "     AND SSD_DBFileType   = 'LOG' " _
   & " GROUP BY " _
   & "     SSD_ServerName " _
   & " ,   SSD_InstanceName " _
   & " ,   SSD_DatabaseName "



Back to top
View user's profile Send private message
james.billings



Joined: 16 Jun 2010
Posts: 1123
Location: My desk.

PostPosted: Mon Feb 18, 2013 3:34 pm    Post subject: Reply with quote

That's quite a nice idea actually Smile

Could I ask you to suggest it on our Uservoice site for Prompt? That way, we can gauge interest from other users in seeing this feature.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group