SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Populating fields, with old data
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

masond
Constraint Violating Yak Guru

447 Posts

Posted - 03/12/2013 :  06:29:46  Show Profile  Reply with Quote
Hey Guys
I am really stuck with this issue that i am facing, and i am hoping you will be able to help me
My initial table consists of the following
SELECT [FDMSAccountNo]
,[Comments2]
,[Submission_Route]
,[Period]
FROM [FDMS].[dbo].[Comments2_All]

I then changed the table to

SELECT [Comments2_All].[FDMSAccountNo],
len(Comments2) as comments,
[Submission_Route]
,[Period],
account_status
FROM [FDMS].[dbo].[Comments2_All]
INNER JOIN
Dim_Outlet ON Comments2_All.FDMSAccountNo = Dim_Outlet.FDMSAccountNo

The length of (Comments2) varies in size from ( 23,27,30,31,32,33,41,42,43)

If the account status is anything other than ‘16’ then i want to get the last submission route populated and populate all future periods with the last known submission route.

Hope this make sense


visakh16
Very Important crosS Applying yaK Herder

India
52249 Posts

Posted - 03/12/2013 :  06:34:53  Show Profile  Reply with Quote
nope...makes no sense for anyone unless they know how your sample data is in the two tables and what exactly you're trying to achieve!

so please post some sample data in easy consumable format as below and give your required output

http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000