I just noticed your second reply . . . I assumed "#messagesenderuserid#" was
already defined.  Leave out the line    -- and  u.UserID =
'#MessageSenderUserID#' -- in the SQL I sent to the list.

Dan

-----Original Message-----
From: Kevin Schmidt [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 02, 2000 8:07 AM
To: CF-Talk
Subject: SQL Question


This is a multi-part message in MIME format.

------=_NextPart_000_000A_01C044B4.AD1069F0
Content-Type: text/plain;
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Gotta question.  This is my lack of advanced SQL knowledge making itself =
known.

Here is the query:
<CFQUERY NAME=3D"retrievemessages" DATASOURCE=3D"#dsn#">
SELECT MessageID, MessageSenderUserID, MessageDate, MessageSubject, =
MessageMessage, MessageRead, MessageRepliedTo, MessageUrgent, UserName
FROM Message, UserInfo
WHERE MessageRecipientUserID =3D '#session.UserID#' AND



I need the value below to be the current value of the query.  Basicalyl =
I have selected the messagesenderuserid and I need to pull that persons =
name from the UserInfo table by that ID.

UserID =3D '#MessageSenderUserID#'
</CFQUERY>

Thanks for the help!

Kevin

------=_NextPart_000_000A_01C044B4.AD1069F0
Content-Type: text/html;
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2920.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Gotta question.&nbsp; This is my lack =
of advanced=20
SQL knowledge making itself known.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Here is the query:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&lt;CFQUERY NAME=3D"retrievemessages"=20
DATASOURCE=3D"#dsn#"&gt;<BR>SELECT MessageID, MessageSenderUserID, =
MessageDate,=20
MessageSubject, MessageMessage, MessageRead, MessageRepliedTo, =
MessageUrgent,=20
UserName<BR>FROM Message, UserInfo<BR>WHERE MessageRecipientUserID =3D=20
'#session.UserID#' AND<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I need the value below to be the =
current value of=20
the query.&nbsp; Basicalyl I have selected the messagesenderuserid and I =
need to=20
pull that persons name from the UserInfo table by that ID.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>UserID =3D=20
'#MessageSenderUserID#'<BR>&lt;/CFQUERY&gt;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thanks for the help!</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Kevin</FONT></DIV></BODY></HTML>

------=_NextPart_000_000A_01C044B4.AD1069F0--

----------------------------------------------------------------------------
--------------------
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a
message with 'unsubscribe' in the body to [EMAIL PROTECTED]


The information contained in this message is privileged and confidential.  It is 
intended solely for the use of the named recipient.  If you are not the intended 
recipient, you are hereby notified that any disclosure, copying, distribution, or use 
of the contents of this transmission is strictly prohibited.  If you receive this 
message in error, please notify the sender immediately.  Thank you.
------------------------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]

Reply via email to