How hide code in Database Project query

  • Thread starter Thread starter Woody Splawn
  • Start date Start date
W

Woody Splawn

I have begun to use database projects for performing test and extemporanious
queries. That is, I create a new .dtg file and run a query there for
testing.

Is it possible to hide or block out some code in this window? That is,
suppose I write an update query. I run it and it does it's thing. Then I
want to run a select query to see if what I did actually worked. It would
be nice if I could simply block out the update statement and write the
select statment under it without having to create a new .dtg file. Can this
be done with this tool?

What is the easy way of doing what I want? I suppose I could do it in SQL
Server's enterprise manager but it is convenitent to do it in a database
project without having to leave VS.
 
Hi Woody,

I don't know what a .dtg file. Did you mean by .dtq file?

dtq file is a Database Query file. You can only write a single statement
in it.

If you want to update a table and query a result, try to create a SQL
Script file (.sql). You can write multiple statements in it, and choose to
run one of them or all of them. The query results will be displayed in the
output window. Or you can use the Query Analyzer in SQL Server. It will
provide you with more powerful functions.

If anything is unclear, please feel free to reply to the post.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
Back
Top