创建Oracle自定义视图,通过URL传递参数,数字参数工作,alpha不

时间:2014-12-31 16:05:12

标签: sql xml oracle url parameter-passing

我将首先说我是新手。我正在尝试在Oracle中创建自定义视图。我将参数从我的html文件传递给xml。如果参数是数字,一切正常。如果参数是alpha,则不会返回任何数据。我已经将选择数据硬编码到SQL中,并且我返回了数据,因此我知道数据存在。

在HTML文件中:

<SCRIPT TYPE="text/javascript">
    function resize()
    {
        window.moveTo(0,100);
        top.window.resizeTo(960, 500);
    }

    function processSubmit()
    {


             var idssn = document.form1.idssn.value;

    if(idssn != "")
    {
        var mainURL = "";
        var viewName = "PTIN";

        mainURL = "Web-ASPX/" + viewName + ".aspx" + "?ID1=" +  idssn;
    window.open(mainURL,"newpage",'width=960,height=700,left=0,top=100,screenX=0,screenY=100,resizable=yes,scrollbars=yes,toolbar=yes,status=yes,menubar=yes');

在XML文件中:

<control controlID="PTIN" type="WEBGRID">
    <hiddenFields>          
        <fieldName>NUM</fieldName>
    </hiddenFields>

    <SQL>
        <query> 

            SELECT  
                p.ssn as "SSN",
                p.ptin as "PTIN",
                p.ptin_issuance_date as "PTIN_ISSUANCE_DATE",
                p.ptin_status as "PTIN_STATUS",
                p.last_name as "LAST_NAME"
            FROM its_preparer_tin p
            where p.ssn = trim(' ? ')                                                         

         </query>

        <condition></condition>
        <parameterContext index="1">
                <parameterName>ID1</parameterName>
        </parameterContext>


    </SQL>

0 个答案:

没有答案