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 |
dhrupit
Starting Member
2 Posts |
Posted - 2013-09-13 : 06:05:54
|
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'); |
|
bandi
Master Smack Fu Yak Hacker
2242 Posts |
|
dhrupit
Starting Member
2 Posts |
Posted - 2013-09-13 : 06:38:59
|
sorry dear, but my issue is 8155 and not 8115.But thanks for reply.. |
|
|
Lamprey
Master Smack Fu Yak Hacker
4614 Posts |
Posted - 2013-09-13 : 11:51:48
|
Do you understand what the error means? |
|
|
|
|
|
|
|