dtcomsystem > 08-12-13, 11:28 PM
tt1212 > 09-12-13, 12:16 AM
dtcomsystem > 09-12-13, 01:13 PM
tt1212 > 09-12-13, 01:34 PM
Kiemtra1(a as string)
Vitri as integer
s as integer
For i =1 to len(a)
vitri=instr(1,a)....
if vitri =1 then
s =1 else
s=0
end if
kiemtra2 =s
Kiemtra2(a as string)
Vitri as integer
s as integer
For i =1 to len(a)
vitri=instr(1,a)....
if vitri =2 then
s =1 else
s=0
end if
kiemtra1 =s
paulsteigel > 09-12-13, 05:00 PM
SELECT [NHAP THU].[ma ky tu] AS mkt, GetValue([mkt],1) AS Expr1, GetValue([mkt],2) AS Expr2,
GetValue([mkt],3) AS Expr3, GetValue([mkt],4) AS Expr4, GetValue([mkt],5) AS Expr5, GetValue([mkt],6)
AS Expr6, GetValue([mkt],7) AS Expr7
FROM [NHAP THU];
Function GetValue(InTxt As String, Column As Long) As Long
GetValue = IIf(InStr(InTxt, Column) > 0, 1, 0)
End Function
SELECT [NHAP THU].[ma ky tu] AS MKT, IIf(InStr(MKT,1)>0,1,0) AS Expr1,
IIf(InStr(MKT,2)>0,1,0) AS Expr2, IIf(InStr(MKT,3)>0,1,0) AS Expr3,
IIf(InStr(MKT,4)>0,1,0) AS Expr4, IIf(InStr(MKT,5)>0,1,0) AS Expr5,
IIf(InStr(MKT,6)>0,1,0) AS Expr6, IIf(InStr(MKT,7)>0,1,0) AS Expr7
FROM [NHAP THU];
dtcomsystem > 09-12-13, 05:16 PM
bomnhauag > 09-12-13, 09:21 PM
public funtion A(s as string)
dim t as byte, i as byte
t = Split(s, ".") 'lệnh này sẽ dựa vào dấu '.' mà tách các số ra cho bạn và đưa chúng vào mảng t
'UBound(t) sẽ cho biết số lượng phần tử có mặt trong mảng t sau khi được Split 'xào nấu' lại
for i=0 to UBound(t)-1
select case t(i)
case 1
'làm cái j bạn mún làm ^^
case 2
case 3
case 4
case 5
case 6
case 7
case 8
end select
next i
end function