Title: Message
That wouldnt work as it would be looking for something with the @ in it
 
You may have to do something like this
 
SELECT  distinct(acct_code)
FROM        coarext
WHERE     cmpy_code = '01'
AND           (
                resp_e_mail like '#request.session.user.username#,'
                OR
                resp_e_mail like ',#request.session.user.username#,'
                OR
                resp_e_mail like ',#request.session.user.username#'
                OR
                resp_e_mail like '#request.session.user.username#'
                )
 
This way you catch
    brownej
    ,brownej,
    ,brownej
    brownej,
 
This is why I dont use lists in my database is I need to be able to check or reference a certain value in the column.  Use lookup tables
 
Steve
 
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of WALTERS Scott
Sent: Tuesday, June 03, 2003 4:33 PM
To: CFAussie Mailing List
Subject: [cfaussie] RE: SQL help required

Just put the @ symbol in there too. ie:
 
AND resp_e_mail like '%#request.session.user.username#@%'
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 3 June 2003 4:26 PM
To: CFAussie Mailing List
Subject: [cfaussie] SQL help required

Hi,
 
I have a query like so:
 
SELECT  distinct(acct_code)
FROM  coarext
WHERE cmpy_code = '01'
AND resp_e_mail like '%#request.session.user.username#%'
 
values in the resp_e_mail field might include something like this:
 
cliftosg
 
or this:
 
cliftosg,brownej,smithjh
 
the value of #request.session.user.username# is always a single username like "cliftosg".
 
the problem with my query above is that the username "browne" and the username "brownej" will be selected in the statement if the value of resp_e_mail is "cliftosg,brownej,smithjh".
 
how can i amend the SQL statement to take this into account? i need to use listfind() or something but am unsure in SQL.
 
thanks.... steve
 
 
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/

IMPORTANT NOTICE:

This e-mail and any attachment to it is intended only to be read or used by the named addressee. It is confidential and may contain legally privileged information. No confidentiality or privilege is waived or lost by any mistaken transmission to you. If you receive this e-mail in error, please immediately delete it from your system and notify the sender. You must not disclose, copy or use any part of this e-mail if you are not the intended recipient. The RTA is not responsible for any unauthorised alterations to this e-mail or attachment to it.

---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/

Reply via email to