Hello,
I have written a mechanism which returns meta data back to a client for
different views. For example, one meta data item on a column is the Display
Name.
Now, so I don't have to keep attaching meta data to a particular column
every time I create a new view, I "inherit" the meta data from a parent view
or table by looking at all the same named columns in any views or tables
that the table depends (sysdepends) on.
The problem is, sometimes it make sense to change the name of a column in a
view from the underlying table (e.g. company table has a "name" column, but
in the view, you want to call it "company_name").
My question is, is there an easy way to determine where a view's column
really came from?
Thanks,
-PaulNever mind, I forgot to look at the depnumber column in sysdepends!
"Paul" <a@.b.com> wrote in message
news:eWN9knVCFHA.3940@.TK2MSFTNGP09.phx.gbl...
> Hello,
> I have written a mechanism which returns meta data back to a client for
> different views. For example, one meta data item on a column is the
> Display Name.
> Now, so I don't have to keep attaching meta data to a particular column
> every time I create a new view, I "inherit" the meta data from a parent
> view or table by looking at all the same named columns in any views or
> tables that the table depends (sysdepends) on.
> The problem is, sometimes it make sense to change the name of a column in
> a view from the underlying table (e.g. company table has a "name" column,
> but in the view, you want to call it "company_name").
> My question is, is there an easy way to determine where a view's column
> really came from?
> Thanks,
> -Paul
>|||Okay, now the hard question.
How do I correlate a column in the sysdepends table back to a column in the
resulting view's columns?
Thanks,
-Paul
"Paul" <a@.b.com> wrote in message
news:OBXyfyVCFHA.1836@.tk2msftngp13.phx.gbl...
> Never mind, I forgot to look at the depnumber column in sysdepends!
>
> "Paul" <a@.b.com> wrote in message
> news:eWN9knVCFHA.3940@.TK2MSFTNGP09.phx.gbl...
>|||On Wed, 2 Feb 2005 15:27:44 -0500, Paul wrote:
>Okay, now the hard question.
>How do I correlate a column in the sysdepends table back to a column in the
>resulting view's columns?
Hi Paul,
You don't.
You are probably thinking right now of fairly straight-forward views,
where such a mapping would be viable. But views can be fairly complex!
CREATE VIEW test
AS SELECT Col1 - Col2 AS A,
Col1 + Col2 AS B,
CASE WHEN EXISTS (SELECT *
FROM YZ
WHERE Foo = SomeTable.Bar)
THEN 1
ELSE 2
END AS C,
'Constant value' AS D,
Col3 + 1 AS E,
Col3 - 1 AS F
FROM SomeTable
How should each of the view's columns be correlated to each of the
underlying table's columns? And remember that this is also a fairly simple
example - I could come up with much more contrived views (some of my real
views for projects I do are much more contrived!)
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)
Showing posts with label written. Show all posts
Showing posts with label written. Show all posts
Wednesday, March 7, 2012
Saturday, February 25, 2012
Message pane in QA
Hi
Is it possible to get the text from the Message tab in QA written to a log
in some way? We are running a lot of scripts to convert and later merge 2 of
our databases, and it would be helpful if I could get the results that are
written to the message tab directly into a logfile instead of having to
manually cut and paste it into a document.
Regards
Steen
Not without executing to file, which probably isn't what you are looking for. Run a Profiler trace
with appropriate events, columns and filters instead.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Steen Persson" <SPE@.REMOVEdatea.dk> wrote in message news:eimZkG0ZFHA.2420@.TK2MSFTNGP12.phx.gbl...
> Hi
> Is it possible to get the text from the Message tab in QA written to a log in some way? We are
> running a lot of scripts to convert and later merge 2 of our databases, and it would be helpful if
> I could get the results that are written to the message tab directly into a logfile instead of
> having to manually cut and paste it into a document.
> Regards
> Steen
>
|||Hi
Have you thought about using osql?
John
"Steen Persson" <SPE@.REMOVEdatea.dk> wrote in message
news:eimZkG0ZFHA.2420@.TK2MSFTNGP12.phx.gbl...
> Hi
> Is it possible to get the text from the Message tab in QA written to a log
> in some way? We are running a lot of scripts to convert and later merge 2
> of our databases, and it would be helpful if I could get the results that
> are written to the message tab directly into a logfile instead of having
> to manually cut and paste it into a document.
> Regards
> Steen
>
|||I would put the script in a file and use OSQL ie
osql -i c:\myfile.sql -o c:\myoutfile.txt -E
Wayne Snyder MCDBA, SQL Server MVP
Mariner, Charlotte, NC
(Please respond only to the newsgroup.)
I support the Professional Association for SQL Server ( PASS) and it's
community of SQL Professionals.
"Steen Persson" <SPE@.REMOVEdatea.dk> wrote in message
news:eimZkG0ZFHA.2420@.TK2MSFTNGP12.phx.gbl...
> Hi
> Is it possible to get the text from the Message tab in QA written to a log
> in some way? We are running a lot of scripts to convert and later merge 2
of
> our databases, and it would be helpful if I could get the results that are
> written to the message tab directly into a logfile instead of having to
> manually cut and paste it into a document.
> Regards
> Steen
>
Is it possible to get the text from the Message tab in QA written to a log
in some way? We are running a lot of scripts to convert and later merge 2 of
our databases, and it would be helpful if I could get the results that are
written to the message tab directly into a logfile instead of having to
manually cut and paste it into a document.
Regards
Steen
Not without executing to file, which probably isn't what you are looking for. Run a Profiler trace
with appropriate events, columns and filters instead.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Steen Persson" <SPE@.REMOVEdatea.dk> wrote in message news:eimZkG0ZFHA.2420@.TK2MSFTNGP12.phx.gbl...
> Hi
> Is it possible to get the text from the Message tab in QA written to a log in some way? We are
> running a lot of scripts to convert and later merge 2 of our databases, and it would be helpful if
> I could get the results that are written to the message tab directly into a logfile instead of
> having to manually cut and paste it into a document.
> Regards
> Steen
>
|||Hi
Have you thought about using osql?
John
"Steen Persson" <SPE@.REMOVEdatea.dk> wrote in message
news:eimZkG0ZFHA.2420@.TK2MSFTNGP12.phx.gbl...
> Hi
> Is it possible to get the text from the Message tab in QA written to a log
> in some way? We are running a lot of scripts to convert and later merge 2
> of our databases, and it would be helpful if I could get the results that
> are written to the message tab directly into a logfile instead of having
> to manually cut and paste it into a document.
> Regards
> Steen
>
|||I would put the script in a file and use OSQL ie
osql -i c:\myfile.sql -o c:\myoutfile.txt -E
Wayne Snyder MCDBA, SQL Server MVP
Mariner, Charlotte, NC
(Please respond only to the newsgroup.)
I support the Professional Association for SQL Server ( PASS) and it's
community of SQL Professionals.
"Steen Persson" <SPE@.REMOVEdatea.dk> wrote in message
news:eimZkG0ZFHA.2420@.TK2MSFTNGP12.phx.gbl...
> Hi
> Is it possible to get the text from the Message tab in QA written to a log
> in some way? We are running a lot of scripts to convert and later merge 2
of
> our databases, and it would be helpful if I could get the results that are
> written to the message tab directly into a logfile instead of having to
> manually cut and paste it into a document.
> Regards
> Steen
>
Message pane in QA
Hi
Is it possible to get the text from the Message tab in QA written to a log
in some way? We are running a lot of scripts to convert and later merge 2 of
our databases, and it would be helpful if I could get the results that are
written to the message tab directly into a logfile instead of having to
manually cut and paste it into a document.
Regards
SteenNot without executing to file, which probably isn't what you are looking for
. Run a Profiler trace
with appropriate events, columns and filters instead.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Steen Persson" <SPE@.REMOVEdatea.dk> wrote in message news:eimZkG0ZFHA.2420@.TK2MSFTNGP12.phx
.gbl...
> Hi
> Is it possible to get the text from the Message tab in QA written to a log
in some way? We are
> running a lot of scripts to convert and later merge 2 of our databases, an
d it would be helpful if
> I could get the results that are written to the message tab directly into
a logfile instead of
> having to manually cut and paste it into a document.
> Regards
> Steen
>|||Hi
Have you thought about using osql?
John
"Steen Persson" <SPE@.REMOVEdatea.dk> wrote in message
news:eimZkG0ZFHA.2420@.TK2MSFTNGP12.phx.gbl...
> Hi
> Is it possible to get the text from the Message tab in QA written to a log
> in some way? We are running a lot of scripts to convert and later merge 2
> of our databases, and it would be helpful if I could get the results that
> are written to the message tab directly into a logfile instead of having
> to manually cut and paste it into a document.
> Regards
> Steen
>|||I would put the script in a file and use OSQL ie
osql -i c:\myfile.sql -o c:\myoutfile.txt -E
Wayne Snyder MCDBA, SQL Server MVP
Mariner, Charlotte, NC
(Please respond only to the newsgroup.)
I support the Professional Association for SQL Server ( PASS) and it's
community of SQL Professionals.
"Steen Persson" <SPE@.REMOVEdatea.dk> wrote in message
news:eimZkG0ZFHA.2420@.TK2MSFTNGP12.phx.gbl...
> Hi
> Is it possible to get the text from the Message tab in QA written to a log
> in some way? We are running a lot of scripts to convert and later merge 2
of
> our databases, and it would be helpful if I could get the results that are
> written to the message tab directly into a logfile instead of having to
> manually cut and paste it into a document.
> Regards
> Steen
>
Is it possible to get the text from the Message tab in QA written to a log
in some way? We are running a lot of scripts to convert and later merge 2 of
our databases, and it would be helpful if I could get the results that are
written to the message tab directly into a logfile instead of having to
manually cut and paste it into a document.
Regards
SteenNot without executing to file, which probably isn't what you are looking for
. Run a Profiler trace
with appropriate events, columns and filters instead.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Steen Persson" <SPE@.REMOVEdatea.dk> wrote in message news:eimZkG0ZFHA.2420@.TK2MSFTNGP12.phx
.gbl...
> Hi
> Is it possible to get the text from the Message tab in QA written to a log
in some way? We are
> running a lot of scripts to convert and later merge 2 of our databases, an
d it would be helpful if
> I could get the results that are written to the message tab directly into
a logfile instead of
> having to manually cut and paste it into a document.
> Regards
> Steen
>|||Hi
Have you thought about using osql?
John
"Steen Persson" <SPE@.REMOVEdatea.dk> wrote in message
news:eimZkG0ZFHA.2420@.TK2MSFTNGP12.phx.gbl...
> Hi
> Is it possible to get the text from the Message tab in QA written to a log
> in some way? We are running a lot of scripts to convert and later merge 2
> of our databases, and it would be helpful if I could get the results that
> are written to the message tab directly into a logfile instead of having
> to manually cut and paste it into a document.
> Regards
> Steen
>|||I would put the script in a file and use OSQL ie
osql -i c:\myfile.sql -o c:\myoutfile.txt -E
Wayne Snyder MCDBA, SQL Server MVP
Mariner, Charlotte, NC
(Please respond only to the newsgroup.)
I support the Professional Association for SQL Server ( PASS) and it's
community of SQL Professionals.
"Steen Persson" <SPE@.REMOVEdatea.dk> wrote in message
news:eimZkG0ZFHA.2420@.TK2MSFTNGP12.phx.gbl...
> Hi
> Is it possible to get the text from the Message tab in QA written to a log
> in some way? We are running a lot of scripts to convert and later merge 2
of
> our databases, and it would be helpful if I could get the results that are
> written to the message tab directly into a logfile instead of having to
> manually cut and paste it into a document.
> Regards
> Steen
>
Message pane in QA
Hi
Is it possible to get the text from the Message tab in QA written to a log
in some way? We are running a lot of scripts to convert and later merge 2 of
our databases, and it would be helpful if I could get the results that are
written to the message tab directly into a logfile instead of having to
manually cut and paste it into a document.
Regards
SteenNot without executing to file, which probably isn't what you are looking for. Run a Profiler trace
with appropriate events, columns and filters instead.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Steen Persson" <SPE@.REMOVEdatea.dk> wrote in message news:eimZkG0ZFHA.2420@.TK2MSFTNGP12.phx.gbl...
> Hi
> Is it possible to get the text from the Message tab in QA written to a log in some way? We are
> running a lot of scripts to convert and later merge 2 of our databases, and it would be helpful if
> I could get the results that are written to the message tab directly into a logfile instead of
> having to manually cut and paste it into a document.
> Regards
> Steen
>|||Hi
Have you thought about using osql?
John
"Steen Persson" <SPE@.REMOVEdatea.dk> wrote in message
news:eimZkG0ZFHA.2420@.TK2MSFTNGP12.phx.gbl...
> Hi
> Is it possible to get the text from the Message tab in QA written to a log
> in some way? We are running a lot of scripts to convert and later merge 2
> of our databases, and it would be helpful if I could get the results that
> are written to the message tab directly into a logfile instead of having
> to manually cut and paste it into a document.
> Regards
> Steen
>|||I would put the script in a file and use OSQL ie
osql -i c:\myfile.sql -o c:\myoutfile.txt -E
Wayne Snyder MCDBA, SQL Server MVP
Mariner, Charlotte, NC
(Please respond only to the newsgroup.)
I support the Professional Association for SQL Server ( PASS) and it's
community of SQL Professionals.
"Steen Persson" <SPE@.REMOVEdatea.dk> wrote in message
news:eimZkG0ZFHA.2420@.TK2MSFTNGP12.phx.gbl...
> Hi
> Is it possible to get the text from the Message tab in QA written to a log
> in some way? We are running a lot of scripts to convert and later merge 2
of
> our databases, and it would be helpful if I could get the results that are
> written to the message tab directly into a logfile instead of having to
> manually cut and paste it into a document.
> Regards
> Steen
>
Is it possible to get the text from the Message tab in QA written to a log
in some way? We are running a lot of scripts to convert and later merge 2 of
our databases, and it would be helpful if I could get the results that are
written to the message tab directly into a logfile instead of having to
manually cut and paste it into a document.
Regards
SteenNot without executing to file, which probably isn't what you are looking for. Run a Profiler trace
with appropriate events, columns and filters instead.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Steen Persson" <SPE@.REMOVEdatea.dk> wrote in message news:eimZkG0ZFHA.2420@.TK2MSFTNGP12.phx.gbl...
> Hi
> Is it possible to get the text from the Message tab in QA written to a log in some way? We are
> running a lot of scripts to convert and later merge 2 of our databases, and it would be helpful if
> I could get the results that are written to the message tab directly into a logfile instead of
> having to manually cut and paste it into a document.
> Regards
> Steen
>|||Hi
Have you thought about using osql?
John
"Steen Persson" <SPE@.REMOVEdatea.dk> wrote in message
news:eimZkG0ZFHA.2420@.TK2MSFTNGP12.phx.gbl...
> Hi
> Is it possible to get the text from the Message tab in QA written to a log
> in some way? We are running a lot of scripts to convert and later merge 2
> of our databases, and it would be helpful if I could get the results that
> are written to the message tab directly into a logfile instead of having
> to manually cut and paste it into a document.
> Regards
> Steen
>|||I would put the script in a file and use OSQL ie
osql -i c:\myfile.sql -o c:\myoutfile.txt -E
Wayne Snyder MCDBA, SQL Server MVP
Mariner, Charlotte, NC
(Please respond only to the newsgroup.)
I support the Professional Association for SQL Server ( PASS) and it's
community of SQL Professionals.
"Steen Persson" <SPE@.REMOVEdatea.dk> wrote in message
news:eimZkG0ZFHA.2420@.TK2MSFTNGP12.phx.gbl...
> Hi
> Is it possible to get the text from the Message tab in QA written to a log
> in some way? We are running a lot of scripts to convert and later merge 2
of
> our databases, and it would be helpful if I could get the results that are
> written to the message tab directly into a logfile instead of having to
> manually cut and paste it into a document.
> Regards
> Steen
>
Subscribe to:
Posts (Atom)