Viewing 15 posts - 91 through 105 (of 314 total)
Bill,
I hope this answers ur questions.
1.Create a populate Date table.(Lookup table)
Create table Dates(
dt_Date datetime,
WeekOf datetime)
Declare @dt_Date datetime
set @dt_Date ='2-Jan-2006'
set DateFirst 1
While (@dt_Date <= '2-Jan-2011')
Begin
Insert into Dates(dt_Date,WeekOf)
select @dt_Date,DateAdd(d, -1 *DatePart(dw,@dt_Date)+1,@dt_Date)
set @dt_Date =...
September 26, 2006 at 2:27 pm
Try connecting to server with "." as server name and see if it connects. If it does then u can change the relationship between "LOCAL" and ur actual server name.
Thanks
Sreejith
September 26, 2006 at 1:59 pm
I would like to avoid cursors as much as possible but in your case I think its better to use cursors:
Set nocount on
Declare @id varchar(50), @name varchar(50), @email varchar(255)
Declare my_cursor...
September 26, 2006 at 10:58 am
Bill,
To help us help u we need more information than what u had given. Can you give us some specific examples and what u except to see?
Thanks
September 26, 2006 at 10:46 am
I hope this is what u are looking for:
Select * from
(
SELECT #Period.AccountNumber,#Period.DateIn,--#Period.Amount,
(SELECT sum(Amount) FROM #Period S
where #Period.AccountNumber = S.AccountNumber
and S.DateIn between #Period.DateIn and DateAdd(mi,60,#Period.DateIn)) as Amount,
(SELECT Count(*) FROM #Period...
September 24, 2006 at 6:34 pm
are u trying to run a query and it takes longer? Do u want to speed up the query?
September 23, 2006 at 8:30 am
I would say there is a lot of discrimination out there. My previous employer got me at the lowest point in my career. My company had laid off and...
September 22, 2006 at 5:29 pm
Try this:
Declare @dt_Date datetime,
@dt_EndDate datetime
set @dt_Date=getdate()
select @dt_EndDate= Cast(Convert(Char(10),DateAdd(d,-1* Datepart(d,@dt_Date) + 1,@dt_Date),101) as datetime)
Select DateAdd(m,-1,@dt_EndDate) as BeginDate,@dt_EndDate as EndDate
Thanks
Sreejith
September 22, 2006 at 4:42 pm
You can add multiple "Execute SQL Tasks" and define works flows. Check it out.
Thanks
Sreejith
September 22, 2006 at 2:36 pm
Thanks Mattie for clarifying.
Your problem is u(Or the Account SQL Starts) don't have permissions to access one of the files mentioned in the connection object.
Thanks
Sreejith
September 22, 2006 at 2:34 pm
what do u mean by table 1(journal_entry_tb) up to date with table 2(journal_food_entry). I don't see any column thats repeating on both the tables (except PK-FK keys). Are u trying...
September 22, 2006 at 2:24 pm
when u stop and start SQL server all the connections would have been lost or killed. How can a tech support tell u that "Old" connection still exists.
Try running:
sp_who and...
September 22, 2006 at 2:18 pm
Try this:
Option 1: Max Page By PageID
Select Page_History.startdate, Page_History.starttime, Page_History.page, Page_History.pageid
from dbo.Page_History Page_History INNER JOIN (
Select pageid,max(startdate) as MaxStartDate ,max(StartTime) as MaxStartTime
from dbo.Page_History pgh2
group by pageid ) MaxPage on...
September 22, 2006 at 2:09 pm
DTS can handle transactions so Can you add the jobs steps in DTS and schedule the DTS?
Thanks
Sreejith
September 22, 2006 at 9:37 am
Schedule the DTS and Copy the DTSRun.....from the schedule job and paste it in after xp_cmdshell
Thanks
Sreejith
September 22, 2006 at 1:21 am
Viewing 15 posts - 91 through 105 (of 314 total)