select A_NM || '----' || B_NM
  from (select distinct a.sttn_nm a_nm, b.sttn_nm b_nm
          from tb_sttn a, tb_sttn b
         where a.sttn_id < b.sttn_id)这条SQL语句查询后在界面上显示的是 A_NM--/--/B_NM,不知道怎么解决,而希望出现的是A_NM----B_NM, 不清楚'/'是怎么出来的,怎么去掉? 谢谢啦

解决方案 »

  1.   

    不会吧..数据库自作主张
    SQL> with tb_sttn as(
      2    select rownum sttn_id,rownum||rownum sttn_nm from dual
      3    connect by rownum<10)
      4  select A_NM || '----' || B_NM
      5    from (select distinct a.sttn_nm a_nm, b.sttn_nm b_nm
      6            from tb_sttn a, tb_sttn b
      7          where a.sttn_id < b.sttn_id)
      8  ;
     
    A_NM||'----'||B_NM
    --------------------------------------------------------------------------------
    11----44
    22----55
    33----55
    11----22
    11----66
    22----33
    22----44
    44----55
    88----99
    44----77
    44----99
    11----88
    55----66
    66----88
    11----33
    44----88
    55----88
    22----88
    11----55
    11----77
     
    A_NM||'----'||B_NM
    --------------------------------------------------------------------------------
    11----99
    22----66
    22----77
    33----66
    33----77
    55----77
    66----77
    77----88
    77----99
    22----99
    33----44
    33----88
    33----99
    44----66
    55----99
    66----99
     
    36 rows selected
      

  2.   

    --这样试试:
    select distinct a.sttn_nm||'----'||b.sttn_nm
    from tb_sttn a join tb_sttn b on a.sttn_id<b.sttn_id
      

  3.   

    就是现在这种效果 A_NM 是前面的名字, B_NM是后面的名字
      

  4.   

    图片看不了..
    传到csdn空间相册里,然后再链接
      

  5.   

    就是这样的截图:东海路-/--市民广场
    市民广场-/--小东庄前面是A_NM,后面是B_NM
      

  6.   

    <?xml version="1.0" encoding="UTF-8" ?> 
     <wsdl:definitions targetNamespace="http://huawei.com" xmlns:tns="http://huawei.com" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc11="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soapenc12="http://www.w3.org/2003/05/soap-encoding" xmlns:soap11="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
    <wsdl:types>
     <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://huawei.com">
    <xsd:element name="example">
     <xsd:complexType>
    <xsd:sequence>
      <xsd:element maxOccurs="1" minOccurs="1" name="in0" nillable="true" type="xsd:string" /> 
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
     <xsd:element name="exampleResponse">
    <xsd:complexType>
     <xsd:sequence>
      <xsd:element maxOccurs="1" minOccurs="1" name="out" nillable="true" type="xsd:string" /> 
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      </xsd:schema>
      </wsdl:types>
     <wsdl:message name="exampleRequest">
      <wsdl:part name="parameters" element="tns:example" /> 
      </wsdl:message>
    <wsdl:message name="exampleResponse">
      <wsdl:part name="parameters" element="tns:exampleResponse" /> 
      </wsdl:message>
     <wsdl:portType name="HelloWorldPortType">
     <wsdl:operation name="example">
      <wsdl:input name="exampleRequest" message="tns:exampleRequest" /> 
      <wsdl:output name="exampleResponse" message="tns:exampleResponse" /> 
      </wsdl:operation>
      </wsdl:portType>
     <wsdl:binding name="HelloWorldHttpBinding" type="tns:HelloWorldPortType">
      <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> 
     <wsdl:operation name="example">
      <wsdlsoap:operation soapAction="" /> 
     <wsdl:input name="exampleRequest">
      <wsdlsoap:body use="literal" /> 
      </wsdl:input>
     <wsdl:output name="exampleResponse">
      <wsdlsoap:body use="literal" /> 
      </wsdl:output>
      </wsdl:operation>
      </wsdl:binding>
     <wsdl:service name="HelloWorld">
     <wsdl:port name="HelloWorldHttpPort" binding="tns:HelloWorldHttpBinding">
      <wsdlsoap:address location="http://localhost:8080/HelloWorldService/services/HelloWorld" /> 
      </wsdl:port>
      </wsdl:service>
      </wsdl:definitions>
      

  7.   

    不好意思,弄错了,大家sorry啊~~
      

  8.   

    varchar2(128)  显示出错的那一列是居中对齐的
      

  9.   


    感觉不像是Oracle干的,你这里界面上显示,这个界面是什么界面,是不是界面捣的鬼,嫁祸给Oracle了呀
      

  10.   

    应该是界面端的问题 但是找不到原因 用的是Infragistics的Grid控件
      

  11.   

    select A||'xxx'||B from xxx