#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2003
    Posts
    2
    Rep Power
    0

    convert data type varchar to money


    Hi all, can anyone here advise me how to do the conversion of data type varchar to money... here's my coding for your references:

    <%
    vreqType = Request("vreqType")
    vReqtrEmail = Request("vReqtrEmail")
    'vReqNo = Request("ReqNo")
    vAppnId = Request("vAppnId")
    vreqTitle = replace(trim(Request("vreqTitle")),"'","''")
    vDesiredDt = month(Request("vDesiredDt")) & "/" & day(Request("vDesiredDt")) & "/" & year(Request("vDesiredDt"))
    vReqtr = replace(trim(Request("vReqtr")),"'","''")
    'date = Request("date()")
    vContactNo = Request("vContactNo")
    vDept = replace(trim(Request("vDept")),"'","''")
    vRC = Request("vRC")
    vPriority = Request("vPriority")
    vfuncReq = server.URLencode(trim(Request("vfuncReq")))
    vFreqVol = server.URLencode(trim(Request("vFreqVol")))
    vSavings = Request("vSavings")
    vRevenue = Request("vRevenue")
    vBenefit = server.URLencode(trim(Request("vBenefit")))
    vTester = replace(trim(Request("vTester")),"'","''")
    vTesterContact = Request("vTesterContact")
    vApprovOfficer = replace(trim(Request("vApprovOfficer")),"'","''")
    vApprovEmail = Request("vApprovEmail")
    vStatus = Request("vStatus")
    %>

    <%
    sql="INSERT INTO Requests (ReqNo,ReqType,AppnId,reqTitle,ReqDt,DesiredDt,Req
    tr,ReqtrEmail,ContactNo,Dept,RC,Priority,funcReq,F
    reqVol,Savings,Revenue,Benefit,Tester,TesterContac
    t,ApprovOfficer,ApprovEmail,ReqStatus)"
    sql=sql & " VALUES "
    sql=sql & "('" & ReqNo & "',"
    sql=sql & "'" & vreqType & "',"
    sql=sql & "'" & vAppnId & "',"
    sql=sql & "'" & vreqTitle & "',"
    sql=sql & "'" & (ReqDt) & "',"
    sql=sql & "'" & cdate(vDesiredDt) & "',"
    sql=sql & "'" & vReqtr & "',"
    sql=sql & "'" & vReqtrEmail & "',"
    sql=sql & "'" & vContactNo & "',"
    sql=sql & "'" & vDept & "',"
    sql=sql & "'" & vRC & "',"
    sql=sql & "'" & vPriority & "',"
    sql=sql & "'" & vfuncReq & "',"
    sql=sql & "'" & vFreqVol & "',"
    sql=sql & "'" & ccur(vSavings) & "',"
    sql=sql & "'" & ccur(vRevenue) & "',"
    sql=sql & "'" & vBenefit & "',"
    sql=sql & "'" & vTester & "',"
    sql=sql & "'" & vTesterContact & "',"
    sql=sql & "'" & vApprovOfficer & "',"
    sql=sql & "'" & vApprovEmail & "',"
    sql=sql & "'" & vStatus & "')"

    MSCS.execute(sql)
    %>

    can anyone kindly advise?? thanks!!
  2. #2
  3. Second highest poster :p
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2001
    Posts
    7,322
    Rep Power
    33
    These questions are not related to MySQL can you please post them in the correct forums
    - Andreas Koepke

    Koepke Photography

  4. #3
  5. No Profile Picture
    Apprentice Deity
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 1999
    Location
    Niagara Falls (On the wrong side of the gorge)
    Posts
    3,237
    Rep Power
    19
    Also, PLEASE do NOT x-post. Moving to ASP
  6. #4
  7. No Profile Picture
    Overly white
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2003
    Location
    Fresno, CA
    Posts
    83
    Rep Power
    12
    What exactly do you mean by "varchar"???
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2003
    Posts
    2
    Rep Power
    0
    erm... varchar is the data type in the database...

IMN logo majestic logo threadwatch logo seochat tools logo