Forum Replies Created

Viewing 15 posts - 1,096 through 1,110 (of 7,614 total)

  • Reply To: Enclosure

    Within other quotes, you have to double up the single quotes around the date, like so:

    SET @Where = @Where + ' T0.U_DATE BETWEEN ''20210301'' and ''20210331'' '

  • Reply To: clustered index usage

    For doing single row lookups, a nonclustered index (NI) on a heap is no worse performance than a clustered index (CI).  However, as Grant noted, SQL does truly prefer CIs.

    If...

  • Reply To: Extract certain string before a particular string

    IF you want to extract the value after 'number="' in the string:

    SELECT *,
    SUBSTRING(string, NULLIF(CHARINDEX('number="', string), 0) + 8,
    ...
  • Reply To: Grouping by hour and minute from TimeStamped data

    No sample data, so unable to test.  You might have to include DATENAME(WEEKDAY, CA1.[Start Time]) in the GROUP BY, but I don't think that's required.  I can't remember for sure...

  • Reply To: permissions

    Michael L John wrote:

    ScottPletcher wrote:

    frederico_fonseca wrote:

    ScottPletcher wrote:

    Jeff Moden wrote:

    ScottPletcher wrote:

    "I review it".  How long does THAT take?

    And why does it need reviewed for "safety" if they don't have the permissions to change anything...

  • Reply To: permissions

    Ed Wagner wrote:

    frederico_fonseca wrote:

    ScottPletcher wrote:

    Jeff Moden wrote:

    ScottPletcher wrote:

    "I review it".  How long does THAT take?

    And why does it need reviewed for "safety" if they don't have the permissions to change anything on...

  • Reply To: permissions

    frederico_fonseca wrote:

    ScottPletcher wrote:

    Jeff Moden wrote:

    ScottPletcher wrote:

    "I review it".  How long does THAT take?

    And why does it need reviewed for "safety" if they don't have the permissions to change anything on the...

  • Reply To: permissions

    Jeff Moden wrote:

    ScottPletcher wrote:

    "I review it".  How long does THAT take?

    And why does it need reviewed for "safety" if they don't have the permissions to change anything on the instance??

    What on...

  • Reply To: permissions

    Jeff Moden wrote:

    ScottPletcher wrote:

    frederico_fonseca wrote:

    ScottPletcher wrote:

    Hold on.  I explicitly stated that auditors should not be able to change anything on the system.  Talking about giving auditors "sysadmin" is a straw man.

    Scripts that...

  • Reply To: permissions

    frederico_fonseca wrote:

    ScottPletcher wrote:

    Hold on.  I explicitly stated that auditors should not be able to change anything on the system.  Talking about giving auditors "sysadmin" is a straw man.

    Scripts that capture full...

  • Reply To: permissions

    frederico_fonseca wrote:

    ScottPletcher wrote:

    Hold on.  I explicitly stated that auditors should not be able to change anything on the system.  Talking about giving auditors "sysadmin" is a straw man.

    Scripts that capture full...

  • Reply To: T-SQL Error: Msg 102, Level 15, State 1, Line 4 Incorrect syntax near '('.

    One of the annoying things about the $(ESCAPE macros is that they are recognized only in job code (at least the last time I checked this).

    So you'll have to run...

  • Reply To: permissions

    Jeff Moden wrote:

    ScottPletcher wrote:

    An "audit" that only allows what the DBA wants to run is not a true audit.

    Correct.  That's why I have them witness the runs.  And, as a...

  • Reply To: permissions

    frederico_fonseca wrote:

    ScottPletcher wrote:

    And in neither case did all inquiries go thru and be approved by the DBA, correct?

    An "audit" that only allows what the DBA wants to run is...

  • Reply To: permissions

    Michael L John wrote:

    Jeff Moden wrote:

    ScottPletcher wrote:

    Jeff Moden wrote:

    ScottPletcher wrote:

    Jeff Moden wrote:

    frederico_fonseca wrote:

    why do other uses need to see who can login on a server? that is on its own a security risk and should...

Viewing 15 posts - 1,096 through 1,110 (of 7,614 total)