Information générale
Forum:
Microsoft SQL Server
>I am having trouble with one of my stored procedures that is supposed to grab all of the OGC's from within one of my tables. All of the OGC ID's are between 10000 and 29999. I have tried using the between clause and I have also tried just saying select all from that table, but they have both not worked. Here is the snippet of the code that I am having trouble with:
>
>Else If @UserType='CSR' OR @UserType = 'ADMIN'
> /* Grab all of the OGC's*/
> select distinct * from OGC
> WHERE OGC.OGCID = 1
> order by businessname,lastname,firstname
>
>
>Thanks
If all of the ID's are between 10K and 30K why do you add WHERE id=1? This would not return any rows.
Is there an error message?
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement