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
 SQL Server 2012 Forums
 Transact-SQL (2012)
 Msg 8155, Level 16, State 2, Line 41
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

dhrupit
Starting Member

India
2 Posts

Posted - 09/13/2013 :  06:05:54  Show Profile  Reply with Quote
SELECT * FROM
(SELECT ROW_NUMBER() OVER (ORDER BY ID asc) AS [ROW_NUMBER],* FROM
(SELECT * FROM
(SELECT WorkflowItem.*,
(SELECT Document.* ,
(SELECT HostApplicationLocalData.* FROM HostApplicationLocalData
WHERE HostApplicationLocalData.ID = Document.HostApplicationLocalData_ID FOR XML PATH('HostApplicationLocalData'), TYPE) ,
(SELECT DocumentMetaData.*,
(SELECT Field.* FROM Field WHERE Field.ID=DocumentMetaData.Field_ID FOR XML PATH('Field'), TYPE)
FROM DocumentMetaData WHERE DocumentMetaData.Document_ID=Document.ID FOR XML PATH('DocumentMetaData'), TYPE) AS DocumentMetaDatas
FROM Document WHERE WorkflowItem.Document_ID=Document.ID FOR XML PATH('Document'), TYPE)
FROM WorkflowItem as WorkflowItem
INNER JOIN PaperSaveWorkflow as PaperSaveWorkflow
ON PaperSaveWorkflow.ID = WorkflowItem.PaperSaveWorkflow_ID AND PaperSaveWorkflow.ID = 1
WHERE PaperSaveWorkflow.Published=1 AND WorkflowItem.CurrentOwner IS NOT NULL AND WorkflowItem.CurrentOwner<>'' AND (WorkflowItem.IsRunning = 1
OR ( WorkflowItem.IsRunning = 0 AND [dbo].[IsOneStringContainedInListOfOtherStringWhenTokenized]
('product development;miamimba\logonlocally',
LOWER(PaperSaveWorkflow.CanViewCompletedItems) + ';' + LOWER(PaperSaveWorkflow.WorkflowAdmin) ) = 1 ))
AND ([dbo].[IsOneStringContainedInListOfOtherStringWhenTokenized]
('dave\log on locally',
LOWER(WorkflowItem.CurrentOwner + ';' + LOWER(PaperSaveWorkflow.WorkflowAdmin) + ';' + LOWER(PaperSaveWorkflow.ViewPrinciples))) = 1)FOR XML PATH('WorkfLowItems'), TYPE)
as p
) AS T1) as T WHERE ROW_NUMBER between 1 and 2 FOR XML PATH ('MyTable') ,ROOT('ArrayOfWorkflowItem');

Edited by - dhrupit on 09/13/2013 06:06:25

bandi
Flowing Fount of Yak Knowledge

India
2170 Posts

Posted - 09/13/2013 :  06:33:18  Show Profile  Reply with Quote
Refer http://blog.sqlauthority.com/2007/07/06/sql-server-fix-error-msg-8115-level-16-state-2-line-2-arithmetic-overflow-error-converting-expression-to-data-type/

Fix/Solution/Workaround:
1) Verify the inserted/updated value that it is of correct length and data type.
2) If inserted/updated value are correct modify the definition of the table to accommodated new data type length

--
Chandu
Go to Top of Page

dhrupit
Starting Member

India
2 Posts

Posted - 09/13/2013 :  06:38:59  Show Profile  Reply with Quote
sorry dear, but my issue is 8155 and not 8115.

But thanks for reply..
Go to Top of Page

Lamprey
Flowing Fount of Yak Knowledge

4361 Posts

Posted - 09/13/2013 :  11:51:48  Show Profile  Reply with Quote
Do you understand what the error means?
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.05 seconds. Powered By: Snitz Forums 2000