How can I insert into db in uppercase

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jsungmin
    New Member
    • Jan 2013
    • 13

    How can I insert into db in uppercase

    hey there.
    really need ur help.. my problem is I want to insert all value into db in uppercase

    this is my code..
    Code:
    <cfquery name="insrt_srvy" datasource="#ds#">
    INSERT INTO SURVEY_HEADER (REF_NO)
    VALUES(<cfqueryparam cfsqltype="cf_sql_varchar" value="#ref_no#">)
    </cfquery>
    before this I put the uppercase around the value..
    like this..
    Code:
    <cfquery name="insrt_srvy" datasource="#ds#">
    INSERT INTO SURVEY_HEADER (REF_NO)
    VALUES(<cfqueryparam cfsqltype="cf_sql_varchar" value=(Upper("#ref_no#"))>)
    </cfquery>
    but I got an error.
    Can anyone help me please..
    thanks in advance :)
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    Try:
    Code:
    value="#upper(ref_no)#"

    Comment

    Working...