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
 General SQL Server Forums
 New to SQL Server Programming
 how to check the foramt

Author  Topic 

sqldev6363
Yak Posting Veteran

54 Posts

Posted - 2011-11-16 : 14:35:28
I have a table which consists of some 50 fields. in that some are numeric and some are date fieds.Every i will insert new values into that table. what my request is while inserting the values i will be getting some integer values in date field and in numeric i will be getting some blank values...

i need a query first to find the which field is date field and which field is numeric and then need to check the format of each field whether the field gets the correct data in date and in numeric not blanks..i need to generate the report by checking like this.

need to check in date field whether the values are in date foramt or not and in numeric are we getting any blank values.

can any one help me in this, thanks in advance

dev

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-11-17 : 00:25:36
for checking blank values for numeric its staright forward
but for date checking is source data in varchar format? if yes you need to determine what all formats date can come ie yyyymmdd,dd/mm/yyyy,mm/dd/yyyy etc and then add required logic for checkin them

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

sqldev6363
Yak Posting Veteran

54 Posts

Posted - 2011-11-17 : 11:09:10
Thanks

quote:
Originally posted by visakh16

for checking blank values for numeric its staright forward
but for date checking is source data in varchar format? if yes you need to determine what all formats date can come ie yyyymmdd,dd/mm/yyyy,mm/dd/yyyy etc and then add required logic for checkin them

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/





dev
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-11-17 : 11:10:31
np

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -