Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

how can i work with getdate() in my query if i have a varchar datatype on where clause column ?

$
0
0

Hi All,

I have a column like lastdate with varchar datatype. now I want to work with lastdate column in where clause with getdate().

Ex:  wheregetdate()  -  lastdate < 1

when I use above one I got error likeError = Conversion failed when converting date and/or
time from character string.

I knew the datatypes for lastdate and getdate() are different...

how can I use...

Thanks,


rup


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>