pandugadu999 Posted November 11, 2014 Report Posted November 11, 2014 conditional sql using if else blocks ela raayalo seppandi va konchem,,,,,,stored procedures lo dynamic sql asalu artham ayyi savadhu..easy ga artham ayyetattu seppandi va evarina....
loveindia Posted November 11, 2014 Report Posted November 11, 2014 PM me Nuvvu evaru raaja... naaku duplicate aa leka neney neeku duplicate aa..
SwamyRaRa Posted November 11, 2014 Report Posted November 11, 2014 Nuvvu evaru raaja... naaku duplicate aa leka neney neeku duplicate aa.. Gp
loveindia Posted November 11, 2014 Report Posted November 11, 2014 simple man... if(Mustang didn't goku sneha = true) --> Your if condition { he will prove paathivratyam --- Use your sql logic here } else { he will get pisking as usual from db members.... --->if the above statement is not true or doesn't fall in that condition this will happen... if you don't have an else statement it will not do anything. it will look for the above condition, if it's true it will run or else just get to next level of statements... } current topic aitey baaga grasp chestaav ani....
pandugadu999 Posted November 11, 2014 Author Report Posted November 11, 2014 asalu if elsr rayadaniki basic rules emanna unnaya ba.....and how it works if nested blocks are used ...eppudu e statement execute avuthundi ani ela seppochu simple man... if(Mustang didn't goku sneha = true) --> Your if condition { he will prove paathivratyam --- Use your sql logic here } else { he will get pisking as usual from db members.... --->if the above statement is not true or doesn't fall in that condition this will happen... if you don't have an else statement it will not do anything. it will look for the above condition, if it's true it will run or else just get to next level of statements... } current topic aitey baaga grasp chestaav ani....
Suhaas Posted November 11, 2014 Report Posted November 11, 2014 simple ee kada bhayya like all other prog langs IF(CONDITION ) //condition true ayithey BEGIN sql statments here END ELSE //conditon false ayithey BEGIN sql statments here END. nested rayali ante ELSE lo malli inko IF vadali like below IF(CONDITION ) //condition true ayithey BEGIN sql statments here END ELSE //conditon false ayithey BEGIN IF(CONDITION) BEGIN sql statments here END. ELSE BEGIN sql statments here END END I am not sure if you are asking for something else.
Maximus Posted November 11, 2014 Report Posted November 11, 2014 simple man... if(Mustang didn't goku sneha = true) --> Your if condition { he will prove paathivratyam --- Use your sql logic here } else { he will get pisking as usual from db members.... --->if the above statement is not true or doesn't fall in that condition this will happen... if you don't have an else statement it will not do anything. it will look for the above condition, if it's true it will run or else just get to next level of statements... } current topic aitey baaga grasp chestaav ani....
loveindia Posted November 11, 2014 Report Posted November 11, 2014 asalu if elsr rayadaniki basic rules emanna unnaya ba.....and how it works if nested blocks are used ...eppudu e statement execute avuthundi ani ela seppochu baaga amaykudu laaga unnav man... lets say you have 3 customers... you want to update the data based on the input to your procedure. CREATE PROC usp_updatedata (@CountryName VARCHAR(10)) AS BEGIN IF(@CountryName = 'USA') BEGIN UPDATE Customer SET ActiveFlag = 0 WHERE Country = @CountryName END ELSE BEGIN UPDATE Customer SET ActiveFlag = 1 WHERE Country = @CountryName END END If else statements are regularly used and can be used in procs and functions only since views can't handle logics...
spidereddy Posted November 11, 2014 Report Posted November 11, 2014 Ne query post here..dhantlo em mistakes unayo chepoch..detail ga class chepaniki eeda profs evarana u tara
spidereddy Posted November 11, 2014 Report Posted November 11, 2014 baaga amaykudu laaga unnav man... lets say you have 3 customers... you want to update the data based on the input to your procedure. CREATE PROC usp_updatedata (@CountryName VARCHAR(10)) AS BEGIN IF(@CountryName = 'USA') BEGIN UPDATE Customer SET ActiveFlag = 0 WHERE Country = @CountryName END ELSE BEGIN UPDATE Customer SET ActiveFlag = 1 WHERE Country = @CountryName END END If else statements are regularly used and can be used in procs and functions only since views can't handle logics... Good one
Suhaas Posted November 11, 2014 Report Posted November 11, 2014 baaga amaykudu laaga unnav man... lets say you have 3 customers... you want to update the data based on the input to your procedure. CREATE PROC usp_updatedata (@CountryName VARCHAR(10)) AS BEGIN IF(@CountryName = 'USA') BEGIN UPDATE Customer SET ActiveFlag = 0 WHERE Country = @CountryName END ELSE BEGIN UPDATE Customer SET ActiveFlag = 1 WHERE Country = @CountryName END END If else statements are regularly used and can be used in procs and functions only since views can't handle logics... gp. bhayya endi ee madha osthalev. work busy aa? sqlsaga.com lo kuda kotha articles rasthalev
loveindia Posted November 11, 2014 Report Posted November 11, 2014 gp. bhayya endi ee madha osthalev. work busy aa? sqlsaga.com lo kuda kotha articles rasthalev konni kolukoleni debbala madhyalooo irukkupoyaa man... ippudu malli shuru chestunna... india lo unna 4 months.... ippudippudey manishi laa avutunna.... mustang laa eppudu avtaanoooooooo
Suhaas Posted November 11, 2014 Report Posted November 11, 2014 konni kolukoleni debbala madhyalooo irukkupoyaa man... ippudu malli shuru chestunna... india lo unna 4 months.... ippudippudey manishi laa avutunna.... mustang laa eppudu avtaanoooooooo Good to have you back bhayya. Keep up the good work.
loveindia Posted November 11, 2014 Report Posted November 11, 2014 Good to have you back bhayya. Keep up the good work. thanks man... I will reach your expectations...
Recommended Posts