Settings and activity

  1. 41 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    5 comments  ·  SQL Prompt » Format SQL  ·  Flag idea as inappropriate…  ·  Admin →

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    An error occurred while saving the comment
    Jeff Humphreys commented  · 

    This is a strange thing not to have. It could either just copy the INSERT behavior, or a master "Align =" option for any statement or clause.

    I imagine it would go under the CLAUSES tab?

    I'll try to inject this here:
    <pre><code>
    UPDATE app_trips
    SET app_trips.TripDurationHours = extracted_trips.TripDurationHours
    ,app_trips.TripDurationSeconds = extracted_trips.TripDurationSeconds
    ,app_trips.TripDistanceMiles = CONVERT(DECIMAL(18, 2), extracted_trips.TripDistanceMeters / 1609.344)
    ,app_trips.AccuracyOfPointsOnRouteInMeters = ISNULL(extracted_trips.AccuracyOfPointsOnRouteInMeters, 0)
    ,app_trips.TripLineSegments = extracted_trips.TripLineSegments
    -- Anything can change
    ,app_trips.TripID = extracted_trips.TripID
    -- Does this change??
    ,app_trips.StartDateTime_Local = extracted_trips.StartDateTime_Local
    ,app_trips.StartDateMilliseconds = extracted_trips.StartMilliseconds
    ,app_trips.StartDate_Local = extracted_trips.StartDate_Local
    ,app_trips.StartTime_Local = extracted_trips.StartDateTime_Local
    ,app_trips.StartHour_Local = extracted_trips.TripDurationHours
    ,app_trips.EndDateTime_Local = extracted_trips.EndDateTime_Local
    ,app_trips.StartLatitude = extracted_trips.StartLatitude
    -- These can somehow change
    ,app_trips.StartLongitude = extracted_trips.StartLongitude
    ,app_trips.EndLatitude = extracted_trips.EndLatitude
    ,app_trips.EndLongitude = extracted_trips.EndLongitude
    ,app_trips.FileHash = extracted_trips.FileHash
    ,app_trips.RowHash = extracted_trips.RowHash
    FROM app.Trips AS app_trips
    JOIN #FormattedInputTrips AS extracted_trips ON extracted_trips.RowHash = app_trips.RowHash
    </code>
    </pre>

    Jeff Humphreys supported this idea  · 
  2. 2 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  SQL Prompt » Format SQL  ·  Flag idea as inappropriate…  ·  Admin →

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    An error occurred while saving the comment
    Jeff Humphreys commented  · 

    That took me a minute to figure out what you wanted. Maybe better test variable names: @TestChar10, @Test003DateTime, @TestMinLegalDate.

    Unit Testing is a complex generation.

    Jeff Humphreys supported this idea  · 
  3. 10 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  SQL Prompt » Format SQL  ·  Flag idea as inappropriate…  ·  Admin →

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    An error occurred while saving the comment
    Jeff Humphreys commented  · 

    Here's a wacky extension of this, and it's primarily for debugging and finding the error, or enhancement and adding new rows to the VALUES.

    What if the column names and the individual values aligned? Very out there, I know.

    But for cases where values were transposed, it would help identify where that was happening. Or a misspell on a value, or the wrong value in a long list of value sets. The one wrong one, the wrong decimal place, the reversed mm/dd instead of dd/mm.

    Jeff Humphreys supported this idea  · 
  4. 3 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  SQL Prompt » Format SQL  ·  Flag idea as inappropriate…  ·  Admin →

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    An error occurred while saving the comment
    Jeff Humphreys commented  · 

    Voting for in general controlling the formatting of the IN generation. One I'd like is to generate "IN(1,2,3,4,5,6,7)" as a single line. I've generated ones that had 100+ options, for debugging and excluding a bunch of stuff trying to isolate that one oddball, the outlier. I don't need to see these individually, just to understand these are "other" values.

    Jeff Humphreys supported this idea  · 
  5. 9 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    4 comments  ·  SQL Prompt » Format SQL  ·  Flag idea as inappropriate…  ·  Admin →

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    Jeff Humphreys supported this idea  · 
    An error occurred while saving the comment
    Jeff Humphreys commented  · 

    I'm not sure what Chad is suggesting, and if it's a workaround, more explanation or example would help.

  6. 4 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  SQL Prompt » Format SQL  ·  Flag idea as inappropriate…  ·  Admin →

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    Jeff Humphreys supported this idea  · 
  7. 7 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  SQL Prompt » Format SQL  ·  Flag idea as inappropriate…  ·  Admin →

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    An error occurred while saving the comment
    Jeff Humphreys commented  · 

    I could've sworn it does this already? This is from 2020 so probably it didn't used to. I'm wondering if support reads these ever, since there not being cleaned up.

    I'm at 10.11.4.26759 in Feb 2022.

    Jeff Humphreys supported this idea  · 
  8. 5 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  SQL Prompt » Format SQL  ·  Flag idea as inappropriate…  ·  Admin →

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    Jeff Humphreys supported this idea  · 
  9. 6 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  SQL Prompt » Format SQL  ·  Flag idea as inappropriate…  ·  Admin →

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    An error occurred while saving the comment
    Jeff Humphreys commented  · 

    More control is always desirable, unless it creates clutter which puts off users who don't have the same quirks. The Style page seems to be targeting less control than more, which is a major design decision on their part.

    I've used another tool that had what appeared to be high granularity of control, but the way it was done really just repeated the same options per keyword. That actually sounds like what you're talking about. But there must be other paradigms that keep it simple at a high level, and have "Advanced..." on each of these pages. I suspect adding any more checkboxes to each sub page is verboten, trying to prevent spagetti.

    There must be a compromise. Perhaps multiple approaches, as in different master formatting pages. One is every single option as a hierarchy, the other is the current simple approach.

    The obvious addition of a tab under STATEMENTS or CLAUSES for GROUP BY is probably not going to fly.

  10. 5 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  SQL Prompt » Format SQL  ·  Flag idea as inappropriate…  ·  Admin →

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    An error occurred while saving the comment
    Jeff Humphreys commented  · 

    Yes, I hate those tabs showing up. Cutting and pasting in code does bring in tabs sometimes, that might be unavoidable.

    Jeff Humphreys supported this idea  · 
  11. 2 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  SQL Prompt » Format SQL  ·  Flag idea as inappropriate…  ·  Admin →

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    An error occurred while saving the comment
    Jeff Humphreys commented  · 

    This may have been fixed? I'm using 10.11.4.26759, and I have the option to format the indent on the VALUES section of the INSERT tab.
    <code>
    CREATE TABLE #t
    (
    keyID INT,
    item VARCHAR(11)
    )
    INSERT INTO #t
    (
    keyID,
    item
    )
    VALUES
    (
    NULL, -- keyID - int
    'no' -- item - varchar(11)
    )
    </code>

    I'm trying both code section and the picture attachment.

  12. 6 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  SQL Prompt » Code Analysis  ·  Flag idea as inappropriate…  ·  Admin →

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    An error occurred while saving the comment
    Jeff Humphreys commented  · 

    I have seen this as well. I don't know how difficult this would be, and debugging is available in Visual Studio SQL.

  13. 2 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  SQL Prompt » Format SQL  ·  Flag idea as inappropriate…  ·  Admin →

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    An error occurred while saving the comment
    Jeff Humphreys commented  · 

    This really needs a visual. I don't see where it becomes an update.

  14. 2 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  SQL Prompt » User interface  ·  Flag idea as inappropriate…  ·  Admin →

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    An error occurred while saving the comment
    Jeff Humphreys commented  · 

    That's actually a very creative idea! Which is rare sometimes. I use the IN clause generator, and it's a similar vertical version, and without the actual column names.

    I can definitely see using this. An extension could be that if you select cells (can you select cells?) on different rows, it generates a group OR "(x in('a', 'b')", only using AND for values on the same row. Very no-code idea.

    Jeff Humphreys supported this idea  · 
  15. 3 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  SQL Prompt » Format SQL  ·  Flag idea as inappropriate…  ·  Admin →

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    An error occurred while saving the comment
    Jeff Humphreys commented  · 

    It does seem like SQL Prompt over indents some things. There could be a master option, "unless indent would be > 30 spaces", though not sure that would work.

    Jeff Humphreys supported this idea  · 
  16. 2 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  SQL Prompt » Format SQL  ·  Flag idea as inappropriate…  ·  Admin →

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    An error occurred while saving the comment
    Jeff Humphreys commented  · 

    Seems more like a bug, too. Joins are joins.

    Jeff Humphreys supported this idea  · 
  17. 3 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  SQL Prompt » Tab history  ·  Flag idea as inappropriate…  ·  Admin →

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    An error occurred while saving the comment
    Jeff Humphreys commented  · 

    Please don't use a mouse wiggler, either.

  18. 4 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  SQL Prompt » Format SQL  ·  Flag idea as inappropriate…  ·  Admin →

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    Jeff Humphreys supported this idea  · 
  19. 2 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  SQL Prompt » Code Analysis  ·  Flag idea as inappropriate…  ·  Admin →

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    An error occurred while saving the comment
    Jeff Humphreys commented  · 

    Might be in their SQL Compare tool? I've often wanted this. Also that could use the previous commit version as a before and after output. git lets you do this with the code, but the data side and performance side would be great. That and the plan costs.

    But if they have data compare in another tool it might not be possible to include it in Prompt.

  20. 1 vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  SQL Prompt » User interface  ·  Flag idea as inappropriate…  ·  Admin →

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    An error occurred while saving the comment
    Jeff Humphreys commented  · 

    I've wanted this for when I'm editing a view or procedure, and I run the same query or exec after them. Currently I just have the exec or query in a separate window split and jump over and run after I rebuild the object.
    Eventually, when I get tired of this I just put the test command after the GO in the same query window. Every build, the test query(s) get run.

    But a pinned query that could just be run would often be helpful. Shows contents on hover. Where would the output go, if any?

← Previous 1