Answered
updating one field with another (which contains a time stamp)
hi there
i am trying to acomplish what i thought was a simple task of updating one field in my db using the contents of another
in my tbl_profiles i have:
key | penSignedIn | lastSignedIn
73 | | 2006-05-19 21:14:56.0
I am trying to update my table so the tbl_profiles.penSignedIn field is populated with the contents of tbl_profiles.lastSignedIn
<cfquery datasource="nya">
UPDATE tbl_profiles
SET PenSignedIn = #rs_user.lastSignedIn#
WHERE profileID = 73
</cfquery>
i am getting this CF error "Syntax error (missing operator) in query expression '2006-05-19 21:14:56.0'. "
and CF says "SQL : UPDATE tbl_profiles SET PenSignedIn = 2006-05-19 21:14:56.0 WHERE profileID = 73 "
which looks ok to me!! i've tied various different formats such as
SET PenSignedIn = {ts '#MM_rsUser.lastSignedIn#'}
SET PenSignedIn = #MM_rsUser.lastSignedIn#
SET PenSignedIn = '#MM_rsUser.lastSignedIn#'
but none seem to work which is driving me up the wall!!
- can anyone please point me in the right direction
please
thank you very much indeed.
I have CF7 and Access database
i am trying to acomplish what i thought was a simple task of updating one field in my db using the contents of another
in my tbl_profiles i have:
key | penSignedIn | lastSignedIn
73 | | 2006-05-19 21:14:56.0
I am trying to update my table so the tbl_profiles.penSignedIn field is populated with the contents of tbl_profiles.lastSignedIn
<cfquery datasource="nya">
UPDATE tbl_profiles
SET PenSignedIn = #rs_user.lastSignedIn#
WHERE profileID = 73
</cfquery>
i am getting this CF error "Syntax error (missing operator) in query expression '2006-05-19 21:14:56.0'. "
and CF says "SQL : UPDATE tbl_profiles SET PenSignedIn = 2006-05-19 21:14:56.0 WHERE profileID = 73 "
which looks ok to me!! i've tied various different formats such as
SET PenSignedIn = {ts '#MM_rsUser.lastSignedIn#'}
SET PenSignedIn = #MM_rsUser.lastSignedIn#
SET PenSignedIn = '#MM_rsUser.lastSignedIn#'
but none seem to work which is driving me up the wall!!
thank you very much indeed.
I have CF7 and Access database
