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 |
|
Dilan13
Starting Member
6 Posts |
Posted - 2011-06-17 : 11:15:24
|
| I am getting the following error message "Invalid length parameter passed to the SUBSTRING FUNCTION" when running the following query. If I remove the where caluse then it works. dbo.view is another view and is working fine. Column] value contain numbersANy idea on what is causing the problem? This query used to work beforeselect [Years] as 'Years', [Scenario] as 'Scenario', 'M1' AS 'Period','Amount' as 'ValueType', [Currency] as 'Currency', [Source] as 'Source', [Version] as 'version', [Building] as 'building', [CostCenter] as 'CostCenter', [Account] as 'account', [Value]/12 as 'Amount'from [dbo].[vie] where [Value] <>0 |
|
|
nigelrivett
Master Smack Fu Yak Hacker
3385 Posts |
Posted - 2011-06-17 : 11:25:08
|
| is vie a view?==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
Dilan13
Starting Member
6 Posts |
Posted - 2011-06-17 : 11:30:26
|
| yes, it's a view |
 |
|
|
nigelrivett
Master Smack Fu Yak Hacker
3385 Posts |
Posted - 2011-06-17 : 11:42:25
|
| Have a look at the view - there is probably a substring, left or right statement or a udf in it that is causing problems.==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
|
|
|