Forum Replies Created

Viewing 15 posts - 6,901 through 6,915 (of 7,597 total)

  • RE: Not getting results expected from a Group by query

    All I can see from what you've posted so far is the check for:

    activeclient > 0

    in the subquery (patient count) but not in the outer query (attendance count).

    It seems possible...

  • RE: I'm trying to create a proc that will drop and create a function

    The "sqlcmd" utility does recognize "GO", as well as many other things, including invoking OS cmds.

    I think you should be able to use "sqlcmd" to run the scripts.

  • RE: SQL Security Best Practices - Dealing With User Name Changes

    opc.three (1/14/2013)


    YSLGuru (1/14/2013)


    opc.three (1/12/2013)


    AD Groups as SQL Logins and Database Users work great unless you need the User to have a default schema. In SQL 2012 the loop has been...

  • RE: SQL Security Best Practices - Dealing With User Name Changes

    Yes, I would change the specific SQL user login to match the person's name, if all/part of the name itself is being used as part of the login.

    Use roles, where...

  • RE: Does Change Data Capture require a table have a primary key

    CDC requires a unique index. That makes sense given what it has to be able to do.

    I think by default it uses the PK as the unique index, but...

  • RE: Hard disk full

    If the log is on the same drive, don't purge any data until you've given the log more space!

    If the log is out of space, and particularly if it getting...

  • RE: trigger problem

    Any chance that either or both "TransferToCostCenter" and "TransferFromCostCenter" are NULL?

    Not equal won't work on NULL; you'll have to explicitly allow for NULL in the comparison.

    For example:

    WHERE ...

    ...

  • RE: Archiving

    If the computation "size / 1024 / 1024" yielded 96 gbsize,

    the correct computation of "size / 128 / 1024" would yield 8 times that, or:

    ~768gb

  • RE: Archiving

    size /1024 / 1024 AS gbsize

    That is not the right computation to get gb. "size" is the number/count of 8K pages. So, to get gb from size, you...

  • RE: SQL Security Best Practices - Dealing With User Name Changes

    The person's login id is often some combination of last name and first name, so you need to change the name there.

    However, internally you should assign each person/user a unique...

  • RE: Transaction log SHRINK

    You can definitely shrink the log file "live". SQL simply won't do it if it would cause a loss of data.

    The tricky part is finding the right size to...

  • RE: Date Comparisons

    And you often need to compare for a full day against a legitimate datetime column.

    For example, in a logging table, you would have logging datetime -- obviously you would want...

  • RE: Adding a time limit to a SQL Job

    When the potential-trouble step starts, it could immediately start another job. A job start is async so it would not delay the first process. The extra job...

  • RE: An Introduction to Database Design

    Excellent article overall.

    These are extremely difficult concepts to introduce to people, and the article does a superb job of making the ideas accessible to anyone.

    [I do think Alice should have...

  • RE: Need to find out whether date is of which data type

    Steven Willis (1/10/2013)


    ScottPletcher (1/10/2013)


    dwain.c (1/9/2013)


    Steven - Those FUNCTIONs look like nice work. I've saved them off for future analysis. 🙂

    You might want to review the new functions in SQL...

Viewing 15 posts - 6,901 through 6,915 (of 7,597 total)