バージョン選択

フォーラム

メニュー

オンライン状況

43 人のユーザが現在オンラインです。 (30 人のユーザが フォーラム を参照しています。)
登録ユーザ: 0
ゲスト: 43
もっと...

サイト内検索

質問 > 管理機能 > 高度な設定SQLについて

管理機能

新規スレッドを追加する

スレッド表示 | 新しいものから 前のトピック | 次のトピック | 下へ
投稿者 スレッド
angie
投稿日時: 2011/8/23 20:42
対応状況: −−−
常連
登録日: 2011/6/10
居住地:
投稿: 46
高度な設定SQLについて
教えてください。
受注データを抽出するCSV出力を作成したいのですが、

'' as お届け先コード
, mp1.pref_name || deliv_addr01 as お届け先住所1
, deliv_addr02 as お届け先住所2
, '' as お届け先住所3
, deliv_name01 || ' ' || deliv_name02 as お届け先名称1
, '' as お届け先名称2
, deliv_tel01 || '-' || deliv_tel02 || '-' || deliv_tel03 as お届け先電話番号
, deliv_zip01 || deliv_zip02 as お届け先郵便番号
, customer_id as 顧客コード
, mp2.pref_name || order_addr01 as ご依頼者住所1
, order_addr02 as ご依頼者住所2
, order_name01 || ' ' || order_name02 as ご依頼者名称1
, '' as ご依頼者名称2
, order_tel01 || '-' || order_tel02 || '-' || order_tel03 as ご依頼者電話番号
, order_zip01 || order_zip02 as ご依頼者郵便番号
from dtb_order , mtb_pref mp1, mtb_pref mp2
where deliv_no is null
and status < 3
and dtb_order.deliv_pref = mp1.pref_id
and dtb_order.order_pref = mp2.pref_id

を実行すると、
[nativecode=ERROR: operator does not exist: text = smallint
LINE 19: and dtb_order.deliv_pref = mp1.pref_id
^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.]
とエラーがでるのですが、
何をどうすればいいのでしょうか?

----------------------------
[EC-CUBE] 2.4.4
[PHP] PHP 5.2.13
[データベース] PostgreSQL 8.4.1
----------------------------
ECCUORE
投稿日時: 2011/8/24 9:23
対応状況: −−−
長老
登録日: 2009/10/22
居住地: 東京
投稿: 248
Re: 高度な設定SQLについて
暗黙の型変換によるエラーです。

カラムの型
deliv_pref text
pref_id int2

dtb_order.deliv_pref = mp1.pref_id

dtb_order.deliv_pref = cast (mp1.pref_id as text)


----------------
EC CUORE 株式会社クオーレ
カスタマイズ御相談下さい。

angie
投稿日時: 2011/8/24 9:58
対応状況: −−−
常連
登録日: 2011/6/10
居住地:
投稿: 46
Re: 高度な設定SQLについて
castをどう書いたらいいのか、よくわかりませんでした。

ご丁寧にありがとうございました。
助かりました。
スレッド表示 | 新しいものから 前のトピック | 次のトピック | トップ


 



ログイン


EC-CUBE公式 Amazon Payプラグイン

統計情報

総メンバー数は89,137名です
総投稿数は110,040件です

投稿数ランキング

1
seasoft
7367
2
468
3217
3
AMUAMU
2712
4
nanasess
2314
5
umebius
2085
6
yuh
1819
7
h_tanaka
1649
8
red
1570
9
mcontact
1298
10
tsuji
958
11
fukap
907
12
shutta
835
13
tao_s
799
14 ramrun 789
15 karin 689
16 sumida 641
17
homan
633
18 DELIGHT 572
19
patapata
502
20
flealog
485


ネットショップの壺

EC-CUBEインテグレートパートナー

Copyright© EC-CUBE CO.,LTD. All Rights Reserved.