Forum Replies Created

Viewing 15 posts - 241 through 255 (of 283 total)

  • RE: CHAR vs VARCHAR

    It doesn't matter if the columns are defined NULL or NOT NULL. Do the columns contain NULL values? In your original post you stated that most of the ones after...

  • RE: Advantage to creating an Index when searching for NULLs?

    Exactly. For example, having read the cited article before, I was never able to understand why something like "in" and "exists" are sargable but "not in" and "not exists" are...

  • RE: difference between stored proc and functions?

    My, my. One gets the impression anyone who uses a UDF should be drummed out of the industry. One wonders why the awful things were ever developed in the first...

  • RE: CHAR vs VARCHAR

    You said most of the repeated columns are empty. Do you mean they are NULL? If so, even fixed-length columns take up no space when they are NULL. So transfering...

  • RE: Stored Proc Optimization Help

    Actually, you might try increasing the number of function calls in your WHERE clause. You are creating temp tables and then populating them with a list you generate from a...

  • RE: How to Update a base table from Function

    Listen to noeld. A function, by definition, does not directly make changes to your database -- that is what procedures are for. This is not a SQL Server rule, or...

  • RE: Date sorting based on Varchar datatype

    Can you create another column? Call it, oh, OrderByCol, make it a datetime type and store the date in actual datetime form. Then:

    Select DisplayCol
    From Table
    Order By OrderByCol

    Or you can just...

  • RE: TSQL question with Datediff

    Actually, we have a function, TruncTime, which we use. I changed it to one of the more often used hardcoded methods for simplicity. I guess I should have just left...

  • RE: TSQL question with Datediff

    Yes, but also keep in mind that this is executed once for each query, not once for each row. At least -- it should! If I am wrong about that...

  • RE: TSQL question with Datediff

    The recommendation to keep the WHERE clause sargable was sound. However, I try never to use direct datetime manipulation. Also there is another thing to consider.

    The way to write the...

  • RE: Autoincrement Field for Multi-company database

    Why are the users even aware of these values? How is it that they can even see them?

  • RE: Help with efficient coding (part of Dynamic Query in SP)

    Here's a general case which may help. I'll build it incrementally so you can see the process.

    Create the table and populate it:

    CREATE TABLE dbo.TotalsTest(
        Mon  ...

  • RE: Autoincrement Field for Multi-company database

    I don't seem to have the ability to edit quotes do I will just refer to what you say.

    I am a big believer in aesthetics in code. I like to...

  • RE: SELECT *

    There are many valid reasons not to perform a SELECT * from a table. You probably know them. But, instead of using SELECT C1, C2,... from the table, you are...

  • RE: Blackle

    I also have learned over the years that a dark background with colored text is a lot easier on my poor, old eyes. The text also appears sharper which I...

Viewing 15 posts - 241 through 255 (of 283 total)