Link to home
Start Free TrialLog in
Avatar of Member_2_6478753
Member_2_6478753Flag for United States of America

asked on

tsql computed function not responding with huge record

i have create new column and i have add this function

CASE DATEPART(WEEKDAY,datetimein)  WHEN 1 THEN 'SU' WHEN 2 THEN 'MO' WHEN 3 THEN 'TU' WHEN 4 THEN 'WE' WHEN 5 THEN 'TH' WHEN 6 THEN 'FR' WHEN 7 THEN 'SA' END 

Open in new window


and i got this message

- Unable to modify table.   Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.

every time i get new record on this table who i can solve it ?
ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Member_2_6478753

ASKER

your function is better but the problem when i putted as computed column give same problem :S UPPER(left(datename(WEEKDAY, datetimein),2))
did you try to save the change script, and run it from T-SQL windows instead from table's design view?
THANK YOU :d