This is not surprising behaviour. If you subtract 12 from 10, you get
-2 every time.
If you want your result to be positive, make it the first parameter
and subtract the smaller (earlier) time from it. If your result is
negative, then you know you have crossed into another day (13:00:00 -
I've just been wondering if the length parameter of a VARCHAR column has
any effect on storage efficiency or space requirements. Afaik, VARCHAR
columns only store the amount of data actually written into them and
require no significantly more memory. So to be especially flexible with
a
I'm just curious to know if the length of the indexes on a varchar
column work in the same way or if they have a fixed lenght.
anybody knows ?
I don't see how they could be fixed length, since VARCHAR itself is
not fixed-length. Ergo, it makes sense that the prefix limitation is
the upper
SELECT
start_date,
end_date,
DATEDIFF(end_date, start_date) -
(WEEK(end_date) - WEEK(start_date)) * 2
AS business_days
FROM DateDiffs
ORDER BY start_date;
+-+-+---+
| start_date | end_date|
On Sat, 19 Feb 2005 14:01:05 +, Jerry Swanson [EMAIL PROTECTED] wrote:
I have two dates (start_date, end_date). Datediff() function returns
difference in days.
I need the difference but not including Satuday and Sunday.
Any ideas?
C:\Program Files\MySQL\MySQL Server 4.1\binmysql -utest
I was wondering if you could tell me of three or four alternative software
options that can be used for this middle layer. What are the costs involved
with any of these. Also if you could supply me with a sample script for
inserting data using these alternative scripting languages, as I have
Dear All, from a single row of a table, I have to select only the column,
which have a value larger '0' into an outfile.
How can I manage it with 'select'? Thanks, Jan
SELECT CASE can do that sort of thing for you. Here's a simplistic example:
CREATE TABLE `test`
(
`i1` int,