Jump to content

Triggers & Store Procedures Testing


Recommended Posts

Posted

define a parameter debug_fl bit =0


if debug_fl=1

write data so when u test u can pass parameters and pass debug_fl=1 which will print the data

mayya konchem layman terms lo explain sey plz :(
  • Replies 54
  • Created
  • Last Reply

Top Posters In This Topic

  • king420

    19

  • ipaddress0

    12

  • loveindia

    7

  • VenkatD

    6

Top Posters In This Topic

Posted

mayaa nuvvu confusse avuthunavu .. SP and triggers ni kalapakunda okasari google chesi chudu .. u get an idea

thanks mayya... normally sp create sesi vatini trigger dwara invoke seathara?

 

Posted

mayaa nuvvu confusse avuthunavu .. SP and triggers ni kalapakunda okasari google chesi chudu .. u get an idea

ok mayya ippude sustha
Posted

sarvanasam esukoni pothav ra...sarvanasam esukoni pothav ra...

emaindi mayya...ninn evvar em annar :(
Posted

mayya konchem layman terms lo explain sey plz :(

neeku stored proc ne test cheyyalante  query analyzer lo oka option untadhi just plugin the parameters and it will display the results but in realtime scenarios.......ur stored proc will be like 2000-4000 lines alantappudu expected results ravalante every data manipulation (updates) and deletes and select(ateast important vi) capture cheyyali..so daani kosam nee proc defintion lo paramters untayi kadha add extra param named debug_fl ..idhi bit value and default 0 pettu 

 

so when u want to see important updates and deletes

 

write code in ur sp like 

 

if @debug_fl=1

select @value1 as 'current value'

 

 

if @debug_fl=1

select 'deleting emp data'

select @@rowcount as 'rowsdeleted'

 

 

hope u understood

Posted

neeku stored proc ne test cheyyalante query analyzer lo oka option untadhi just plugin the parameters and it will display the results but in realtime scenarios.......ur stored proc will be like 2000-4000 lines alantappudu expected results ravalante every data manipulation (updates) and deletes and select(ateast important vi) capture cheyyali..so daani kosam nee proc defintion lo paramters untayi kadha add extra param named debug_fl ..idhi bit value and default 0 pettu

so when u want to see important updates and deletes

write code in ur sp like

if @debug_fl=1
select @value1 as 'current value'


if @debug_fl=1
select 'deleting emp data'
select @@rowcount as 'rowsdeleted'


hope u understood

thanks mayya ippud ardam aindi... adi SQL developer tho cheyinchali anukunta kada?
×
×
  • Create New...