Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
masond
Constraint Violating Yak Guru
447 Posts |
Posted - 2013-03-12 : 06:29:46
|
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_statusFROM [FDMS].[dbo].[Comments2_All]INNER JOINDim_Outlet ON Comments2_All.FDMSAccountNo = Dim_Outlet.FDMSAccountNoThe 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
52326 Posts |
Posted - 2013-03-12 : 06:34:53
|
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 outputhttp://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
|
|
|
|
|