2016-12-28 26 views
-2

Oracle 11gをデータベースとして使用しています。 sqldeveloperでselectクエリを実行しようとすると、私はこのエラーを受け取ります:no more data from socket。 私のクエリは次のとおりです。ソケットエラーのデータがありません

select 
first_name, 
last_name, 
to_char(birth_date,'YYYY') as "date", 
state as "ETAT", 
null as "number1", 
null as "number2", 
'R' as "right", 
adresse1 as "adresse 1", 
adresse2 as "adresse 2", 
adresse3 as "adresse 3", 
null as "adresse 4", 
adresse_cp as "cpostal", 
null as "cpostalb", 
null as "num_insee", 
ville as "ville", 
'France' as "pays", 
pieces_nb * mobilier as "cont", 
null as "field1", 
null as "field2", 
null as "field3", 
null as "field4", 
null as "field5", 
substr(type,1,1) as "Typ", 
null as "field6", 
null as "field7", 
null as "field8", 
null as "field9", 
null as "field10", 
pieces as "pieces", 
null as "piecesb", 
null as "surface", 
null as "surfaceb", 
decode(salaire,'0','P','1','C','2','L','3','L') as "type_salaire", 
null as "field11", 
decode(residence_id,'0','P','1','S') as "residence", 
null as "field12", 
null as "Activite", 
to_char(sysdate,'DD/MM/YYYY') as "date_fiche", 

LEFT OUTER JOIN person ASSIS on (id_person = ident) 
LEFT OUTER JOIN address ADDR on (ADDR.ptrsorid = id_adresse and ADDR.adress_id = 'ADDR1**') 
LEFT OUTER JOIN address ADDR2 on (ptrfield = id_adresse and adress_id = 'ADDR2') 
LEFT OUTER JOIN address ADDR3 on (ptrfield = id_adresse and adress_id = 'ADDR3') 
LEFT OUTER JOIN address ADDR on (ptrfield = id_adresse and adress_id = 'ADDR*') 
LEFT OUTER JOIN address ADDR4 on (ptrfield= id_adresse and DDE.adress_id = 'ADDR4**') 
LEFT OUTER JOIN address ADDR5 on (ptrfield = id_adresse and adress_id = 'ADDR5') 
LEFT OUTER JOIN address ADDR6 on (ptrfield = id_adresse and adress_id = 'ADDR6') 
LEFT OUTER JOIN address ADDR7 on (ptrfield = id_adresse and adress_id = 'ADDR7') 
LEFT OUTER JOIN address ADDR8 on (ptrfield = id_adresse and adress_id = 'ADDR8') 
LEFT OUTER JOIN address ADDR9 on (ptrfield = id_adresse and adress_id = 'ADDR9') 
LEFT OUTER JOIN address ADDR10 on (ptrfield = id_adresse and adress_id = 'ADDR10') 
LEFT OUTER JOIN address ADDR11 on (ptrfield = id_adresse and adress_id = 'ADDR11') 
LEFT OUTER JOIN address ADDR12 on (ptrfield = id_adresse and adress_id = 'ADDR12') 
LEFT OUTER JOIN address ADDR13 on (ptrfield = ident and adress_id = 'ADDR13') 
LEFT OUTER JOIN address ADDR14 on (ptrfield = ident and adress_id = 'ADDR14***') 
LEFT OUTER JOIN address ADDR15 on (ptrfield = ident and adress_id = 'ADDR15') 

where hab_ptrfield = ident 
and ptrpolid = id_person 
and person_pass_id = pas_id 
and ptr_id_adresse = 0 
and pas_adress_id_work = 'OK' 
and ADDR9.sousc = 'YS' 
and ADDR9.adress_id = 'R' 
and adress_id_societe = 'M' 
and to_char(pol_datbirth,'YYYYMMDD') < '20161201' 
order by person_id; 

私はto_char(sysdate,'DD/MM/YYYY') as "date_fiche",を文字列「NULL」に選択クエリにnull値を変更し、コメントすると、私は期待された結果を取得します。 このエラーの解決方法を教えてください。フィールドのタイプに関連していますか?

+5

可能な重複すなわち

(http://stackoverflow.com/questions/7839907/no-more-data-to-read-from-socket -error) –

+0

私は100%Googleで答えを見つけることができます。これは怠惰です。 – dfundako

+0

与えられた解決策のどれも私のために働かない。 –

答えて

1

nullは問題ではないと思われますが、あなたはoracleデータ型の日付に設定してエイリアスを設定しています。それをbdateなどに変更します。 [ソケットエラーから読み取るためにこれ以上データ]の

to_char(birth_date,'YYYY') as "bdate", 
関連する問題