From: Ryan Liu on 2 Aug 2010 15:31 Hi, I know how to get into debug mode, place break point etc in a stroed proc in SQL Server Management Studio. But after it hits a break print, what actions I can take to peek the data? e.g. I try to see a temp table has just been populated? I can not put "select top 1 col1 from #tempTable1" in watch list. It says it could not be evalulated I can not execute it in Command window. How can I look at data? How can I execute addintion sql statements? What command supported in "Command Window"? Thanks,
From: Lijun Zhang on 2 Aug 2010 16:22 The easiest way is put a SELECT statement in your SQL Scripts and remove it after the debug. You can use SELET to view your variable too. The result will always show the the output window. Lijun "Ryan Liu" <ryanliu_99(a)hotmail.com> wrote in message news:OGLEolnMLHA.4120(a)TK2MSFTNGP02.phx.gbl... > Hi, > > I know how to get into debug mode, place break point etc in a stroed proc > in SQL Server Management Studio. > > But after it hits a break print, what actions I can take to peek the data? > e.g. I try to see a temp table has just been populated? > > I can not put "select top 1 col1 from #tempTable1" in watch list. It says > it could not be evalulated > I can not execute it in Command window. > > How can I look at data? How can I execute addintion sql statements? > > What command supported in "Command Window"? > > Thanks, >
From: Ryan Liu on 2 Aug 2010 16:39 Thanks. Is there better way? When we debug C#, VB, C code, we don't need add addintional lines in original source code, we can use Watch/Command window etc. If add addintional select scripts, then really no need go get into debug mode at the first place. Thanks, "Lijun Zhang" <sonyzhang00(a)yahoo.com> wrote in message news:%23GUGwBoMLHA.3732(a)TK2MSFTNGP02.phx.gbl... > The easiest way is put a SELECT statement in your SQL Scripts and remove > it after the debug. You can use SELET to view your variable too. The > result will always show the the output window. > > Lijun > > > > "Ryan Liu" <ryanliu_99(a)hotmail.com> wrote in message > news:OGLEolnMLHA.4120(a)TK2MSFTNGP02.phx.gbl... > >> Hi, >> >> I know how to get into debug mode, place break point etc in a stroed proc >> in SQL Server Management Studio. >> >> But after it hits a break print, what actions I can take to peek the >> data? >> e.g. I try to see a temp table has just been populated? >> >> I can not put "select top 1 col1 from #tempTable1" in watch list. It says >> it could not be evalulated >> I can not execute it in Command window. >> >> How can I look at data? How can I execute addintion sql statements? >> >> What command supported in "Command Window"? >> >> Thanks, >> > >
From: Lijun Zhang on 2 Aug 2010 16:56 Yes. Actually I never use the debugger, so I don't know other better ways. Use the code window is convenient enough for me. "Ryan Liu" <ryanliu_99(a)hotmail.com> wrote in message news:OMMWCMoMLHA.5532(a)TK2MSFTNGP04.phx.gbl... > Thanks. > > Is there better way? When we debug C#, VB, C code, we don't need add > addintional lines in original source code, we can use Watch/Command window > etc. > > If add addintional select scripts, then really no need go get into debug > mode at the first place. > > Thanks, > > > "Lijun Zhang" <sonyzhang00(a)yahoo.com> wrote in message > news:%23GUGwBoMLHA.3732(a)TK2MSFTNGP02.phx.gbl... >> The easiest way is put a SELECT statement in your SQL Scripts and remove >> it after the debug. You can use SELET to view your variable too. The >> result will always show the the output window. >> >> Lijun >> >> >> >> "Ryan Liu" <ryanliu_99(a)hotmail.com> wrote in message >> news:OGLEolnMLHA.4120(a)TK2MSFTNGP02.phx.gbl... >> >>> Hi, >>> >>> I know how to get into debug mode, place break point etc in a stroed >>> proc in SQL Server Management Studio. >>> >>> But after it hits a break print, what actions I can take to peek the >>> data? >>> e.g. I try to see a temp table has just been populated? >>> >>> I can not put "select top 1 col1 from #tempTable1" in watch list. It >>> says it could not be evalulated >>> I can not execute it in Command window. >>> >>> How can I look at data? How can I execute addintion sql statements? >>> >>> What command supported in "Command Window"? >>> >>> Thanks, >>> >> >> >
From: John Bell on 3 Aug 2010 02:29 On Mon, 2 Aug 2010 13:39:55 -0700, "Ryan Liu" <ryanliu_99(a)hotmail.com> wrote: >Thanks. > >Is there better way? When we debug C#, VB, C code, we don't need add >addintional lines in original source code, we can use Watch/Command window >etc. > >If add addintional select scripts, then really no need go get into debug >mode at the first place. > >Thanks, > > >"Lijun Zhang" <sonyzhang00(a)yahoo.com> wrote in message >news:%23GUGwBoMLHA.3732(a)TK2MSFTNGP02.phx.gbl... >> The easiest way is put a SELECT statement in your SQL Scripts and remove >> it after the debug. You can use SELET to view your variable too. The >> result will always show the the output window. >> >> Lijun >> >> >> >> "Ryan Liu" <ryanliu_99(a)hotmail.com> wrote in message >> news:OGLEolnMLHA.4120(a)TK2MSFTNGP02.phx.gbl... >> >>> Hi, >>> >>> I know how to get into debug mode, place break point etc in a stroed proc >>> in SQL Server Management Studio. >>> >>> But after it hits a break print, what actions I can take to peek the >>> data? >>> e.g. I try to see a temp table has just been populated? >>> >>> I can not put "select top 1 col1 from #tempTable1" in watch list. It says >>> it could not be evalulated >>> I can not execute it in Command window. >>> >>> How can I look at data? How can I execute addintion sql statements? >>> >>> What command supported in "Command Window"? >>> >>> Thanks, >>> >> >> But with C# etc the variables/structures that you watch are in memory not in a database elsewehere! John
|
Next
|
Last
Pages: 1 2 Prev: SQL Error 22050. SQL2008 Next: How to get consecutive record number in two select statement |