CodePhiliaX / Chat2DB

🔥🔥🔥AI-driven database tool and SQL client, The hottest GUI client, supporting MySQL, Oracle, PostgreSQL, DB2, SQL Server, DB2, SQLite, H2, ClickHouse, and more.
http://chat2db.ai
Apache License 2.0
15.12k stars 1.69k forks source link

Optimization: EXTRACT function display #1189

Open Yuanj-11 opened 7 months ago

Yuanj-11 commented 7 months ago

1709167378563

It should return an integer type.

Yuanj-11 commented 7 months ago

EXTRACT(MONTH FROM T2.CREATE_TIME) AS MONTH

openai0229 commented 7 months ago

What is your database type

Yuanj-11 commented 7 months ago

pgsql

openai0229 commented 7 months ago

Okay, I'll test it now

openai0229 commented 7 months ago

image There seems to be no problem with my testing here. Can you provide your table structure

Yuanj-11 commented 7 months ago

what 's your version?

openai0229 commented 7 months ago

3.1.19

Yuanj-11 commented 7 months ago

wait,I'll update it

openai0229 commented 7 months ago

ok

Yuanj-11 commented 7 months ago

no,still not return integer type.

openai0229 commented 7 months ago

Can you provide table structure?

Yuanj-11 commented 7 months ago

here is it. CREATE TABLE t_wms_outstock_doc ( receive_doc character varying(50) null, finish_time timestamp without time zone null, doc_no character varying(50) null, doc_type character varying(50) null, dispatch_sn character varying(50) null, doc_status character varying(255) null, outstock_date timestamp without time zone null, light_flag character varying(10) DEFAULT 'N'::character varying null, data_auth_out character varying(33) null, id character varying(40) not null, dept_id character varying(40) null, create_user character varying(40) null, create_time timestamp without time zone null, edit_user character varying(40) null, edit_time timestamp without time zone null, data_auth character varying(40) null, plan_outstock_date timestamp without time zone null, close_emp character varying(33) null, close_reason character varying(500) null, is_urgent character varying(1) null, is_upload_erp character varying(1) null, memo character varying(500) null, close_time timestamp without time zone null, area_sn character varying(20) null, doc_source character varying(1) null, is_release character varying(1) null, pick_doc_type character varying(255) null, pick_doc_attr character varying(255) null, supplier_id character varying(255) null, cust_id character varying(255) null, data_version numeric DEFAULT '0'::numeric null, cost_center character varying(40) null, expense_type character varying(100) null, ascription_type character varying(100) null, interior_orders character varying(40) null, sap_doc_no character varying(50) null, data_sources character varying(10) null, connect_no character varying(255) null, process_order_id character varying(40) null, upload_erp_status character varying(2) null, del_flag character varying(5) null, cost_item_text character varying(4) null, project_base_id character varying(40) null, use_dept character varying(50) null, sap_create_user character varying(50) null, sap_create_time timestamp without time zone null, duty_user character varying(40) null, duty_dept character varying(40) null, other_outstock_item character varying(50) null, internal_transfer_order character varying(255) null, wbs_id character varying(40) null, CONSTRAINT t_wms_outstock_doc_pkey PRIMARY KEY (id) );

openai0229 commented 7 months ago

Okay, I'll test it later

Yuanj-11 commented 7 months ago

thankyou.

openai0229 commented 7 months ago

image It seems like there's still no problem

Yuanj-11 commented 7 months ago

emm,so strange…

openai0229 commented 7 months ago

What is the version of your database driver image

Yuanj-11 commented 7 months ago

same as you. But when I export the data, it is an integer image