Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

SQLÓï¾ä

'for payment type
    sCmd = "Select Sum(B.PaymentAmount) As SPaymentAmount, Sum(B.Changes) As SChange, "
    sCmd = sCmd & " B.PaymentType from Trans A INNER JOIN TransPayment B ON A.TransID = B.TransID "
    sCmd = sCmd & " Where B.BusinessDate  " & sDtCr & " And "
    sCmd = sCmd & " A.TransStatus In (2, 3, 4) "
    sCmd = sCmd & " Group By B.PaymentType "
    sCmd = sCmd & " Order By B.PaymentType"
    Set oRs = oCmn.ExecRS(sCmd, SDCN)
    Do While Not oRs.EOF
        cTotalSales = cTotalSales + IIf(IsNull(oRs!SPaymentAmount), 0, oRs!SPaymentAmount)
        If UCase(Trim(oRs!PaymentType)) = "CASH" Then
            cCashInDrawer = cCashInDrawer + IIf(IsNull(oRs!SPaymentAmount), 0, oRs!SPaymentAmount)
        End If
        sPrnLn = Space(9) & PADR(Trim(oRs!PaymentType), 10) & ":  " & PADR(oCurrency.FormatCurrency(IIf(IsNull(oRs!SPaymentAmount), 0, oRs!SPaymentAmount), , , True), 10)
       
        AddContents sPrnLn
        'P_PrintText sPrnLn, oPrn
   


Ïà¹ØÎÊ´ð£º

Çë½ÌsqlÓï¾ä¡£ - Oracle / ¿ª·¢

ÎÒÓÐÒ»¸ö±í£¬½á¹¹ÊÇÕâÑù¡£
  ת³ö µ¥Î» תÈ뵥λ ±ÊÊý ½ð¶î
date(Ö÷) outid(Ö÷) inid(Ö÷) num amt
2009 1 2 1 500 Ϊ 1 µ¥Î» ÔÚ2009Ä ......

Êý¾ÝÒÔxml¸ñʽ·µ»Ø - MS-SQL Server / Ó¦ÓÃʵÀý

´ÓÊý¾Ý¿âÖвéѯһÕűíµÄÊý¾Ý
select ²¿ÃÅ,ÐÕÃû from tb
ÈçºÎ²ÅÄÜÉú³ÉÏÂÃæµÄxml¸ñʽ
XML code:
<folder state="unchecked" label="È«²¿">
¡¡¡¡ <folder state="unchecked&qu ......

pl/sql - Oracle / ¿ª·¢

СµÜ£¬×î½üҪתÐÐÈ¥×öoracle¿ª·¢ÁË£¬ÓÉÓÚ´óѧ±Ïҵʱ£¬×ßÁ˸öÍä·£¬ÏÖÔÚºÜСÐÄ£¬ÎÊÏ£¬×öPL/SQLÓÐûÓÐǰ;£¿£¿£¿
µ±È»ÎÒ˵µÄÕâ¸öǰ;ÊÇÖ¸ ÒÔºóÒªÌø²Û£¬Êг¡¶ÔÕâÑùµÄÈ˲ŵÄÐèÇóÁ¿´ó²»´ó£¿£¿

3q ÄÇ¿´À´»¹Ö»ÄÜÏȽӴ ......

Ò»¸öpl/sqlÎÊÌâ - Oracle / ¿ª·¢

ÎÒÊÇÔÚtoadÖÐÊäÈë϶Îsql
  declare
  TYPE test_rec IS record(
  code varchar(10),
  name varchar(30)
  );
  v_book test_rec;
    ......

ÇóÒ»sqlÓï¾ä - MS-SQL Server / »ù´¡Àà

±í
id bh  
1 10
2 11
3 12 
4 15
5 16
6 22
7 25
8 26
9 27
10 28
½«bh°´Á¬Ðø·Ö¶Î³öÀ´·µ»Ø×Ö·û´®£º
10~12£¬15~16£¬22£¬25~28
SQL code:


declare @t tabl ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ