Avatar of erikTsomik
erikTsomik
Flag for United States of America asked on

modify cfdquery

I have the query which work just fine. Now i was told to add 1 more column into the table to record first time login. So if the first time login is blank then put current date, if not empty then do nothing . How can i achive this

<cfquery name="putLoggedIn" datasource="cfelsunrise" dbtype="ODBC">		<!--- Update Employee's records --->
		update Employee
			set LastLoginDate = GetDate(),
             FirstLOginDate=<cfif FirstLoginDate eq ''>=GetDate()</cfif>
		where EmployeeID = #session.EmpID#
	</cfquery>

Open in new window

DatabasesWeb ServersSQL

Avatar of undefined
Last Comment
JesterToo

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
JesterToo

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
JesterToo

I would appreciate it if you would explain why you decided this answer merited a grade of "B".
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy