Note that there are some explanatory texts on larger screens.

plurals
  1. POProblem with INNER JOIN in a VIEW
    primarykey
    data
    text
    <p>I need a view that Show each Location(including prénom_Nom, numéro_Teléphone, niv,no_Modèle, année) and all Paiements. Finally order by id_Location. </p> <p>I try this but its not Work</p> <pre><code>CREATE View On_locations_Clients_Paiements AS SelectClients.prénom_Nom,Clients.numéro_Teléphone,Véhicules.niv,Véhicules.no_Modèle, Véhicules.année,Paiements.montant FROM Location INNER JOIN Location ON Clients.id_Client=Location.id_Client INNER JOIN Véhicules ON Location.niv=Véhicules.niv INNER JOIN Modèle ON Véhicules.no_Modèle=Modèle.no_Modèle INNER JOIN Paiements ON Location.id_Location = Paiements.id_Location --ORDER BY where id_Location = id_Location </code></pre> <p>This is the select (I'm not sure if its right)</p> <pre><code>CREATE View On_locations_Clients_Paiements AS Select Clients.prénom_Nom,Clients.numéro_Teléphone,Véhicules.niv,Véhicules.no_Modèle,Véhicules.année,Paiements.montant </code></pre> <p>Those are my tables</p> <pre><code>CREATE TABLE [dbo].[Location]( PK[id_Location] [char](6) NOT NULL, [debut_Location] [datetime] NULL, [premier_Paiement] [datetime] NULL, [paiment_Mensuel] [smallmoney] NULL, [nombre_Mensualité] [char](2) NULL, FK[id_Client] [char](6) NULL, [no_Termes_location] [char](6) NULL, FK[niv] [char](20) NULL, CREATE TABLE [dbo].[Clients]( PK[id_Client] [char](6) NOT NULL, [prénom_Nom] [varchar](50) NULL, [adresse] [varchar](50) NULL, [ville] [varchar](20) NULL, [province] [varchar](20) NULL, [code_Postal] [char](6) NULL, [numéro_Teléphone] [numeric](10, 0) NULL, CREATE TABLE [dbo].[Véhicules]( PK[niv] [char](20) NOT NULL, [no_Modèle] [char](6) NULL, [année] [char](4) NULL, [kilométrage] [int] NULL, [location_Antérieure] [char](3) NULL, [valeur] [smallmoney] NULL, [tranmission_Automatique] [char](3) NULL, [airClimatise] [char](3) NULL, [antiDemarreur] [char](3) NULL, [no_Couleur] [char](6) NULL, CREATE TABLE [dbo].[Paiements]( PK[id_paiement] [char](6) NOT NULL, [date] [smalldatetime] NULL, [montant] [smallmoney] NULL, FK[id_Location] [char](6) NOT NULL, </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload