syntax error on sql statement #102

Hi Experts

Cannot see what i am doing wrong here...

created_dateonly,
ISDATE(created_dateonly) as (created_date_only) valid
FROM  tbl_part_mi
Where (created_dateonly) is not null
And IsDate(created_dateonly) = 0
route217JuniorAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
SELECT should be at the top of your statement
The second line appears to have two aliases, created_date_only and valid, perhaps you meant..
ISDATE(created_dateonly) as created_date_only
You can lose all the parentheses marks except for isdate(), as they are not needed, as there are no spaces or characters in your column name created_dateonly
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
Also, since you're doing a WHERE ... IsDate(created_dateonly) = 0, you can save yourself from calculating it twice, and have this in the SELECT CLAUSE
0 as created_dateonly

Open in new window

0
route217JuniorAuthor Commented:
Hi ji horn

Pt hanks for the feedback...the select...was an accidental error on my part..
0
route217JuniorAuthor Commented:
So - should do the trick..??

Select

created_dateonly,
ISDATE(created_dateonly) as created_date_only
FROM  tbl_part_mi
Where (created_dateonly) is not null
And IsDate(created_dateonly) = 0
0
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
yep.

Thanks for the grade.  Good luck.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.