Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Finding the incorrect value

Author  Topic 

rcr69er
Constraint Violating Yak Guru

327 Posts

Posted - 2008-10-03 : 07:56:52
Hi

I am using a more complex version of the following query

INSERT INTO Table2
(
DateProduced
)

SELECT PublicationDate FROM Table1

The DateProduced field is set to DATETIME, however one of the values from Table 1 is failing to enter, as there are over 1000 records, is there an easy way to find what record(s) are giving me the problem?

Thanks

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-10-03 : 08:18:10
yup just use this to find incorrect values

SELECT PublicationDate FROM Table1 WHERE ISDATE(PublicationDate)=0
Go to Top of Page
   

- Advertisement -