2015-04-05 9 views
1

У меня есть переменная int, содержащая значение, например. 31012015, но я попытался отобрать до даты формат eg до dd-mm-yyyy. Часть моего запроса:Как преобразовать целое число в дату Postgres dblink

select * from dblink(
    'dbname=dbexample port=5432 host=127.0.0.1 user=postgres password=root', 
    'select * from tableexample where fconclusion between 2014-01-02 and 2014-12-31') 
as k(
    id_principal integer, 
    nestrategia smallint, 
    ctitulo character varying(300), 
    factivacion date, 
    nestado smallint, 
    fcreacion timestamp without time zone, 
    id_usuario integer, 
    nstatus smallint, 
    nmunicipio smallint, 
    nactividad smallint, 
    fconclusion date, 
    id_personal integer, 
    nactivo smallint, 
    fmodificacion date, 
    nconclusion smallint 
) 

PgAdmin показать следующую ошибку:

ERROR: operator does not exist: date> = integer HINT: No operator matches the name and type of arguments. You may need to add explicit type conversions. CONTEXT: Error Occurred on dblink connection named "unnamed": could not execute query.

Может кто-нибудь мне помочь?

ответ

Смежные вопросы