Forum Replies Created

Viewing 15 posts - 4,786 through 4,800 (of 6,036 total)

  • RE: SQL syntax

    Sergiy: "db2l, I believe it's not "SQL syntax" question anymore. It's "I don't want to think" issue."

    Sergiy: "How many seconds of thinking effort it takes?"

    1st, it was not...

  • RE: SQL syntax

    I wonder, where did you see hostility?

    I'm trying to help you to avoid wrong solutions, and you name it hostility???

    Man, get rid of...

  • RE: SQL syntax

    Edwin,

    Yes, in this case you do this stupid conversion once. So, overhead is not that big, but it's still overhead. Unnecessary overhead.

    Why stupid? Because you may achieve the same...

  • RE: SQL syntax

    Edwin, don't do datetime to varchar conversion! Ever! Unless it's for reporting purposes.

    Such conversion is terribly slow and creates huge load on CPU.

    Create 100000 rows temp table and compare performance...

  • RE: Convert Excel spreadsheet contents into dBase4 file

    Why SQL2000???

    Why not export directly from Excel to DB4?

    Did you ever look at the list of formats in Save As menu in Excel???

  • RE: How many user current "connect" to a row in table.

    Sol, you may use "timestamp" column.

    Timestamp in MS SQL does not have anything common with dates. It's integer value being incremented automatically every time the row is updated.

    When you load...

  • RE: SQL syntax

    Or even easier:

    select * from table

    where timestamp_column >= dateadd(mm, -1, dateadd(dd, datediff(dd, 0, GETDATE()), 0) )

       AND timestamp_column < dateadd(mm, -1, dateadd(dd, datediff(dd, 0, GETDATE()), 0) ) + 1

     

  • RE: SQL syntax

    select * from table

    where timestamp_column >= dateadd(mm, datediff(mm, 0, GETDATE()) -1, 0) + DAY(GETDATE()) - 1

       AND timestamp_column < dateadd(mm, datediff(mm, 0, GETDATE()) -1, 0) +DAY(GETDATE())

  • RE: Column Names to Column Headers

    Translate, please.

    I've got on my computer drives A:, C:, D:, E:, and CD_ROM O:

    How you gonna report such system?

    And answer Jeff's question finally.

  • RE: Foreign Key across Databases?

    And it actually gave me this job...

    When they hit the wall they started to look for a professional.

    But not when they started...

  • RE: CASE STATEMENT IN WHERE CLAUSE

    And even your version can be smplified:

    AND

    CASE WHEN @custom_value='D' then AL1.amount ELSE  AL1.quantity END

    between @threshold_value1 and @threshold_value2

    Not sure this will use any index (there is a small chance),...

  • RE: CASE STATEMENT IN WHERE CLAUSE

    You statement enforces table scan for sure.

    My option leaves a chance of using indexes. If there are some. What I doubt.

  • RE: CASE STATEMENT IN WHERE CLAUSE

    AND (

            (@custom_value='D' AND AL1.amount between @threshold_value1 and @threshold_value2)

       OR (@custom_value<>'D' AND AL1.quantity between @threshold_value1 and @threshold_value2)

    )

    I would kill for such design and such queries.

  • RE: Foreign Key across Databases?

    Fortunately it's not big. Yet.

    Under 1GB all together.

    But even with this amount of data it takes up to 40 seconds to update web-page. Because server is too busy with "more...

  • RE: Foreign Key across Databases?

    That what I'm dealing with. Bloody 3rd part application.

    And what causes my deepest frustration.

    It's funny, but in order to work with it people load the whole database across servers line-by-line....

Viewing 15 posts - 4,786 through 4,800 (of 6,036 total)