Nick Baker wrote:
>
> <cfquery name = "Query1" dataSource = "MasterData">
> SELECT *
> FROM  Table1
> Where  Assignment CONTAINS 5
> </cfquery>

You mean where the Assignment field contains the number 5 but may
contain other stuff?  If it's a string, use the LIKE clause

WHERE Assignment LIKE '%5%'

(You may have to substitude * for % with Access, not sure.

Of course, that would also return 15, 50, etc... If you're storing a
comma separated list you could do something like this:

WHERE Assignment LIKE '5,%' OR Assignment like '%,5' OR Assignment LIKE
'%,5,%' OR Assignment='5'

But god help you if yu're doing that... if that were the case I'd say
you need a better database design ;)

   - Rick
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to