Visualizzazione dei risultati da 1 a 2 su 2
  1. #1

    Problemi di select ASC/DESC

    Allora ho una select di questo tipo

    sottocat.source="SELECT * FROM Sottocategorie where IDCat="&categorie("IDCat")

    La ordino in a/z in questo modo

    sottocat.source="SELECT FROM Sottocategorie ORDER BY NomeSottCat DESC where IDCat="&categorie("IDCat")

    Ottengo questo errore

    Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
    [Microsoft][ODBC Microsoft Access Driver] The SELECT statement includes a reserved word or an argument name that is misspelled or missing, or the punctuation is incorrect.

    /Default.asp, line 68

    Al rigo 68 ho questo > : sottocat.open()

    Cerco di essere + preciso

    Nel data-base ho due tabelle Categorie e sottocategorie relazionate tra loro grazie al campo

    chiave "IDCat"

    Io dovrei ordinare per "NomeSottCat" che è uno dei campi presenti nella tabella sottocategorie

    Ho provato anche con:

    sottocat.source="SELECT FROM Sottocategorie ORDER BY NomeCat DESC where IDCat="&categorie("IDCat")


    "NomeCat" è un campo presente nella tabella Categorie


    Nada sempre errore - un aiutino?

  2. #2

    Altra soluzione

    Ho provato anche con:

    SELECT Sottocategorie.NomeSottCat FROM Sottocategorie ORDER BY ASC where IDCat="&categorie("IDCat")

    nada


    SELECT Categorie.NomeCat FROM Categorie ORDER BY ASC INNER JOIN Sottocategorie ON Categorie.IDCat = Sottocategorie.IDCat;

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.