WHB147 score syndrome section segment of each sector in 9CBS Split level Web development 10038 100 expansion topic 334 100.NET technology 285 100 C / C 30 100 MS-SQL Server 25 100 other database development 5 100 ------------------------------------ -------------------------------------------------- -------------- For a few more time, I saw a lot of people saying how to send a group to the stored procedure, in fact, I have no way, now I only think of a temporary method, with the audience, Hehe, I'm don't do it, we will pass the string, use "," separated, of course, you can also separate TNAME (0) = "WHB147", TNAME (1) = "ray", TNAME (2) = "ACK", you are constructed such as @ TNAME = 'WHB147, ray, Ack,' and then cut in the stored procedure, there is no split in SQL, you have to use other methods to see Charindex can look for Substring can feel a way, huh, huh, can be tested, feasible, the test code is as follows: Copy to the query analyzer running -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------------------------------------ Declare @tname varchar (100) Declare @start intDeclare @end IntDeclare @SUB VARCHAR (100)
Set @ TNAME = 'WHB147, RAY, ACK,' SET @ Start = 0set @end = 1WHILE (@end> 0) Begin set @ start = @ End Select @ End = Charindex (', @tname, @ End 1)
IF (@end> = @Start) begin set @Sub = Substring (@tname, @start, @ End- @ start) set @SUB = Replace (@SUB, ',', '') print @sub covend
--------------------------- Show results WHB147RAYACK -------------------- ------- This is just a temporary method ===================================== == --------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------- author: wxz-- published: 2002-10-25 12:24 : 42
- Collect the custom function of the ASP! This topic is designed for collecting ASP's custom functions. If you have a good custom function in your study, please learn together! It is best to explain the usage. (This borne irrigation) REM Chinese character Judgment Function ischinese (Para) on Error Resume Next Dim Str Dim i if Isnull (Para) Then iSCHINESE = FALSE EXIT FUNCTION END ISCHINESE = FALSE EXIT FUNCTION END IF STR = CSTR (PARA) IF TRIM (STR) = "" " IsChinese = false exit function end if for i = 1 to len (str) c = ASC (MID (STR, I, 1)) IF c> = 0 Then ischinese = false exit function end if next ischinese = true if err.number <> 0 Then Err.clear End Function%>
Such as: if not ischinese (Request ("Name")) "" " "
This is simpler for (i = 0; i -------------------------------------------------- ----- Generate a non-repetitive number Sub Calcapiao () DIM STRCAIPIAONOARR () AS STRINGDIM STRSQL AS STRINGDIM STRCAIPIAONO AS STRINGSTRCAIPIAONO = "01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33 "DIM STRTEMPARR (7) AS Stringdim Strzhongjiangarr (7) AS Stringstrcaipiaonoarr = Split ( strCaiPiaoNo, ",") Dim intRand As IntegerDim i As IntegerDim j As Integeri = 0Dim find As BooleanDo While Truefind = FalseRandomizeintRand = Int ((33 * Rnd) 1) For j = 0 To i - 1If StrTempArr (j) = CStr (intRand) Thenfind = TrueEnd IfNextIf Not find ThenStrTempArr (j) = CStr (intRand) strZhongJiangArr (i) = CStr (intRand) 'Text1 (i) = strZhongJiangArr (i) i = i 1If i = 7 ThenExit doEnd IfEnd IfLoopEnd Sub -------------------------------------------------- ------------- author: wxz-- published: 2002-10-2521: 13: 52-- RMB lowercase to uppercase <% '**** RMB case transformation format **** DIM STR (9) Str (0) = "zero" STR (1) = "" str (2) = "" str (3) = "" Str (4) = "" str (5) = "Wu" STR (6) = "Lu" STR (7) = "柒" Str (8) = "捌" str (9) = "玖"AA = Request.form (" Source ") HH = FormatNumber (AA, 2, -1) AA = Replace (HH,", "") AA = Replace (aa, ",", ",") for i = 1 to Len (aa) s = MID (AA, I, 1) MyNum = STR (s) SELECT CASE (LEN (AA) 1-I) Case 1: k = mynum & "points" case 2: k = mynum "Corner" case 3: k = mynum & "yuan" case 4: k = mynum & "pick" case 5: k = mynum & "" case 6: k = mynum & "仟" Case 7: k = mynum & "10,000" case 8 : k = mynum & "Pick up" case 9: k = mynum & "" case 10: k = mynum & "仟" end selectm = m & knext%>