I have a program which generate a xml file from dataset using
DataSet.WriteXML function. The result is as follow:
<DataSet xmlns="http://tempuri.org/DataSet1.xsd">
<TB TB_NO="NN01001" DESCRIPTION="NN " DATE="1/16/2007
12:00:00 AM" Name=" "
E_MAIL="test@.test.com">
<TD TD_NO="NN1-1 " LINE_NAME="FREE TRADE ZONE
" ADD1=" " TRSS="3" TYPEDESC="
" >
<DESCRIPTION SEQ_NO="001 " MARKS="RESOURCES " DSCP="
" />
<DESCRIPTION SEQ_NO="002 " MARKS=" " DSCP="
" />
<DESCRIPTION SEQ_NO="003 " MARKS="P.O.:11111111 " DSCP="
" />
<DESCRIPTION SEQ_NO="004 " MARKS="MADE IN CHINA " DSCP="
" />
<DESCRIPTION SEQ_NO="005 " MARKS=" " DSCP="
" />
<DESCRIPTION SEQ_NO="006 " MARKS=" " DSCP="
" />
</TD>
</TB>
</DataSet>
Is there any setting to set it to generate xml file with trim space values
and result should output as :
<DataSet xmlns="http://tempuri.org/DataSet1.xsd">
<TB TB_NO="NN01001" DESCRIPTION="NN" DATE="1/16/2007 12:00:00 AM" Name=""
E_MAIL="test@.test.com">
<TD TD_NO="NN1-1" LINE_NAME="FREE TRADE ZONE" ADD1="" TRSS="3"
TYPEDESC="" >
<DESCRIPTION SEQ_NO="001" MARKS="RESOURCES" DSCP="" />
<DESCRIPTION SEQ_NO="002" MARKS="" DSCP="" />
<DESCRIPTION SEQ_NO="003" MARKS="P.O.:11111111" DSCP="" />
<DESCRIPTION SEQ_NO="004" MARKS="MADE IN CHINA" DSCP="" />
<DESCRIPTION SEQ_NO="005" MARKS="" DSCP="" />
<DESCRIPTION SEQ_NO="006" MARKS="" DSCP="" />
</TD>
</TB>
</DataSet>
In your SQL SELECT or stored procedure just use LTRIM(column_name) or
RTRIM(column_name) to remove unwanted spaces then the resulting dataset will
not have them for the WriteXML format.
So to correct your data below it would be something like:
SELECT
RTRIM(TB_NO),
RTRIM(DESCRIPTION)
...
"ABC" <abc@.abc.com> wrote in message
news:elMHZEiOHHA.4484@.TK2MSFTNGP02.phx.gbl...
>I have a program which generate a xml file from dataset using
> DataSet.WriteXML function. The result is as follow:
> <DataSet xmlns="http://tempuri.org/DataSet1.xsd">
> <TB TB_NO="NN01001" DESCRIPTION="NN " DATE="1/16/2007
> 12:00:00 AM" Name=" "
> E_MAIL="test@.test.com">
> <TD TD_NO="NN1-1 " LINE_NAME="FREE TRADE ZONE
> " ADD1=" " TRSS="3" TYPEDESC="
> " >
> <DESCRIPTION SEQ_NO="001 " MARKS="RESOURCES " DSCP="
> " />
> <DESCRIPTION SEQ_NO="002 " MARKS=" " DSCP="
> " />
> <DESCRIPTION SEQ_NO="003 " MARKS="P.O.:11111111 " DSCP="
> " />
> <DESCRIPTION SEQ_NO="004 " MARKS="MADE IN CHINA " DSCP="
> " />
> <DESCRIPTION SEQ_NO="005 " MARKS=" " DSCP="
> " />
> <DESCRIPTION SEQ_NO="006 " MARKS=" " DSCP="
> " />
> </TD>
> </TB>
> </DataSet>
>
> Is there any setting to set it to generate xml file with trim space values
> and result should output as :
> <DataSet xmlns="http://tempuri.org/DataSet1.xsd">
> <TB TB_NO="NN01001" DESCRIPTION="NN" DATE="1/16/2007 12:00:00 AM" Name=""
> E_MAIL="test@.test.com">
> <TD TD_NO="NN1-1" LINE_NAME="FREE TRADE ZONE" ADD1="" TRSS="3"
> TYPEDESC="" >
> <DESCRIPTION SEQ_NO="001" MARKS="RESOURCES" DSCP="" />
> <DESCRIPTION SEQ_NO="002" MARKS="" DSCP="" />
> <DESCRIPTION SEQ_NO="003" MARKS="P.O.:11111111" DSCP="" />
> <DESCRIPTION SEQ_NO="004" MARKS="MADE IN CHINA" DSCP="" />
> <DESCRIPTION SEQ_NO="005" MARKS="" DSCP="" />
> <DESCRIPTION SEQ_NO="006" MARKS="" DSCP="" />
> </TD>
> </TB>
> </DataSet>
>
>
sql
Showing posts with label function. Show all posts
Showing posts with label function. Show all posts
Friday, March 30, 2012
How to trim XML's attribute values?
I have a program which generate a xml file from dataset using
DataSet.WriteXML function. The result is as follow:
<DataSet xmlns="http://tempuri.org/DataSet1.xsd">
<TB TB_NO="NN01001" DESCRIPTION="NN " DATE="1/16/2007
12:00:00 AM" Name=" "
E_MAIL="test@.test.com">
<TD TD_NO="NN1-1 " LINE_NAME="FREE TRADE ZONE
" ADD1=" " TRSS="3" TYPEDESC="
" >
<DESCRIPTION SEQ_NO="001 " MARKS="RESOURCES " DSCP="
" />
<DESCRIPTION SEQ_NO="002 " MARKS=" " DSCP="
" />
<DESCRIPTION SEQ_NO="003 " MARKS="P.O.:11111111 " DSCP="
" />
<DESCRIPTION SEQ_NO="004 " MARKS="MADE IN CHINA " DSCP="
" />
<DESCRIPTION SEQ_NO="005 " MARKS=" " DSCP="
" />
<DESCRIPTION SEQ_NO="006 " MARKS=" " DSCP="
" />
</TD>
</TB>
</DataSet>
Is there any setting to set it to generate xml file with trim space values
and result should output as :
<DataSet xmlns="http://tempuri.org/DataSet1.xsd">
<TB TB_NO="NN01001" DESCRIPTION="NN" DATE="1/16/2007 12:00:00 AM" Name=""
E_MAIL="test@.test.com">
<TD TD_NO="NN1-1" LINE_NAME="FREE TRADE ZONE" ADD1="" TRSS="3"
TYPEDESC="" >
<DESCRIPTION SEQ_NO="001" MARKS="RESOURCES" DSCP="" />
<DESCRIPTION SEQ_NO="002" MARKS="" DSCP="" />
<DESCRIPTION SEQ_NO="003" MARKS="P.O.:11111111" DSCP="" />
<DESCRIPTION SEQ_NO="004" MARKS="MADE IN CHINA" DSCP="" />
<DESCRIPTION SEQ_NO="005" MARKS="" DSCP="" />
<DESCRIPTION SEQ_NO="006" MARKS="" DSCP="" />
</TD>
</TB>
</DataSet>In your SQL SELECT or stored procedure just use LTRIM(column_name) or
RTRIM(column_name) to remove unwanted spaces then the resulting dataset will
not have them for the WriteXML format.
So to correct your data below it would be something like:
SELECT
RTRIM(TB_NO),
RTRIM(DESCRIPTION)
...
"ABC" <abc@.abc.com> wrote in message
news:elMHZEiOHHA.4484@.TK2MSFTNGP02.phx.gbl...
>I have a program which generate a xml file from dataset using
> DataSet.WriteXML function. The result is as follow:
> <DataSet xmlns="http://tempuri.org/DataSet1.xsd">
> <TB TB_NO="NN01001" DESCRIPTION="NN " DATE="1/16/2007
> 12:00:00 AM" Name=" "
> E_MAIL="test@.test.com">
> <TD TD_NO="NN1-1 " LINE_NAME="FREE TRADE ZONE
> " ADD1=" " TRSS="3" TYPEDESC="
> " >
> <DESCRIPTION SEQ_NO="001 " MARKS="RESOURCES " DSCP="
> " />
> <DESCRIPTION SEQ_NO="002 " MARKS=" " DSCP="
> " />
> <DESCRIPTION SEQ_NO="003 " MARKS="P.O.:11111111 " DSCP="
> " />
> <DESCRIPTION SEQ_NO="004 " MARKS="MADE IN CHINA " DSCP="
> " />
> <DESCRIPTION SEQ_NO="005 " MARKS=" " DSCP="
> " />
> <DESCRIPTION SEQ_NO="006 " MARKS=" " DSCP="
> " />
> </TD>
> </TB>
> </DataSet>
>
> Is there any setting to set it to generate xml file with trim space values
> and result should output as :
> <DataSet xmlns="http://tempuri.org/DataSet1.xsd">
> <TB TB_NO="NN01001" DESCRIPTION="NN" DATE="1/16/2007 12:00:00 AM" Name=""
> E_MAIL="test@.test.com">
> <TD TD_NO="NN1-1" LINE_NAME="FREE TRADE ZONE" ADD1="" TRSS="3"
> TYPEDESC="" >
> <DESCRIPTION SEQ_NO="001" MARKS="RESOURCES" DSCP="" />
> <DESCRIPTION SEQ_NO="002" MARKS="" DSCP="" />
> <DESCRIPTION SEQ_NO="003" MARKS="P.O.:11111111" DSCP="" />
> <DESCRIPTION SEQ_NO="004" MARKS="MADE IN CHINA" DSCP="" />
> <DESCRIPTION SEQ_NO="005" MARKS="" DSCP="" />
> <DESCRIPTION SEQ_NO="006" MARKS="" DSCP="" />
> </TD>
> </TB>
> </DataSet>
>
>
DataSet.WriteXML function. The result is as follow:
<DataSet xmlns="http://tempuri.org/DataSet1.xsd">
<TB TB_NO="NN01001" DESCRIPTION="NN " DATE="1/16/2007
12:00:00 AM" Name=" "
E_MAIL="test@.test.com">
<TD TD_NO="NN1-1 " LINE_NAME="FREE TRADE ZONE
" ADD1=" " TRSS="3" TYPEDESC="
" >
<DESCRIPTION SEQ_NO="001 " MARKS="RESOURCES " DSCP="
" />
<DESCRIPTION SEQ_NO="002 " MARKS=" " DSCP="
" />
<DESCRIPTION SEQ_NO="003 " MARKS="P.O.:11111111 " DSCP="
" />
<DESCRIPTION SEQ_NO="004 " MARKS="MADE IN CHINA " DSCP="
" />
<DESCRIPTION SEQ_NO="005 " MARKS=" " DSCP="
" />
<DESCRIPTION SEQ_NO="006 " MARKS=" " DSCP="
" />
</TD>
</TB>
</DataSet>
Is there any setting to set it to generate xml file with trim space values
and result should output as :
<DataSet xmlns="http://tempuri.org/DataSet1.xsd">
<TB TB_NO="NN01001" DESCRIPTION="NN" DATE="1/16/2007 12:00:00 AM" Name=""
E_MAIL="test@.test.com">
<TD TD_NO="NN1-1" LINE_NAME="FREE TRADE ZONE" ADD1="" TRSS="3"
TYPEDESC="" >
<DESCRIPTION SEQ_NO="001" MARKS="RESOURCES" DSCP="" />
<DESCRIPTION SEQ_NO="002" MARKS="" DSCP="" />
<DESCRIPTION SEQ_NO="003" MARKS="P.O.:11111111" DSCP="" />
<DESCRIPTION SEQ_NO="004" MARKS="MADE IN CHINA" DSCP="" />
<DESCRIPTION SEQ_NO="005" MARKS="" DSCP="" />
<DESCRIPTION SEQ_NO="006" MARKS="" DSCP="" />
</TD>
</TB>
</DataSet>In your SQL SELECT or stored procedure just use LTRIM(column_name) or
RTRIM(column_name) to remove unwanted spaces then the resulting dataset will
not have them for the WriteXML format.
So to correct your data below it would be something like:
SELECT
RTRIM(TB_NO),
RTRIM(DESCRIPTION)
...
"ABC" <abc@.abc.com> wrote in message
news:elMHZEiOHHA.4484@.TK2MSFTNGP02.phx.gbl...
>I have a program which generate a xml file from dataset using
> DataSet.WriteXML function. The result is as follow:
> <DataSet xmlns="http://tempuri.org/DataSet1.xsd">
> <TB TB_NO="NN01001" DESCRIPTION="NN " DATE="1/16/2007
> 12:00:00 AM" Name=" "
> E_MAIL="test@.test.com">
> <TD TD_NO="NN1-1 " LINE_NAME="FREE TRADE ZONE
> " ADD1=" " TRSS="3" TYPEDESC="
> " >
> <DESCRIPTION SEQ_NO="001 " MARKS="RESOURCES " DSCP="
> " />
> <DESCRIPTION SEQ_NO="002 " MARKS=" " DSCP="
> " />
> <DESCRIPTION SEQ_NO="003 " MARKS="P.O.:11111111 " DSCP="
> " />
> <DESCRIPTION SEQ_NO="004 " MARKS="MADE IN CHINA " DSCP="
> " />
> <DESCRIPTION SEQ_NO="005 " MARKS=" " DSCP="
> " />
> <DESCRIPTION SEQ_NO="006 " MARKS=" " DSCP="
> " />
> </TD>
> </TB>
> </DataSet>
>
> Is there any setting to set it to generate xml file with trim space values
> and result should output as :
> <DataSet xmlns="http://tempuri.org/DataSet1.xsd">
> <TB TB_NO="NN01001" DESCRIPTION="NN" DATE="1/16/2007 12:00:00 AM" Name=""
> E_MAIL="test@.test.com">
> <TD TD_NO="NN1-1" LINE_NAME="FREE TRADE ZONE" ADD1="" TRSS="3"
> TYPEDESC="" >
> <DESCRIPTION SEQ_NO="001" MARKS="RESOURCES" DSCP="" />
> <DESCRIPTION SEQ_NO="002" MARKS="" DSCP="" />
> <DESCRIPTION SEQ_NO="003" MARKS="P.O.:11111111" DSCP="" />
> <DESCRIPTION SEQ_NO="004" MARKS="MADE IN CHINA" DSCP="" />
> <DESCRIPTION SEQ_NO="005" MARKS="" DSCP="" />
> <DESCRIPTION SEQ_NO="006" MARKS="" DSCP="" />
> </TD>
> </TB>
> </DataSet>
>
>
Monday, March 26, 2012
how to track object dependencies (view, function). granularity - c
There is a way in management studio 2005 to get dependencies on a databse
object, to reproduce what it does is not a big deal.
This report provides object names thwe view or function depends on for me
ust fine.
For darta warehouse analysis I need to track down dependencies of a
particular column / all collumns in the view. And the existing oviews are big
time ugly, pages of code (perform not any nicer either).
SQL parses a view and builds all the dependencies, but is there a way to get
ahold of that information somehow?
I mean I have quite a bit of ugly looking views, and the idea of doung it by
hand does not look good, it is one nasty job to be honest.
I looking for means to automat that e, create a report aout column-column
dependencies of a view/function.
Did anyone here do anything similar, knows a tool that does, any other
ideas are very welcome
Thanks, Liliya
I'm not sure if I understood your question 100% but here;s my answer anyway,
hope it helps. You can use the system stored procedure called sp_depends to
get object dependencies
Sincerely,
John K
Knowledgy Consulting
www.knowledgy.org
Atlanta's Business Intelligence and Data Warehouse Experts
"Liliya Huff" <LiliyaHuff@.discussions.microsoft.com> wrote in message
news:92770E4B-F9E1-42EB-B68E-6AD50CABA825@.microsoft.com...
> There is a way in management studio 2005 to get dependencies on a databse
> object, to reproduce what it does is not a big deal.
> This report provides object names thwe view or function depends on for me
> ust fine.
> For darta warehouse analysis I need to track down dependencies of a
> particular column / all collumns in the view. And the existing oviews are
> big
> time ugly, pages of code (perform not any nicer either).
> SQL parses a view and builds all the dependencies, but is there a way to
> get
> ahold of that information somehow?
> I mean I have quite a bit of ugly looking views, and the idea of doung it
> by
> hand does not look good, it is one nasty job to be honest.
> I looking for means to automat that e, create a report aout column-column
> dependencies of a view/function.
> Did anyone here do anything similar, knows a tool that does, any other
> ideas are very welcome
> --
> Thanks, Liliya
>
|||Liliya
I think you need to look at RedGate third party compare product
"Liliya Huff" <LiliyaHuff@.discussions.microsoft.com> wrote in message
news:92770E4B-F9E1-42EB-B68E-6AD50CABA825@.microsoft.com...
> There is a way in management studio 2005 to get dependencies on a databse
> object, to reproduce what it does is not a big deal.
> This report provides object names thwe view or function depends on for me
> ust fine.
> For darta warehouse analysis I need to track down dependencies of a
> particular column / all collumns in the view. And the existing oviews are
> big
> time ugly, pages of code (perform not any nicer either).
> SQL parses a view and builds all the dependencies, but is there a way to
> get
> ahold of that information somehow?
> I mean I have quite a bit of ugly looking views, and the idea of doung it
> by
> hand does not look good, it is one nasty job to be honest.
> I looking for means to automat that e, create a report aout column-column
> dependencies of a view/function.
> Did anyone here do anything similar, knows a tool that does, any other
> ideas are very welcome
> --
> Thanks, Liliya
>
|||I can pull object dependencies easy, as I have mentioned before. sp_depends
is one way to do it. tracing what management studio does pulling dependencies
is another way. Both are easy. It does not return the level of detail I need.
view1.columnXYZ depends on object1.column1 and so on, entire dependency tree
under to the last table/function.column
Thanks, Liliya
"Knowledgy" wrote:
> I'm not sure if I understood your question 100% but here;s my answer anyway,
> hope it helps. You can use the system stored procedure called sp_depends to
> get object dependencies
> --
> Sincerely,
> John K
> Knowledgy Consulting
> www.knowledgy.org
|||Downloaded the tool, got trial expired immediately. interesting product...
I have one of their products, started wondering, how exactly do keep track
of tier licenses etc...
demo video leaves the impression that all it is a gui on top of sp_depends.
I would not buy the product on that video... I mean, no need to get what ms
management studio already has. I do not believe they parse views and
functions from what i have seen so far.
Hope, their sales rep is going to be quick to answer a question of the
existing customer.
Thanks, Liliya
"Uri Dimant" wrote:
> Liliya
> I think you need to look at RedGate third party compare product
|||the tool tracks dependencies on object level only. not granular enough for my
needs.
Thanks, Liliya
"Uri Dimant" wrote:
> Liliya
> I think you need to look at RedGate third party compare product
|||RedGate third party compare product - provides only object level dependencies
confirmed by the vendor
"
We use our own parser to build a schema representation. Unfortunately, SQL
Dependency Tracker will only go down to table/view level, it will not show
you the dependencies at column level.
This is something that lots of customers ask us for so when there is
development work planned for SQL Dependency Tracker this will be a seriously
considered feature. However, I do not have any kind of timescale on this.
"
Any other vendors?
Thanks, Liliya
|||Investigate CAST. Worked with their stuff about 10 years ago but nothing
came close to their ability to track dependencies. Note that it was an
upper 5 to as much as 7 figure product back then. :-)
Kevin G. Boles
Indicium Resources, Inc.
SQL Server MVP
kgboles a earthlink dt net
"Liliya Huff" <LiliyaHuff@.discussions.microsoft.com> wrote in message
news:92770E4B-F9E1-42EB-B68E-6AD50CABA825@.microsoft.com...
> There is a way in management studio 2005 to get dependencies on a databse
> object, to reproduce what it does is not a big deal.
> This report provides object names thwe view or function depends on for me
> ust fine.
> For darta warehouse analysis I need to track down dependencies of a
> particular column / all collumns in the view. And the existing oviews are
> big
> time ugly, pages of code (perform not any nicer either).
> SQL parses a view and builds all the dependencies, but is there a way to
> get
> ahold of that information somehow?
> I mean I have quite a bit of ugly looking views, and the idea of doung it
> by
> hand does not look good, it is one nasty job to be honest.
> I looking for means to automat that e, create a report aout column-column
> dependencies of a view/function.
> Did anyone here do anything similar, knows a tool that does, any other
> ideas are very welcome
> --
> Thanks, Liliya
>
object, to reproduce what it does is not a big deal.
This report provides object names thwe view or function depends on for me
ust fine.
For darta warehouse analysis I need to track down dependencies of a
particular column / all collumns in the view. And the existing oviews are big
time ugly, pages of code (perform not any nicer either).
SQL parses a view and builds all the dependencies, but is there a way to get
ahold of that information somehow?
I mean I have quite a bit of ugly looking views, and the idea of doung it by
hand does not look good, it is one nasty job to be honest.
I looking for means to automat that e, create a report aout column-column
dependencies of a view/function.
Did anyone here do anything similar, knows a tool that does, any other
ideas are very welcome
Thanks, Liliya
I'm not sure if I understood your question 100% but here;s my answer anyway,
hope it helps. You can use the system stored procedure called sp_depends to
get object dependencies
Sincerely,
John K
Knowledgy Consulting
www.knowledgy.org
Atlanta's Business Intelligence and Data Warehouse Experts
"Liliya Huff" <LiliyaHuff@.discussions.microsoft.com> wrote in message
news:92770E4B-F9E1-42EB-B68E-6AD50CABA825@.microsoft.com...
> There is a way in management studio 2005 to get dependencies on a databse
> object, to reproduce what it does is not a big deal.
> This report provides object names thwe view or function depends on for me
> ust fine.
> For darta warehouse analysis I need to track down dependencies of a
> particular column / all collumns in the view. And the existing oviews are
> big
> time ugly, pages of code (perform not any nicer either).
> SQL parses a view and builds all the dependencies, but is there a way to
> get
> ahold of that information somehow?
> I mean I have quite a bit of ugly looking views, and the idea of doung it
> by
> hand does not look good, it is one nasty job to be honest.
> I looking for means to automat that e, create a report aout column-column
> dependencies of a view/function.
> Did anyone here do anything similar, knows a tool that does, any other
> ideas are very welcome
> --
> Thanks, Liliya
>
|||Liliya
I think you need to look at RedGate third party compare product
"Liliya Huff" <LiliyaHuff@.discussions.microsoft.com> wrote in message
news:92770E4B-F9E1-42EB-B68E-6AD50CABA825@.microsoft.com...
> There is a way in management studio 2005 to get dependencies on a databse
> object, to reproduce what it does is not a big deal.
> This report provides object names thwe view or function depends on for me
> ust fine.
> For darta warehouse analysis I need to track down dependencies of a
> particular column / all collumns in the view. And the existing oviews are
> big
> time ugly, pages of code (perform not any nicer either).
> SQL parses a view and builds all the dependencies, but is there a way to
> get
> ahold of that information somehow?
> I mean I have quite a bit of ugly looking views, and the idea of doung it
> by
> hand does not look good, it is one nasty job to be honest.
> I looking for means to automat that e, create a report aout column-column
> dependencies of a view/function.
> Did anyone here do anything similar, knows a tool that does, any other
> ideas are very welcome
> --
> Thanks, Liliya
>
|||I can pull object dependencies easy, as I have mentioned before. sp_depends
is one way to do it. tracing what management studio does pulling dependencies
is another way. Both are easy. It does not return the level of detail I need.
view1.columnXYZ depends on object1.column1 and so on, entire dependency tree
under to the last table/function.column
Thanks, Liliya
"Knowledgy" wrote:
> I'm not sure if I understood your question 100% but here;s my answer anyway,
> hope it helps. You can use the system stored procedure called sp_depends to
> get object dependencies
> --
> Sincerely,
> John K
> Knowledgy Consulting
> www.knowledgy.org
|||Downloaded the tool, got trial expired immediately. interesting product...
I have one of their products, started wondering, how exactly do keep track
of tier licenses etc...
demo video leaves the impression that all it is a gui on top of sp_depends.
I would not buy the product on that video... I mean, no need to get what ms
management studio already has. I do not believe they parse views and
functions from what i have seen so far.
Hope, their sales rep is going to be quick to answer a question of the
existing customer.
Thanks, Liliya
"Uri Dimant" wrote:
> Liliya
> I think you need to look at RedGate third party compare product
|||the tool tracks dependencies on object level only. not granular enough for my
needs.
Thanks, Liliya
"Uri Dimant" wrote:
> Liliya
> I think you need to look at RedGate third party compare product
|||RedGate third party compare product - provides only object level dependencies
confirmed by the vendor
"
We use our own parser to build a schema representation. Unfortunately, SQL
Dependency Tracker will only go down to table/view level, it will not show
you the dependencies at column level.
This is something that lots of customers ask us for so when there is
development work planned for SQL Dependency Tracker this will be a seriously
considered feature. However, I do not have any kind of timescale on this.
"
Any other vendors?
Thanks, Liliya
|||Investigate CAST. Worked with their stuff about 10 years ago but nothing
came close to their ability to track dependencies. Note that it was an
upper 5 to as much as 7 figure product back then. :-)
Kevin G. Boles
Indicium Resources, Inc.
SQL Server MVP
kgboles a earthlink dt net
"Liliya Huff" <LiliyaHuff@.discussions.microsoft.com> wrote in message
news:92770E4B-F9E1-42EB-B68E-6AD50CABA825@.microsoft.com...
> There is a way in management studio 2005 to get dependencies on a databse
> object, to reproduce what it does is not a big deal.
> This report provides object names thwe view or function depends on for me
> ust fine.
> For darta warehouse analysis I need to track down dependencies of a
> particular column / all collumns in the view. And the existing oviews are
> big
> time ugly, pages of code (perform not any nicer either).
> SQL parses a view and builds all the dependencies, but is there a way to
> get
> ahold of that information somehow?
> I mean I have quite a bit of ugly looking views, and the idea of doung it
> by
> hand does not look good, it is one nasty job to be honest.
> I looking for means to automat that e, create a report aout column-column
> dependencies of a view/function.
> Did anyone here do anything similar, knows a tool that does, any other
> ideas are very welcome
> --
> Thanks, Liliya
>
Labels:
database,
databseobject,
dependencies,
function,
granularity,
management,
microsoft,
mysql,
object,
oracle,
provides,
report,
reproduce,
server,
sql,
studio,
track,
view
how to track object dependencies (view, function). granularity - c
There is a way in management studio 2005 to get dependencies on a databse
object, to reproduce what it does is not a big deal.
This report provides object names thwe view or function depends on for me
ust fine.
For darta warehouse analysis I need to track down dependencies of a
particular column / all collumns in the view. And the existing oviews are big
time ugly, pages of code (perform not any nicer either).
SQL parses a view and builds all the dependencies, but is there a way to get
ahold of that information somehow?
I mean I have quite a bit of ugly looking views, and the idea of doung it by
hand does not look good, it is one nasty job to be honest.
I looking for means to automat that e, create a report aout column-column
dependencies of a view/function.
Did anyone here do anything similar, knows a tool that does, any other
ideas are very welcome
--
Thanks, LiliyaI'm not sure if I understood your question 100% but here;s my answer anyway,
hope it helps. You can use the system stored procedure called sp_depends to
get object dependencies
--
Sincerely,
John K
Knowledgy Consulting
www.knowledgy.org
Atlanta's Business Intelligence and Data Warehouse Experts
"Liliya Huff" <LiliyaHuff@.discussions.microsoft.com> wrote in message
news:92770E4B-F9E1-42EB-B68E-6AD50CABA825@.microsoft.com...
> There is a way in management studio 2005 to get dependencies on a databse
> object, to reproduce what it does is not a big deal.
> This report provides object names thwe view or function depends on for me
> ust fine.
> For darta warehouse analysis I need to track down dependencies of a
> particular column / all collumns in the view. And the existing oviews are
> big
> time ugly, pages of code (perform not any nicer either).
> SQL parses a view and builds all the dependencies, but is there a way to
> get
> ahold of that information somehow?
> I mean I have quite a bit of ugly looking views, and the idea of doung it
> by
> hand does not look good, it is one nasty job to be honest.
> I looking for means to automat that e, create a report aout column-column
> dependencies of a view/function.
> Did anyone here do anything similar, knows a tool that does, any other
> ideas are very welcome
> --
> Thanks, Liliya
>|||Liliya
I think you need to look at RedGate third party compare product
"Liliya Huff" <LiliyaHuff@.discussions.microsoft.com> wrote in message
news:92770E4B-F9E1-42EB-B68E-6AD50CABA825@.microsoft.com...
> There is a way in management studio 2005 to get dependencies on a databse
> object, to reproduce what it does is not a big deal.
> This report provides object names thwe view or function depends on for me
> ust fine.
> For darta warehouse analysis I need to track down dependencies of a
> particular column / all collumns in the view. And the existing oviews are
> big
> time ugly, pages of code (perform not any nicer either).
> SQL parses a view and builds all the dependencies, but is there a way to
> get
> ahold of that information somehow?
> I mean I have quite a bit of ugly looking views, and the idea of doung it
> by
> hand does not look good, it is one nasty job to be honest.
> I looking for means to automat that e, create a report aout column-column
> dependencies of a view/function.
> Did anyone here do anything similar, knows a tool that does, any other
> ideas are very welcome
> --
> Thanks, Liliya
>|||I can pull object dependencies easy, as I have mentioned before. sp_depends
is one way to do it. tracing what management studio does pulling dependencies
is another way. Both are easy. It does not return the level of detail I need.
view1.columnXYZ depends on object1.column1 and so on, entire dependency tree
under to the last table/function.column
--
Thanks, Liliya
"Knowledgy" wrote:
> I'm not sure if I understood your question 100% but here;s my answer anyway,
> hope it helps. You can use the system stored procedure called sp_depends to
> get object dependencies
> --
> Sincerely,
> John K
> Knowledgy Consulting
> www.knowledgy.org|||Downloaded the tool, got trial expired immediately. interesting product...
I have one of their products, started wondering, how exactly do keep track
of tier licenses etc...
demo video leaves the impression that all it is a gui on top of sp_depends.
I would not buy the product on that video... I mean, no need to get what ms
management studio already has. I do not believe they parse views and
functions from what i have seen so far.
Hope, their sales rep is going to be quick to answer a question of the
existing customer.
--
Thanks, Liliya
"Uri Dimant" wrote:
> Liliya
> I think you need to look at RedGate third party compare product|||the tool tracks dependencies on object level only. not granular enough for my
needs.
--
Thanks, Liliya
"Uri Dimant" wrote:
> Liliya
> I think you need to look at RedGate third party compare product|||RedGate third party compare product - provides only object level dependencies
confirmed by the vendor
"
We use our own parser to build a schema representation. Unfortunately, SQL
Dependency Tracker will only go down to table/view level, it will not show
you the dependencies at column level.
This is something that lots of customers ask us for so when there is
development work planned for SQL Dependency Tracker this will be a seriously
considered feature. However, I do not have any kind of timescale on this.
"
Any other vendors?
Thanks, Liliya|||Investigate CAST. Worked with their stuff about 10 years ago but nothing
came close to their ability to track dependencies. Note that it was an
upper 5 to as much as 7 figure product back then. :-)
--
Kevin G. Boles
Indicium Resources, Inc.
SQL Server MVP
kgboles a earthlink dt net
"Liliya Huff" <LiliyaHuff@.discussions.microsoft.com> wrote in message
news:92770E4B-F9E1-42EB-B68E-6AD50CABA825@.microsoft.com...
> There is a way in management studio 2005 to get dependencies on a databse
> object, to reproduce what it does is not a big deal.
> This report provides object names thwe view or function depends on for me
> ust fine.
> For darta warehouse analysis I need to track down dependencies of a
> particular column / all collumns in the view. And the existing oviews are
> big
> time ugly, pages of code (perform not any nicer either).
> SQL parses a view and builds all the dependencies, but is there a way to
> get
> ahold of that information somehow?
> I mean I have quite a bit of ugly looking views, and the idea of doung it
> by
> hand does not look good, it is one nasty job to be honest.
> I looking for means to automat that e, create a report aout column-column
> dependencies of a view/function.
> Did anyone here do anything similar, knows a tool that does, any other
> ideas are very welcome
> --
> Thanks, Liliya
>
object, to reproduce what it does is not a big deal.
This report provides object names thwe view or function depends on for me
ust fine.
For darta warehouse analysis I need to track down dependencies of a
particular column / all collumns in the view. And the existing oviews are big
time ugly, pages of code (perform not any nicer either).
SQL parses a view and builds all the dependencies, but is there a way to get
ahold of that information somehow?
I mean I have quite a bit of ugly looking views, and the idea of doung it by
hand does not look good, it is one nasty job to be honest.
I looking for means to automat that e, create a report aout column-column
dependencies of a view/function.
Did anyone here do anything similar, knows a tool that does, any other
ideas are very welcome
--
Thanks, LiliyaI'm not sure if I understood your question 100% but here;s my answer anyway,
hope it helps. You can use the system stored procedure called sp_depends to
get object dependencies
--
Sincerely,
John K
Knowledgy Consulting
www.knowledgy.org
Atlanta's Business Intelligence and Data Warehouse Experts
"Liliya Huff" <LiliyaHuff@.discussions.microsoft.com> wrote in message
news:92770E4B-F9E1-42EB-B68E-6AD50CABA825@.microsoft.com...
> There is a way in management studio 2005 to get dependencies on a databse
> object, to reproduce what it does is not a big deal.
> This report provides object names thwe view or function depends on for me
> ust fine.
> For darta warehouse analysis I need to track down dependencies of a
> particular column / all collumns in the view. And the existing oviews are
> big
> time ugly, pages of code (perform not any nicer either).
> SQL parses a view and builds all the dependencies, but is there a way to
> get
> ahold of that information somehow?
> I mean I have quite a bit of ugly looking views, and the idea of doung it
> by
> hand does not look good, it is one nasty job to be honest.
> I looking for means to automat that e, create a report aout column-column
> dependencies of a view/function.
> Did anyone here do anything similar, knows a tool that does, any other
> ideas are very welcome
> --
> Thanks, Liliya
>|||Liliya
I think you need to look at RedGate third party compare product
"Liliya Huff" <LiliyaHuff@.discussions.microsoft.com> wrote in message
news:92770E4B-F9E1-42EB-B68E-6AD50CABA825@.microsoft.com...
> There is a way in management studio 2005 to get dependencies on a databse
> object, to reproduce what it does is not a big deal.
> This report provides object names thwe view or function depends on for me
> ust fine.
> For darta warehouse analysis I need to track down dependencies of a
> particular column / all collumns in the view. And the existing oviews are
> big
> time ugly, pages of code (perform not any nicer either).
> SQL parses a view and builds all the dependencies, but is there a way to
> get
> ahold of that information somehow?
> I mean I have quite a bit of ugly looking views, and the idea of doung it
> by
> hand does not look good, it is one nasty job to be honest.
> I looking for means to automat that e, create a report aout column-column
> dependencies of a view/function.
> Did anyone here do anything similar, knows a tool that does, any other
> ideas are very welcome
> --
> Thanks, Liliya
>|||I can pull object dependencies easy, as I have mentioned before. sp_depends
is one way to do it. tracing what management studio does pulling dependencies
is another way. Both are easy. It does not return the level of detail I need.
view1.columnXYZ depends on object1.column1 and so on, entire dependency tree
under to the last table/function.column
--
Thanks, Liliya
"Knowledgy" wrote:
> I'm not sure if I understood your question 100% but here;s my answer anyway,
> hope it helps. You can use the system stored procedure called sp_depends to
> get object dependencies
> --
> Sincerely,
> John K
> Knowledgy Consulting
> www.knowledgy.org|||Downloaded the tool, got trial expired immediately. interesting product...
I have one of their products, started wondering, how exactly do keep track
of tier licenses etc...
demo video leaves the impression that all it is a gui on top of sp_depends.
I would not buy the product on that video... I mean, no need to get what ms
management studio already has. I do not believe they parse views and
functions from what i have seen so far.
Hope, their sales rep is going to be quick to answer a question of the
existing customer.
--
Thanks, Liliya
"Uri Dimant" wrote:
> Liliya
> I think you need to look at RedGate third party compare product|||the tool tracks dependencies on object level only. not granular enough for my
needs.
--
Thanks, Liliya
"Uri Dimant" wrote:
> Liliya
> I think you need to look at RedGate third party compare product|||RedGate third party compare product - provides only object level dependencies
confirmed by the vendor
"
We use our own parser to build a schema representation. Unfortunately, SQL
Dependency Tracker will only go down to table/view level, it will not show
you the dependencies at column level.
This is something that lots of customers ask us for so when there is
development work planned for SQL Dependency Tracker this will be a seriously
considered feature. However, I do not have any kind of timescale on this.
"
Any other vendors?
Thanks, Liliya|||Investigate CAST. Worked with their stuff about 10 years ago but nothing
came close to their ability to track dependencies. Note that it was an
upper 5 to as much as 7 figure product back then. :-)
--
Kevin G. Boles
Indicium Resources, Inc.
SQL Server MVP
kgboles a earthlink dt net
"Liliya Huff" <LiliyaHuff@.discussions.microsoft.com> wrote in message
news:92770E4B-F9E1-42EB-B68E-6AD50CABA825@.microsoft.com...
> There is a way in management studio 2005 to get dependencies on a databse
> object, to reproduce what it does is not a big deal.
> This report provides object names thwe view or function depends on for me
> ust fine.
> For darta warehouse analysis I need to track down dependencies of a
> particular column / all collumns in the view. And the existing oviews are
> big
> time ugly, pages of code (perform not any nicer either).
> SQL parses a view and builds all the dependencies, but is there a way to
> get
> ahold of that information somehow?
> I mean I have quite a bit of ugly looking views, and the idea of doung it
> by
> hand does not look good, it is one nasty job to be honest.
> I looking for means to automat that e, create a report aout column-column
> dependencies of a view/function.
> Did anyone here do anything similar, knows a tool that does, any other
> ideas are very welcome
> --
> Thanks, Liliya
>
Monday, March 19, 2012
How to tell if a function is called within a trigger
How can I tell whether a function has been called, along with the values that were passed into it? My SQL is generated by Visual Basic, and on an insert, a trigger fires, which then *might* call the function depending on a condition that's difficult to monitor. Ideally, I'd be looking for a simple function that would write to a log, or print a message somewhere. "Print" does not work within functions. I'm running SQL Server 2000.You could create a stored procedure that writes to a log, and then call that stored procedure from the trigger. Kinda messy, but will work.|||
1. Profiler
2. Put code in the trigger that inserts relevant values (funtion input parameters, record IDs) into a table at the point the function would be called. Comment out or remove this code after testing. I routinely do this in Try Catch blocks (or 2000 error handling) of sprocs during dev.
|||You also cannot perform an INSERT to a permanent table in a function. If this is important you might consider upgrading to SQL Server 2005 and using a SET CONTEXT_INFO to save some information. I guess you could call a procedure from the trigger but I am really not sure how much this will buy you -- you are sort-of already in a psedudo procedure since you are in a trigger.
Subscribe to:
Posts (Atom)