Viewing 15 posts - 2,026 through 2,040 (of 2,171 total)
Yes, the SQL Server can't interpret those days show, as valid dates for various reasons.
One reason can be that the date format has changed, for example from d-m-y to m-d-y...
June 29, 2006 at 4:17 am
You're welcome! Now there is only holidays to take care of as well
Actually, there are so many ways to utilize functions, like...
June 29, 2006 at 4:10 am
Thank you.
There is one drawback with my method. You can only have 2,000 levels of nodes. But you can have 2 billion nodes in total!
For the CSV method, the output...
June 28, 2006 at 10:20 pm
Of course you will experience a time-out! Your variable @cnt in the function never increments and thus will WHILE loop never exit. Please use a proper...
June 28, 2006 at 10:18 am
I think one row or more in the Admissions_data table contains an invalid date. This is the most likely scenario.
Which is the fourth column of date information? Is this column...
June 28, 2006 at 5:36 am
If you do not want the versatility of my function fnSeqDates, this is a rewrite only of your VBA script.
CREATE FUNCTION dbo.fnWorkingDays
(
@msDate1 DATETIME,
@msDate2 DATETIME
)
RETURNS INT
AS
BEGIN
DECLARE @Days INT
June 28, 2006 at 3:48 am
You are using ODBC to copy from one table in SQL to another table in SQL?
Create a stored procedure to do that for you, and call the SP from your...
June 28, 2006 at 3:35 am
I think we are missing some information here. It seems that the ODBC driver does not recognize the datetime format.
What are you trying to accomplish? Inserting rows from an outside...
June 28, 2006 at 3:01 am
If necessary, use
INSERT DestinationTable (DestField)
SELECT CONVERT(DATETIME, MyField, 121) FROM SourceTable
121 is not needed. It is just there for enforcing yyyy-mm-dd hh:mm:ss.mmm format. SQL Server tries to...
June 28, 2006 at 2:48 am
Use a function like this, or any other similar. Call with
SELECT COUNT(*) Workdays FROM dbo.fnSeqDates('8/1/2006', '8/31/2006') WHERE DATEPART(dw, SeqDate) BETWEEN 2 AND 6
or
SELECT SeqDate Dates FROM dbo.fnSeqDates('8/31/2006', '8/1/2006') WHERE...
June 28, 2006 at 2:06 am
See Regional Settings in Control Panel.
June 28, 2006 at 1:59 am
???
SQL Server has a start date of January 1, 1753 and end date of December 31, 9999 when using DATETIME. SMALLDATETIME has start date of January 1, 1900 and end date of June...
June 28, 2006 at 1:53 am
Microsoft Excel, prior to version 2007, does not support 500 columns. Max is 256 columns for older versions and 1024 columns for Excel 2007.
June 28, 2006 at 1:41 am
We are not able to see images stored on your local computer at drive m:
Please upload image to public website and post the link here to that image.
Meanwhile, try to open...
June 28, 2006 at 1:33 am
Try these functions!
CREATE FUNCTION dbo.fnGetTree-- returns csv
(
@ParentID INT,
@Levels INT
)
RETURNS VARCHAR(8000)
AS
BEGIN
IF @Levels < 1
RETURN ''
DECLARE @Tree TABLE
(
TreeID INT IDENTITY(0, 1),
TreeKey VARBINARY(8000),
Generation SMALLINT,
ParentID INT,
ID INT
)
June 28, 2006 at 1:01 am
Viewing 15 posts - 2,026 through 2,040 (of 2,171 total)