| |

VerySource

 Forgot password?
 Register
Search
Author: caoyuezj

How to write sql for document approval process

[Copy link]

1

Threads

15

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

 Author| Post time: 2020-1-18 04:00:01
| Show all posts
How to delete it?
Reply

Use magic Report

1

Threads

4

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-1-18 09:18:01
| Show all posts
It should be very simple to write this stored procedure in CLR and C #
Reply

Use magic Report

0

Threads

8

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-1-18 14:36:01
| Show all posts
create procedure p_SpIsExist (@vDjlxbm varchar (3), @vSpInfo varchar (8000), @vBm varchar (30), @iIsExist int output)
as
begin
  select @ iIsExist = count (*) from tbnote_check_order where charindex ('| bmbegin |' + @ vBm + '| bmend |', @vSpInfo)> 0 and f_bmbm = @ vBm and f_djlxbm = @ vDjlxbm
end

create function fun_getspinfo (@vSpInfo varchar (8000))
returns varchar (8000)
as
begin
  return (isnull (REPLACE (REPLACE (REPLACE (REPLACE (REPLACE (REPLACE (REPLACE (REPLACE (@PLACESpline, '| linebegin |', ''), '| lineend |', ''), '| bmbegin |', ''), ' | bmend | ',' '),' | ygbmbegin | ',' '),' | ygbmend | ',' '),' '))
end

create function fun_DelBmSpyj (@vSpInfo varchar (8000), @ vBm varchar (30))
returns varchar (8000)
as
begin
   declare @w int
   declare @len int
   declare @line varchar (8000)
   declare @s varchar (8000)
   set @ len = len (@vSpInfo)
   if @len> 0
   begin
      set @ s = @ vSpInfo
      while @len> 1
      begin
          if substring (right (@ vSpInfo, @ len), 1, len ('| linebegin |')) = '| linebegin |'
          begin
            set @ line = substring (@ vSpInfo, len (@vSpInfo)-@ len + 1, charindex ('| lineend |', right (@ vSpInfo, @ len)) + len ('| lineend |')-1)
            set @ w = charindex ('| bmbegin |' + @ vBm + '| bmend |', @ line)
            if @w> 0 set @ s = REPLACE (@ vSpInfo, @ line, '')
          end
          set @ len = @ len-1
      end
   end
   else set @ s = @ vSpInfo
   return isnull (@s, '')
end

--test
declare @s varchar (8000)
set @ s = 'fdssdf | linebegin | haha2007-1-1 | bmbegin | 001 | bmend | hehe123 | ygbmbegin | 001 | ygbmend | sdjklsd | lineend | 123'
select dbo.fun_DelBmSpyj (@ s, '001')
--result
fdssdf123
Reply

Use magic Report

0

Threads

8

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-1-18 15:18:01
| Show all posts
declare @s varchar (8000)
set @ s = 'fdssdf | linebegin | haha2007-1-1 | bmbegin | 001 | bmend | hehe123 | ygbmbegin | 001 | ygbmend | sdjklsd | lineend | 123'
select dbo.fun_DelBmSpyj (@ s, '004')

--result
fdssdf | linebegin | haha2007-1-1 | bmbegin | 001 | bmend | hehe123 | ygbmbegin | 001 | ygbmend | sdjklsd | lineend | 123
Reply

Use magic Report

0

Threads

48

Posts

30.00

Credits

Newbie

Rank: 1

Credits
30.00

 China

Post time: 2020-1-21 15:18:01
| Show all posts
Don't quite understand the meaning of LZ
Multi-sector approval flow? ? ?
Reply

Use magic Report

0

Threads

48

Posts

30.00

Credits

Newbie

Rank: 1

Credits
30.00

 China

Post time: 2020-1-21 15:36:01
| Show all posts
Think it's time to redesign
Reply

Use magic Report

1

Threads

15

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

 Author| Post time: 2020-1-22 11:36:02
| Show all posts
Yes, multi-department approval flow, all approval information is placed in a field, and this field is parsed
Reply

Use magic Report

1

Threads

15

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

 Author| Post time: 2020-1-22 13:00:01
| Show all posts
Is there a good way for everyone
Reply

Use magic Report

1

Threads

15

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

 Author| Post time: 2020-1-22 13:36:01
| Show all posts
My design is carried out through separators, which can simplify the design and achieve universality and scalability, but it is troublesome when parsing.
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-1-26 13:00:01
| Show all posts
Workflow project recommendations refer to wfmc or bpel specifications.
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list