iI have a table called ''settings''settings
in that therethere are two columns and data like this
settings valuefollowing.
depots 12 projectid 156 client icici bank clientvisits 2 DBname icicibank progress true displayvisits 2 visitsskipped 0
settings value
------- ------
depots 12
projectid 156
client icici bank
clientvisits 2
DBname icicibank
progress true
displayvisits 2
visitsskipped 0
hereHere , the values of rows 'clientvisits'clientvisits
and 'displayvisits'displayvisits
should be same always.
iI want a query which display the only these two fields along with values if theretheir values are differntdifferent.
that That means if clientvisits=2 and displayvisits=4clientvisits=2 and displayvisits=4
then it should throw an error (iI mean it should display the output along with values).
iI tried by using self join like this but it is not working
select * from settings TS,settings TS1 where TS.settings=TS1.settings and CONVERT(integer,ts.value)=1
select * from settings TS,settings TS1 where TS.settings=TS1.settings and ts.setting like 'visitstodisplay'=1
select * from settings TS,settings TS1
where TS.settings=TS1.settings and CONVERT(integer,ts.value)=1
select * from settings TS,settings TS1
where TS.settings=TS1.settings and ts.setting like 'visitstodisplay'=1
also iAlso, I tried to do some thing else but iI didn't get. pleasePlease let me know how to do ASAPit.