It appears that both DATELEAVE and DATEOFLEAVING have some date and some varchar data.
Is their a way I can convert them all to date format before I run the update?
The datatype should be date format but I think some data has been entered as text.
I do not know how to ensure the datatype is correct before running the update?
I have a simple update query:
UPDATE SERVICES.dbo.MASTER
SET DATEOFLEAVING = CONVERT(Char,b.DATELEAVE,103)
FROM SERVICES.dbo.MASTER a JOIN SERVICES.dbo.EXITINTERVIEW b
ON a.STAFFNO = b.STAFFNO
When I run the query I receive the error message:
Server: Msg 242, Level 16, State 3, Line 1
The...
I have a simple update query that runs as a job each evening.The query adds information from the Employee Master table to the Employee Leavers Table:
UPDATE EMPLOYEE.dbo.LEAVERS
SET JOB = JOBTITLE
STARTDATE = CONVERT(Char,b.DATEOFJOIN,103)
FROM EMPLOYEE.dbo.LEAVERS a JOIN EMPLOYEE.dbo.MASTER b...
I have a simple update query that runs as a job each evening.The query adds information from the Employee Master table to the Employee Leavers Table:
UPDATE EMPLOYEE.dbo.LEAVERS
SET JOB = JOBTITLE
STARTDATE = CONVERT(Char,b.DATEOFJOIN,103)
FROM EMPLOYEE.dbo.LEAVERS a JOIN EMPLOYEE.dbo.MASTER b...
My update query records the registration number, make and model of an employees company vehicle on his personnel record from a vehicle register where the switch CURRENT is ='T'(True) However, if the employee surrenders his vehicle for a car allowance I need to clear the vehicle details from the...
I have the following Update query.
UPDATE ELYOSERVICES.dbo.CAREUSAGE a LEFT JOIN VBTGLOBALDATA.dbo.COMPANYCARS b
SET VEHMAKE = MAKE,
VEHMODEL = MODEL,
CONVERT(Char,b.DATESOLD,103)AS LEASEND,
(CASE WHEN b.FUELCARDNUMBER IS NULL THEN 'N' ESLE 'Y')AS FUELCARD,
ON a.REGISTRATION =...
The reports are all the same format but addressed to different companies.
The number of forms differ each day so I can not set up a rigid output command.
I really need a way of allowing the users to print all the reports that are in a specific folder at the end of business each day and then...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.