J'ai 2 table. Je veux classer l'URL qui est dans la table [Activite_Site] J'ai essayé la question ci-dessous, mais cela ne fonctionne pas ... N'importe qui a l'idée. Nous vous remercions à l'avanceDatalake jointure analytique
Table [Categorie]
URL CAT
http//www.site.com/business B2B
http//www.site.com/office B2B
http//www.site.com/job B2B
http//www.site.com/home B2C
Table [Actvite_Site]
URL
http//www.site.com/business/page2/test.html
http//www.site.com/business/page3/pagetest/tot.html
http//www.site.com/office/all/tot.html
http//www.site.com/home/holiday/paris.html
http//www.site.com/home/private/moncompte.html
I would like OUTPUT :
URL_SITE CATEGORIE
http//www.site.com/business/page2/test.html B2B
http//www.site.com/business/page3/pagetest/tot.html B2B
http//www.site.com/office/all/tot.html B2B
http//www.site.com/home/holiday/paris.html B2C
http//www.site.com/home/private/moncompte.html B2C
http//www.site.com/test/pte.html Null
My query :
SELECT A.URL AS URL_SITE
C.CAT AS CATEGORIE
FROM Actvite_Site as A
LEFT Categorie as C ON C.URL==A.URL.PadLeft(C.URL.Lenght)
Ne fonctionne pas comment? Erreur? Résultat inattendu? – user5226582
Je ne vois pas les erreurs de typo .. ou est-ce le cas? –
Pour simplifier, je corrige ma requête comme ceci: SELECT A.URL AS url_site C.CAT AS DE CATEGORIE Actvite_Site comme A GAUCHE Catégorie C comme ON C.URL == A.URL.PadLeft (10) Erreur \t \t E_CSC_USER_JOINCOLUMNSEXPECTEDONEACHSIDEOFCONDITION: Les expressions A.URL.PadLeft (10) et C.url de chaque côté de la comparaison doivent être des colonnes – FranckSR