Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Stored Procedure Trouble
Message
From
20/12/2001 18:11:20
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00596982
Message ID:
00597077
Views:
32
>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?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform