Viewing 15 posts - 481 through 495 (of 668 total)
How about using a CTE?
;with cte as (select Eligibility_ID, SubScriber_ID, Start_Date, End_Date,
ROW_NUMBER() OVER (Partition by Subscriber_ID ORDER BY Subscriber_ID, Start_Date, End_Date) as Span_Num
FROM Eam_Member_Eligibility EME1 )
update e
...
August 13, 2010 at 8:05 am
sounds like homework. If it isn't then can you post DDL and what you have tried so far?
July 23, 2010 at 10:24 am
Did any of this resolve your issue? Can you post your solution or point to what the solution was?
July 23, 2010 at 9:11 am
I'm glad that you just started coming to this forum and have it all figured out. As an FYI, we are volunteering our time to try to help others...
July 23, 2010 at 8:34 am
your code doesn't work. Need to change the dash to underscore. Since you didn't provide table layouts, I used a sys.tables and it functions as expected.
declare @sd...
July 23, 2010 at 8:17 am
Sharon, can you provide table layouts, sample data and some expected results? Check out the first link in my signature on how to post to this site
July 23, 2010 at 8:10 am
ok, if you don't want to use truncate, then the reason your code doesn't work is because of the Go. Try this
CREATE PROCEDURE usp_proc_d_zone AS
begin
IF EXISTS (SELECT *...
July 22, 2010 at 1:44 pm
Not sure what you want to call the last column but here goes. I think you were looking for a header record then the following detail records.
CREATE TABLE #TEMP_MAIN...
July 22, 2010 at 1:25 pm
why would you want to drop and recreate it? This will cause users running this proc to have elevated privileges on the database. Why not just truncate...
July 22, 2010 at 1:02 pm
DooDoo (7/22/2010)
July 22, 2010 at 12:41 pm
The code that christopher gave you is probably better to use since you don't have to declare any variables, Just select the values from the table as you are...
July 22, 2010 at 10:44 am
Could it be as simple as this? :unsure:
if Project = 105000 and Intercompany Loan Accounts not between 125100 - 125950
begin
...
July 22, 2010 at 10:30 am
Here's one way
declare @t table (AppID int, AppName varchar(10), Version int, AppCount int)
insert into @t
select 1,'Access',2000, 12 union all
select 2,'Access',2001, 34 union all
select 3,'Access',2002, 7
select a.AppID, a.AppName, a.Version, a.Appcount,...
July 22, 2010 at 10:20 am
I'm not sure how big your tables are, but the following will perform a table scan instead of using an index which will cause huge performance issues on larger tables
WHERE...
July 22, 2010 at 10:07 am
Viewing 15 posts - 481 through 495 (of 668 total)