Visualizzazione dei risultati da 1 a 2 su 2
  1. #1
    Utente di HTML.it
    Registrato dal
    Jan 2007
    Messaggi
    655

    how to join integer serial

    ciao a tutti, sto usando un database postgres ho la necessità di fare un jon tra un integer ed un serial.

    Non posso modificare le tabelle però.

    Sapreste dirmi se c'è un modo per fare questo tipo di query ??

    Per adesso ho sempre l'errore :
    codice:
    operator does not exist: integer = f_version
    HINT:  No operator matches the given name and argument type(s). You may need to add explicit type casts.

  2. #2
    Utente di HTML.it L'avatar di Joe Taras
    Registrato dal
    Nov 2003
    residenza
    Taranto
    Messaggi
    955

    Re: how to join integer serial

    Originariamente inviato da melmar20
    ciao a tutti, sto usando un database postgres ho la necessità di fare un jon tra un integer ed un serial.

    Non posso modificare le tabelle però.

    Sapreste dirmi se c'è un modo per fare questo tipo di query ??

    Per adesso ho sempre l'errore :
    codice:
    operator does not exist: integer = f_version
    HINT:  No operator matches the given name and argument type(s). You may need to add explicit type casts.
    Usando la funzione CAST potresti castare l'integer in serial o viceversa, quindi la tua JOIN dovrebbe diventare a livello di clausola ON
    CAST(tabella1.campoInteger as serial) = tabella2.campoSerial

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.