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.
Author |
Topic |
Jamalo
Starting Member
6 Posts |
Posted - 2010-08-10 : 09:58:30
|
Hello, I have a problem to define that date in my query.I want to check TABLE A there the date should be in date-format ddmmyyyy and it should check that the date is not in future. it should check the date with current or system date.I use this quesry but it gives me just the date format;SELECT *FROM public."TABLE_A" AS tWhere (to_date(t."DATE", 'ddmmyyyy') < to_date('01011980','ddmmyyyy'));Please help me with this |
|
vaibhavktiwari83
Aged Yak Warrior
843 Posts |
Posted - 2010-08-10 : 10:32:07
|
Are you using SQL SERVER ?Above Statement is not looking SQL SERVER Statement.Vaibhav TTo walk FAST walk ALONE To walk FAR walk TOGETHER |
 |
|
Jamalo
Starting Member
6 Posts |
Posted - 2010-08-10 : 10:36:57
|
This is PostgreSql :)quote: Originally posted by vaibhavktiwari83 Are you using SQL SERVER ?Above Statement is not looking SQL SERVER Statement.Vaibhav TTo walk FAST walk ALONE To walk FAR walk TOGETHER
|
 |
|
vaibhavktiwari83
Aged Yak Warrior
843 Posts |
Posted - 2010-08-10 : 10:38:43
|
So I think you should post your question in PostgreSql forum to get quick and correct answers.Vaibhav TTo walk FAST walk ALONE To walk FAR walk TOGETHER |
 |
|
Jamalo
Starting Member
6 Posts |
Posted - 2010-08-10 : 10:43:03
|
but how would you make query in Sql server for the same question then? |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-08-10 : 10:55:16
|
SELECT *FROM public.TABLE_A AS tWhere (right(DATE,4)+substring(DATE,3,2)+left(DATE,2) < getdate())MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|