Viewing 15 posts - 4,786 through 4,800 (of 6,036 total)
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...
November 14, 2006 at 4:11 pm
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...
November 14, 2006 at 3:02 pm
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...
November 14, 2006 at 2:09 pm
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...
November 14, 2006 at 12:15 pm
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???
November 14, 2006 at 3:44 am
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...
November 14, 2006 at 2:20 am
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
November 13, 2006 at 9:32 pm
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())
November 13, 2006 at 9:03 pm
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.
November 13, 2006 at 6:55 pm
And it actually gave me this job... ![]()
When they hit the wall they started to look for a professional.
But not when they started...
November 13, 2006 at 4:50 pm
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),...
November 13, 2006 at 3:24 pm
You statement enforces table scan for sure.
My option leaves a chance of using indexes. If there are some. What I doubt.
November 13, 2006 at 2:48 pm
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.
November 13, 2006 at 2:26 pm
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...
November 13, 2006 at 2:19 pm
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....
November 13, 2006 at 1:25 pm
Viewing 15 posts - 4,786 through 4,800 (of 6,036 total)