i want to know query for sql to compare two table values whether it is greater or equal to for that two values.
My table name is VPRC_60 and VPRC_13
VPRC_60.YYYYMM1>=VPRC_13.YYYY2
my values VPRC_60.YYYYMM=200601 and VPRC_13.YYYY=2005
Pls send me soon as possible
Thanks&Regs
Manavalan
Loading
Jignesh TrivediPosted Jan 11, 2012, 11:13 PM
I have one que.
What is is relation between these two table VPRC_60 and VPRC_13
also try
select case when VPRC_60.YYYYMM=200601 >= VPRC_13.YYYY=2005
1 else 0 end as RetValue
from VPRC_60 a
join VPRC_13 b on a.Rel1 = b.Rel1
hope this help.
Chintan RathodPosted Jan 11, 2012, 9:55 AM
Syntax:
SUBSTRING ( value_expression , start_expression , length_expression )
Example:
SUBSTRING(FirstName, 1, 1)
will display first character of "firstname" so you can use this as per your need.
Thank you.