Viewing 15 posts - 23,611 through 23,625 (of 26,490 total)
Hope the following (with changes) helps.
create table dbo.Orders (
OrderID int,
UserName varchar(25),
OrderDate datetime
);
create table dbo.Tasks (
...
November 21, 2008 at 10:13 am
Here is what I am trying to get at:
what you are getting ...
November 21, 2008 at 9:38 am
I have taken a closer look at your code, and it won't work. I just noticed the wildcard you are trying to use in the BUL INSERT pathname, and...
November 21, 2008 at 9:31 am
Ravi,
I actually want to point you to both articles listed below in my signature block. The first, which you already have been referred to, will help you get better...
November 21, 2008 at 9:02 am
Two things, unfortunately I don't have time to actually write it myself as I am trying to leave for work.
You need to convert the From datetime to a character string...
November 21, 2008 at 6:57 am
Problem I see is if you are basing this off the last payment. Do you ever look back at the initial payment date?
November 21, 2008 at 6:51 am
For the most part, Jeff, I agree. However, the new TIME and DATE data types in SQL Server 2008 will make it easier to build date and time dimensions...
November 21, 2008 at 6:49 am
Nevermind, Gail beat me to it.....
November 20, 2008 at 9:44 pm
DECLARE @sql nvarchar(max);
DECLARE @FromDate char(8);
DECLARE @ToDate char(20);
DECLARE @PathFileName varchar(2000)
SET @FromDate = 20080101;
SET @ToDate = CONVERT(CHAR(20),GETDATE(),112);
SET @PathFileName = 'D:\SalesHis\SALES.'+@FromDate+'%''.txt'
IF @ToDate > @FromDate
BEGIN
...
November 20, 2008 at 9:41 pm
First, by adding the DISTINCT to your select statement in your cursor definition, you eliminated all duplicates.
Second, this will not scale to very large tables, and there is most likely...
November 20, 2008 at 9:39 pm
That makes sense. I guess I'll start following that lead as well.
November 20, 2008 at 9:19 pm
First of all, put the criteria for the delete in the delete statement and do it in a set-based manner, not a RBAR (Row By Agonizing Row) method.
Here is a...
November 20, 2008 at 9:15 pm
First, WHY?
Second, set based solutions in SQL Server will work faster and scale a lot better than a cursor based solution.
Please read the article below about how to post questions...
November 20, 2008 at 9:05 pm
So, after all of this, you are actually trying to get the end of each month?
November 20, 2008 at 9:01 pm
Viewing 15 posts - 23,611 through 23,625 (of 26,490 total)