Showing posts with label following. Show all posts
Showing posts with label following. Show all posts

Friday, March 30, 2012

load both parent and child into one table!

Hi, how can load both parent and child into one table use the
SQLXMLBulkload.3.0 object like following? Thanks a lot.
Hongtao
<xml>
<ti>date</ti>
<origin>name</origin>
<title>
<titledetail>content</titledetail>
</title>
</xml>
into table
CREATE TABLE Title (
ti VARCHAR (100) NOT NULL ,
origin VARCHAR (100) NOT NULL ,
titledetail VARCHAR (100) NOT NULL )
)
GO
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!
You would create an XSD where the "xml" element maps to a table and "ti",
"origin", and "Titledetail" map to columns. Then set sql:is-constant="true"
on the "title" element. I think that should do it.
Irwin
"henry job" <anonymous@.comcast.com> wrote in message
news:uL7O71LBFHA.3840@.tk2msftngp13.phx.gbl...
>
> Hi, how can load both parent and child into one table use the
> SQLXMLBulkload.3.0 object like following? Thanks a lot.
> Hongtao
> <xml>
> <ti>date</ti>
> <origin>name</origin>
> <title>
> <titledetail>content</titledetail>
> </title>
> </xml>
> into table
> CREATE TABLE Title (
> ti VARCHAR (100) NOT NULL ,
> origin VARCHAR (100) NOT NULL ,
> titledetail VARCHAR (100) NOT NULL )
> )
> GO
>
>
> *** Sent via Developersdex http://www.codecomments.com ***
> Don't just participate in USENET...get rewarded for it!
|||Hi Irwin, thank you very much. I am new with XML. Data xml like
following. Could you post an XSD? thank you very much!!
Hongtao
<xml>
<ti>date</ti>
<origin>name</origin>
<title>
<titleid>id</titleid>
<titledetail>content</titledetail>
</title>
</xml>
into table
CREATE TABLE Title (
ti VARCHAR (100) NOT NULL ,
origin VARCHAR (100) NOT NULL ,
titledetail VARCHAR (100) NOT NULL )
)
GO
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!
|||I believe it would be something like:
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:sql="urn:schemas-microsoft-com:mapping-schema">
<xsd:element name="xml" sql:relation="foo" >
<xsd:complexType>
<xsd:sequence>
<xsd:element name="ti" sql:field="bar1" />
<xsd: element name="origin" sql:field="bar2"/>
<xsd:element name="title" sql:is-constant="true">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="titleid" sql:field="bar3"/>
<xsd:element name="titledetail" sql:field="bar4"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
You would have to change "foo" to the table name and "bar" 1-4 to column
names, and may need to / want to add data type info.
"henry job" <anonymous@.comcast.com> wrote in message
news:ucJe2XOBFHA.3524@.TK2MSFTNGP15.phx.gbl...
> Hi Irwin, thank you very much. I am new with XML. Data xml like
> following. Could you post an XSD? thank you very much!!
> Hongtao
> <xml>
> <ti>date</ti>
> <origin>name</origin>
> <title>
> <titleid>id</titleid>
> <titledetail>content</titledetail>
> </title>
> </xml>
> into table
> CREATE TABLE Title (
> ti VARCHAR (100) NOT NULL ,
> origin VARCHAR (100) NOT NULL ,
> titledetail VARCHAR (100) NOT NULL )
> )
> GO
>
> *** Sent via Developersdex http://www.codecomments.com ***
> Don't just participate in USENET...get rewarded for it!
|||Hi Irwin, thank you very much.
Hongta
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!
|||I've looked *everywhere* for something like this, and this is the best
example ever!
KB Article 316005 should include this information.
Chris Leiter
MCSE CCNA MCT MCDST MCSA
"Irwin Dolobowsky [MS]" wrote:

> I believe it would be something like:
> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:sql="urn:schemas-microsoft-com:mapping-schema">
> <xsd:element name="xml" sql:relation="foo" >
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element name="ti" sql:field="bar1" />
> <xsd: element name="origin" sql:field="bar2"/>
> <xsd:element name="title" sql:is-constant="true">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element name="titleid" sql:field="bar3"/>
> <xsd:element name="titledetail" sql:field="bar4"/>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
>
> You would have to change "foo" to the table name and "bar" 1-4 to column
> names, and may need to / want to add data type info.
>
> "henry job" <anonymous@.comcast.com> wrote in message
> news:ucJe2XOBFHA.3524@.TK2MSFTNGP15.phx.gbl...
>
>
sql

load both parent and child into one table!


Hi, how can load both parent and child into one table use the
SQLXMLBulkload.3.0 object like following? Thanks a lot.
Hongtao
<xml>
<ti>date</ti>
<origin>name</origin>
<title>
<titledetail>content</titledetail>
</title>
</xml>
into table
CREATE TABLE Title (
ti VARCHAR (100) NOT NULL ,
origin VARCHAR (100) NOT NULL ,
titledetail VARCHAR (100) NOT NULL )
)
GO
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!You would create an XSD where the "xml" element maps to a table and "ti",
"origin", and "Titledetail" map to columns. Then set sql:is-constant="true"
on the "title" element. I think that should do it.
Irwin
"henry job" <anonymous@.comcast.com> wrote in message
news:uL7O71LBFHA.3840@.tk2msftngp13.phx.gbl...
>
> Hi, how can load both parent and child into one table use the
> SQLXMLBulkload.3.0 object like following? Thanks a lot.
> Hongtao
> <xml>
> <ti>date</ti>
> <origin>name</origin>
> <title>
> <titledetail>content</titledetail>
> </title>
> </xml>
> into table
> CREATE TABLE Title (
> ti VARCHAR (100) NOT NULL ,
> origin VARCHAR (100) NOT NULL ,
> titledetail VARCHAR (100) NOT NULL )
> )
> GO
>
>
> *** Sent via Developersdex http://www.examnotes.net ***
> Don't just participate in USENET...get rewarded for it!|||Hi Irwin, thank you very much. I am new with XML. Data xml like
following. Could you post an XSD? thank you very much!!
Hongtao
<xml>
<ti>date</ti>
<origin>name</origin>
<title>
<titleid>id</titleid>
<titledetail>content</titledetail>
</title>
</xml>
into table
CREATE TABLE Title (
ti VARCHAR (100) NOT NULL ,
origin VARCHAR (100) NOT NULL ,
titledetail VARCHAR (100) NOT NULL )
)
GO
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!|||I believe it would be something like:
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:sql="urn:schemas-microsoft-com:mapping-schema">
<xsd:element name="xml" sql:relation="foo" >
<xsd:complexType>
<xsd:sequence>
<xsd:element name="ti" sql:field="bar1" />
<xsd: element name="origin" sql:field="bar2"/>
<xsd:element name="title" sql:is-constant="true">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="titleid" sql:field="bar3"/>
<xsd:element name="titledetail" sql:field="bar4"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
You would have to change "foo" to the table name and "bar" 1-4 to column
names, and may need to / want to add data type info.
"henry job" <anonymous@.comcast.com> wrote in message
news:ucJe2XOBFHA.3524@.TK2MSFTNGP15.phx.gbl...
> Hi Irwin, thank you very much. I am new with XML. Data xml like
> following. Could you post an XSD? thank you very much!!
> Hongtao
> <xml>
> <ti>date</ti>
> <origin>name</origin>
> <title>
> <titleid>id</titleid>
> <titledetail>content</titledetail>
> </title>
> </xml>
> into table
> CREATE TABLE Title (
> ti VARCHAR (100) NOT NULL ,
> origin VARCHAR (100) NOT NULL ,
> titledetail VARCHAR (100) NOT NULL )
> )
> GO
>
> *** Sent via Developersdex http://www.examnotes.net ***
> Don't just participate in USENET...get rewarded for it!|||Hi Irwin, thank you very much.
Hongta
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!|||I've looked *everywhere* for something like this, and this is the best
example ever!
KB Article 316005 should include this information.
Chris Leiter
MCSE CCNA MCT MCDST MCSA
"Irwin Dolobowsky [MS]" wrote:

> I believe it would be something like:
> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:sql="urn:schemas-microsoft-com:mapping-schema">
> <xsd:element name="xml" sql:relation="foo" >
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element name="ti" sql:field="bar1" />
> <xsd: element name="origin" sql:field="bar2"/>
> <xsd:element name="title" sql:is-constant="true">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element name="titleid" sql:field="bar3"/>
> <xsd:element name="titledetail" sql:field="bar4"/>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
>
> You would have to change "foo" to the table name and "bar" 1-4 to column
> names, and may need to / want to add data type info.
>
> "henry job" <anonymous@.comcast.com> wrote in message
> news:ucJe2XOBFHA.3524@.TK2MSFTNGP15.phx.gbl...
>
>

Monday, March 26, 2012

Loack during dimension processing

Hello!

I recieve the following error message when processing dimensions in a scheduled dts package:

Description: Processing within a transaction
Step Error code: 80040024
Step Error Help File:
Step Error Help Context ID:1000440

To me it seems like the dimensions are locked by another task, probably a cube processing.
The strange thing is that I have dependencies in my dts package, so that the cube processing shouldn't start until the dimensions are processed and every dimension comes from different tables.

Anyone with similar problems? Any suggestions for further error searching?

Grateful for every info!Can you run the dts interactively?|||Yes, never any problem with that...

Live Onecare subscription lost

Hi

I got the following error message when I make a new integration service project

Failed to save package file "C:\Documents and Settings\Administrator\Local Settings\Temp\1\tmp2B.tmp" with error 0x80040155 "Interface not registered".
Can someone help

MeHi there,

This looks like a setup issue. Did you have a prior build of SQL/VS 2005 on the machine? If so, likely the machine wasn't cleaned up prior to setting up.

regards,
ash|||I also am getting this error.
I upgraded from VS 2005 Beta 2 to VS 2005 RC, but I followed all recommended uninstallation steps prior to installing VS 2005 RC.
So what can I do about this?
Will it help at all to completely uninstall VS 2005 RC and then reinstall it?
I've already tried repairing VS 2005 RC, but it didn't make any difference.
Thanks,
Dyvim|||Try registering MSXML:

regsvr32 msxml3.dll
regsvr32 msxml6.dll|||Thanks, this worked also for me|||Thanks but how do I do this, how do I register MSXML?|||

Just run these two commands from the command prompt:

regsvr32 msxml3.dll
regsvr32 msxml6.dll

|||yes it works for me too. Thanks.|||

I got the same issue, it also works for me.

Thank you so much!

|||

Hi-Thank you for the info. When I ran the 1st command regsvr32 msxml3.dll, it went fine. The 2nd command regsvr32 msxml6.dll told me "The specific module could not be found" I am getting errors like: Interface not registered (when I try to print), No such interface supported (when I tried to contact NoAdware for online support). Also, get same message when I try to go into a game room on Yahoo games. Please note: I just did a scan to remove adware and spyware.

Thanks in advance for any help you can give me,

Corinne

|||

It looks like the software you used to "remove adware and spyware" removed much more - apparently it deleted msxml6.dll (which is installed with SQL Server 2005) and probably some interface registrations.

I would recommend reformatting and reinstalling this machine and avoiding this antispyware program in the future.

|||

Hi, I have the exact same problem but it is when I try to burn a cd using Win Media Player 10. I tried registering the .dll's, but since I don't have the SQL 2005 installed in my machine, the regsvr32 msxml6.dll gives me the same error message. I see that this forum is mainly for SQL but if anybody knows what I can do, it would be appreciated.

Thanks,

Jason

|||

Hi there, di you get a reply to your query as I am experiencing the same problem. Please e-mail me & let me know. Many thanks

|||

Guys, there are thousands of interfaces registered on a typical Windows box. The error can be caused by missing registration of any of them.

We've found that particular problem ("Interface not registered" error when creating new SSIS project) is usually caused by incorrectly registered msxml dlls - my reply above describes how to fix it.

Regarding other applications - like media player, etc - there is no common answer, and you should be looking at the support forums for particular application.

|||

Quote 'I would recommend reformatting and reinstalling this machine and avoiding this antispyware program in the future.'

If I had to re-format every time something is not registering in Windows - that would be all I would be doing -Re-formatting...

Would re-installing SQL fix the problem.

Dan.

sql

Friday, March 23, 2012

Little puzzle on data selection

I have the following data (very simplified version)

TransactionId Agent_Code
---- ----
191462 95328C
205427 000024C
205427 75547C

Agent Code 75547C is a corporate agent. The others are not. I have a
list of corporate codes so I can query against it, BUT what I want to
do is...

Return a unique TransactionId and max of the AgentCode, but if the
Agent is a corporate agent, I need to return max of the corporate agent
codes. We can have multiple agents against the transaction and
sometimes have a mix of corporate and none corporate agents. What we
need to do is see the corporate adviser if there is one. I only want 1
record per TransactionId.

We derive more data (sales hierarchy) from this, so are not interested
in anything other than the maximum, but need to know if it was
corporate which therefore gives me a different hierarchy later.

Ideally I want to do this in a view and not use an SP. I can then use
this in my main view. If I have to resort to an SP, then so be it, but
I would appreciate any helpful comments (or even better, the answer)
Thanks

Ryan"Ryan" <ryanofford@.hotmail.com> wrote in message
news:1101996460.738947.289740@.z14g2000cwz.googlegr oups.com...
> I have the following data (very simplified version)
> TransactionId Agent_Code
> ---- ----
> 191462 95328C
> 205427 000024C
> 205427 75547C
> Agent Code 75547C is a corporate agent. The others are not. I have a
> list of corporate codes so I can query against it, BUT what I want to
> do is...
> Return a unique TransactionId and max of the AgentCode, but if the
> Agent is a corporate agent, I need to return max of the corporate agent
> codes. We can have multiple agents against the transaction and
> sometimes have a mix of corporate and none corporate agents. What we
> need to do is see the corporate adviser if there is one. I only want 1
> record per TransactionId.

I would think something like (Obviously untested):

--No Corp Agent
Select TransactionID, Max(Agent_Code) from Transtable a where NOT
EXIST(select * from TransTable b inner join CorpAgents c on b.Agent_Code =
c.Agent_Code where b.TransactionID = a.TransactionID)

UNION ALL
--Corp Agent
Select TransactionID, Max(Agent_Code) from TransTable a inner join
CorpAgents c on a.Agent_Code = c.Agent_Code

Good Luck

Jim|||[posted and mailed, please reply in news]

Ryan (ryanofford@.hotmail.com) writes:
> Return a unique TransactionId and max of the AgentCode, but if the
> Agent is a corporate agent, I need to return max of the corporate agent
> codes. We can have multiple agents against the transaction and
> sometimes have a mix of corporate and none corporate agents. What we
> need to do is see the corporate adviser if there is one. I only want 1
> record per TransactionId.

SELECT TransactionID, coalesce(maxcorp, maxanyone)
FROM (SELECT t.TransactionID, maxanyone = MAX(t.AgentCode),
maxanyone = MAX(a.AgentCode)
FROM transactions t
LEFT JOIN agents a ON t.AgentCode = a.AgentCode
GROUP BY t.TransactionID)

And as you surely know, had you included CREATE TABLE, INSERT and expected
output, the solution would have been tested. Now it's not.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Thanks ! Will give this a try.

Erland Sommarskog <esquel@.sommarskog.se> wrote in message news:<Xns95B3F3141F310Yazorman@.127.0.0.1>...
> [posted and mailed, please reply in news]
> Ryan (ryanofford@.hotmail.com) writes:
> > Return a unique TransactionId and max of the AgentCode, but if the
> > Agent is a corporate agent, I need to return max of the corporate agent
> > codes. We can have multiple agents against the transaction and
> > sometimes have a mix of corporate and none corporate agents. What we
> > need to do is see the corporate adviser if there is one. I only want 1
> > record per TransactionId.
> SELECT TransactionID, coalesce(maxcorp, maxanyone)
> FROM (SELECT t.TransactionID, maxanyone = MAX(t.AgentCode),
> maxanyone = MAX(a.AgentCode)
> FROM transactions t
> LEFT JOIN agents a ON t.AgentCode = a.AgentCode
> GROUP BY t.TransactionID)
> And as you surely know, had you included CREATE TABLE, INSERT and expected
> output, the solution would have been tested. Now it's not.|||>> Return a unique transaction_id and max of the agent_code, but if
the agent is a corporate agent, I need to return max of the corporate
agent codes. <<

Just for fun, try this version:

CREATE VIEW CorpTrans (transaction_id, agent_code)
AS
SELECT transaction_id,
COALESCE(
MAX(CASE WHEN T1.agent_code IN (SELECT agent_code FROM
CorpAgents)
THEN T1.agent_code ELSE NULL END) -- corp_agent,
MAX(CASE WHEN T1.agent_code NOT IN (SELECT agent_code FROM
CorpAgents)
THEN T1.agent_code ELSE NULL END) -- non_corp_agent
) AS agent_code
FROM Transactions AS T1
GROUP BY Transaction_id;

You could also drop the COALESCE (), if it would be more useful to see
both kinds of agents. id the number of corporate agents is small enugh
to fit into main storage, this might actually be a good way to do it!sql

Wednesday, March 21, 2012

listbox selected values

Hi. With VWD i've produced the following code.
<asp:SqlDataSourceID="SqlDataSource2"runat="server"ConnectionString="<%$ ConnectionStrings:50469ConnectionString %>"SelectCommand="SELECT * FROM [ibs] WHERE ([liedID] = @.liedID)">
<SelectParameters>
<asp:ControlParameterControlID="ListBox1"Name="liedID"PropertyName="SelectedValue"Type="Int16"/>
But the query is only returning one row of the table. Even when multiple values were selected in the ListBox1. Could someone tell me how to do?
Thanks, Kin Wei.

That's not really an easy thing to do. There are a number of "issues" to work around.
1) The WHERE clause would need to be changed to an equate to something like IN.
2) Using IN, you can't use a parameter to represent a list of values.
3) There is no way to get the list control to give you a comma delimited list of selected values.
You can get around the #2 issue by dynamically creating an executing SQL using the EXEC command like this:
DECLARE @.sql varchar(8000)
SET @.sql = 'SELECT * FROM ibs WHERE liedID IN (' + @.liedID + ')'
EXEC(@.sql)
You can get around #3 by building the string yourself by:
1)Use autopostbacks to keep track of the selected values, and store them in a hidden field or a session variable as a comma delimited string.
or
2)On postback, get the list of selectedindexes via listbox1.GetSelectedIndices like this:
dim mystring as string=""
for each x as Integer in listbox1.GetSelectedIndices
mystring &= ",'" & cstr(Listbox1.Items(x).Value) & "'"
next
mystring=mystring.trim(",")
HiddenField.text=mystring
|||Thanks for your post. But I'm not really good at this. Where in the code do I have to make the EXEC command?
<%@. Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:t ="urn:schemas-microsoft-com:time">
<head runat="server">
<?import namespace="t"
implementation="#default#time2">
<style>
.time {behavior: url(#default#time2);}
</style>
<title>IBSTEST</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Panel ID="Panel1" runat="server" Height="50px" Width="125px" Visible="true">
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:50469ConnectionString %>"
SelectCommand="SELECT * FROM [ibs] ORDER BY [liedTitel]"></asp:SqlDataSource>
<asp:ListBox ID="ListBox1" runat="server" DataSourceID="SqlDataSource2" DataTextField="liedTitel"
DataValueField="liedID" Font-Names="Arial" Font-Size="X-Small" Height="300px"
SelectionMode="Multiple" Width="350px"></asp:ListBox><br />
<br />
<asp:Button ID="Button1" runat="server" Text="Play" OnClick="Button1_Click" Height="25px" Width="75px" /></asp:Panel>
<br />
<asp:Panel ID="Panel2" runat="server" Height="50px" Width="349px" Visible="false">
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:50469ConnectionString %>"
SelectCommand="SELECT * FROM [ibs] WHERE ([liedID] = @.liedID) ORDER BY NEWID()">
<SelectParameters>
<asp:ControlParameter ControlID="ListBox1" Name="liedID" PropertyName="SelectedValue"
Type="Int16" />
</SelectParameters>
</asp:SqlDataSource>
<asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1">
<HeaderTemplate>
<t:seq repeatCount="1">
</HeaderTemplate>
<ItemTemplate>
<t:par>
<t:audio dur='<%# DataBinder.Eval(Container.DataItem, "liedDuur") %>s' src='<%# DataBinder.Eval(Container.DataItem, "liedID") %><%# DataBinder.Eval(Container.DataItem, "liedExtensie") %>' type='<%# DataBinder.Eval(Container.DataItem, "liedType") %>' />
<div dur='<%# DataBinder.Eval(Container.DataItem, "liedDuur") %>s' class="time" timeAction="display">
Titel: <%# DataBinder.Eval(Container.DataItem, "liedTitel") %><br />
Artiest: <%# DataBinder.Eval(Container.DataItem, "liedArtiest") %></div>
<img dur='<%# DataBinder.Eval(Container.DataItem, "liedDuur") %>s' class="time" timeAction="display" src='<%# DataBinder.Eval(Container.DataItem, "liedImage") %>.jpg' />
</t:par>
</ItemTemplate>
<FooterTemplate>
</t:seq>
</FooterTemplate>
</asp:Repeater>
<br />
<br />
<asp:Button ID="Button2" runat="server" Height="25px" OnClick="Button2_Click" Text="Stop"
Width="75px" /></asp:Panel>
<br />
</div>
</form>
</body>
</html>
and the .cs code is
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
Panel1.Visible = false;
Panel2.Visible = true;
}
protected void Button2_Click(object sender, EventArgs e)
{
Panel1.Visible = true;
Panel2.Visible = false;
}
}
After your post, I think it's clear what have to be done. But I don't know where to put the code.
Thank you very much,
Kin Wei

Monday, March 12, 2012

List page breaks problem

Hi,
I have set up a simple report containing a list region.
Within the list I have the following components :
TextBox1 : "Page1"
Rectangle :
TextBox2 : "Page2"
Rectangle
TextBox3 : "Page3"
Page Footer contains a textbox with "Footer Text"
I have selected the "page break after" checkbox on each of the rectangles.
The above renders in the preview window in visual studio as one page, with
one occurrence of "Footer text".
The page breaks seam to be ignored. How can I achieve the desired affect ?Hi woodgnome,
Thank you for your post!
I am not sure why you use the rectangle in the list region. If you move all
the rectangle out of the list, you could achieve the desired affect.
Please try this and if you have any further quesions, please feel free to
let me know.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Wei Lu,
I have included it in a list because I have a more complicated scenario
where I want to repeat this behaviour for each row in a dataset. If I remove
the items in the list how would I achieve this ?
It seams quite a straightforward example that should work ? Is this a known
bug ?
"Wei Lu" wrote:
> Hi woodgnome,
> Thank you for your post!
> I am not sure why you use the rectangle in the list region. If you move all
> the rectangle out of the list, you could achieve the desired affect.
> Please try this and if you have any further quesions, please feel free to
> let me know.
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
> ==================================================> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ==================================================> This posting is provided "AS IS" with no warranties, and confers no rights.
>|||Hi woodgnome,
To resolve this issue, you could send your report RDL file to me. I will
check it and try to find is there further suggestions I could provide.
My direct email address is weilu@.ONLINE.microsoft.com ( Please remove the
ONLINE when you send the email ), you may send the file to me directly and
I will keep secure.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||How are you viewing the report? Just in the default "Preview" or as
the "Print Preview" or have you exported it out to PDF or some other
format? If you're just clicking Preview and then View Report, try
doing some of the other viewing options and see what you get. The
basic Preview view returns HTML and sometimes you just don't get an
accurate pagebreak rendering in that format.
You also might want to try using the Table tool instead of the
Rectangle (if that's feasible in your report). While breakbreak
control seems to be consistently the weakest part of SSRS, I have
pretty good luck with Tables.|||Can you tell me what the solution of this problem is.
I have the same issue, I want a page break after each list-item. But the
recrangle that should achieve this doesn't workt.
Thanks
"Woodgnome" wrote:
> Hi,
> I have set up a simple report containing a list region.
> Within the list I have the following components :
> TextBox1 : "Page1"
> Rectangle :
> TextBox2 : "Page2"
> Rectangle
> TextBox3 : "Page3"
> Page Footer contains a textbox with "Footer Text"
> I have selected the "page break after" checkbox on each of the rectangles.
> The above renders in the preview window in visual studio as one page, with
> one occurrence of "Footer text".
> The page breaks seam to be ignored. How can I achieve the desired affect ?
>|||Hi Antoon,
I don't think you could do this directly. I suggest you to group your item
and then use the page break after the Group.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Indeed, that fixes the problem,
Thank you very much
"Wei Lu" wrote:
> Hi Antoon,
> I don't think you could do this directly. I suggest you to group your item
> and then use the page break after the Group.
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
> ==================================================> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ==================================================> This posting is provided "AS IS" with no warranties, and confers no rights.
>

Wednesday, March 7, 2012

List of data mining techniques not populated - BI Studio hangs

Hello

I am having the same problem and it is very frustating because I have just reinstalled the OS. I am following the Data Mining tutorial and when it comes to the part of creating a mining structure, the combo box of available algorithms hangs and therefore I cannot continue. I would have expected that a fresh installation would not have such a problem.

My environment is:
- OS: Windows XP Professional SP2 with all the updates (fresh installation)
- SQL Server 2005 and Analysis Server 2005 SP2 Developer Edition (fresh installation, running on my machine -not a network service)
- Running Services: SQL Server, AS, SQL Browser (default instances, not-named)
- Visual Studio 2005 Pro SP1
- Available protocols: Share Memory, Named Pipes, TCP/IP
- Machine: Dell Laptop, Centrino Duo 1.66Ghz with 1Gb RAM.

What can I do to prevent this from happening, besides reinstalling the OS or the SQL Server?

Thanks a lot for your help.

Ernesto que tal!!

Rojo

|||

Escribeme cuando puedas a juanbarco@.gmail.com

Rojo

List of data mining techniques not populated - BI Studio hangs

Hello

I am having the same problem and it is very frustating because I have just reinstalled the OS. I am following the Data Mining tutorial and when it comes to the part of creating a mining structure, the combo box of available algorithms hangs and therefore I cannot continue. I would have expected that a fresh installation would not have such a problem.

My environment is:
- OS: Windows XP Professional SP2 with all the updates (fresh installation)
- SQL Server 2005 and Analysis Server 2005 SP2 Developer Edition (fresh installation, running on my machine -not a network service)
- Running Services: SQL Server, AS, SQL Browser (default instances, not-named)
- Visual Studio 2005 Pro SP1
- Available protocols: Share Memory, Named Pipes, TCP/IP
- Machine: Dell Laptop, Centrino Duo 1.66Ghz with 1Gb RAM.

What can I do to prevent this from happening, besides reinstalling the OS or the SQL Server?

Thanks a lot for your help.

Ernesto que tal!!

Rojo

|||

Escribeme cuando puedas a juanbarco@.gmail.com

Rojo

Friday, February 24, 2012

List in order

Say I have a table with the following files in them but not sorted and I
wanted to sort them in order like these based on the timestamp part of it.
How can I do so ?
DB1_tlog_200503122235.TRN
DB1_tlog_200503122240.TRN
DB1_tlog_200503122245.TRN
DB1_tlog_200503122250.TRN
DB1_tlog_200503122255.TRN
DB1_tlog_200503122300.TRN
DB1_tlog_200503122305.TRN
DB1_tlog_200503122310.TRN
DB1_tlog_200503122315.TRN
I think we need to find the datetime portion and that would be before the
".trn" and after the "_tlog_"
And then be able to sort the string "200503122235" which represents
2005-03-12 22:35 .. How can I do this ?
ThanksHassan
drop table #tEST
CREATE TABLE #Test
(
col VARCHAR(50) NOT NULL
)
INSERT INTO #Test VALUES ('200503122235')
INSERT INTO #Test VALUES ('200503122138')
INSERT INTO #Test VALUES ('200503121845')
INSERT INTO #Test VALUES ('200503122125')
INSERT INTO #Test VALUES ('200503122030')
INSERT INTO #Test VALUES ('200503122430')
SELECT *
FROM #Test
ORDER BY CONVERT(DATETIME,LEFT(col,4)+SUBSTRING(c
ol,5,2)+
SUBSTRING(col,8,2)+'
'+REPLACE(SUBSTRING(col,9,2),'24','00')+
':'+SUBSTRING(col,11,2) ,112)
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:u1$UWDGKFHA.2796@.tk2msftngp13.phx.gbl...
> Say I have a table with the following files in them but not sorted and I
> wanted to sort them in order like these based on the timestamp part of it.
> How can I do so ?
> DB1_tlog_200503122235.TRN
> DB1_tlog_200503122240.TRN
> DB1_tlog_200503122245.TRN
> DB1_tlog_200503122250.TRN
> DB1_tlog_200503122255.TRN
> DB1_tlog_200503122300.TRN
> DB1_tlog_200503122305.TRN
> DB1_tlog_200503122310.TRN
> DB1_tlog_200503122315.TRN
> I think we need to find the datetime portion and that would be before the
> ".trn" and after the "_tlog_"
> And then be able to sort the string "200503122235" which represents
> 2005-03-12 22:35 .. How can I do this ?
> Thanks
>|||"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:u1$UWDGKFHA.2796@.tk2msftngp13.phx.gbl...
> Say I have a table with the following files in them but not sorted and I
> wanted to sort them in order like these based on the timestamp part of it.
> How can I do so ?
> DB1_tlog_200503122235.TRN
> DB1_tlog_200503122240.TRN
> DB1_tlog_200503122245.TRN
> DB1_tlog_200503122250.TRN
> DB1_tlog_200503122255.TRN
> DB1_tlog_200503122300.TRN
> DB1_tlog_200503122305.TRN
> DB1_tlog_200503122310.TRN
> DB1_tlog_200503122315.TRN
> I think we need to find the datetime portion and that would be before the
> ".trn" and after the "_tlog_"
> And then be able to sort the string "200503122235" which represents
> 2005-03-12 22:35 .. How can I do this ?
If all of the filenames have the same prefix and extension, and all use the
above format for the date/time part, then it's simply a case of ordering the
results by that column. The date/time formatting is already fine for
sorting, so there's no need to convert it to a real date/time.
Dan

List availables tables

How to list available tables in a database using an sql
statement?
The following code does not work with ms-sql:
select table_name from user_tables;SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES
"joey32" <joey32@.total.net> wrote in message
news:03ee01c3471f$7fa45420$a301280a@.phx.gbl...
> How to list available tables in a database using an sql
> statement?
> The following code does not work with ms-sql:
> select table_name from user_tables;
>|||i tried with your query, but i get 'table sysobjets not
recognized' from Access.
by the same time, i found a another query that looks like
the same style:
SELECT MSysObjects.Name
FROM MSysObjects
WHERE (((MSysObjects.Type)=1 Or (MSysObjects.Type)=5) AND
((Left([name],4))<>"Msys"))
ORDER BY MSysObjects.Name;
but again i get an error from ms-access:
>> Records can not be read, no read permission on
MSysObjects
by the way, i'm queying via odbc with sql statements, if
that might help you
>--Original Message--
>select name from sysobjects where type='U'. This will
>give you all the names of the tables present in the
>database. Make sure you are in the database in which you
>want to run the query.
>HTH
>>--Original Message--
>>How to list available tables in a database using an sql
>>statement?
>>The following code does not work with ms-sql:
>>select table_name from user_tables;
>>
>>.
>.
>|||When were you planning on mentioning you're using Access? You said sql,
ms-sql, etc.
Try SELECT * FROM MSysObjects or SELECT * FROM MSSysObjects (forget
which)...
"joey32" <joey32@.total.net> wrote in message
news:044301c34725$1c648e60$a301280a@.phx.gbl...
> i get this following message when executing the request:
> >> Could not find '...\INFORMATION_SCHEMA.mdb"
> and that's all i have.
> >--Original Message--
> >SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES
> >
> >
> >
> >"joey32" <joey32@.total.net> wrote in message
> >news:03ee01c3471f$7fa45420$a301280a@.phx.gbl...
> >> How to list available tables in a database using an sql
> >> statement?
> >>
> >> The following code does not work with ms-sql:
> >> select table_name from user_tables;
> >>
> >>
> >
> >
> >.
> >|||Well, look at the other thread in same post, information is
there, but i might be not very visible to you, sorry for
that mistake.
I runned the query and get this error:
>> no read access to 'MSysObjets' table
by the way, i am quering via odbc using sql statements on a
ms-access database, i think version is 2002 (xp).
so how to i get the MSysObjets table visible for read
access?
>--Original Message--
>When were you planning on mentioning you're using Access?
You said sql,
>ms-sql, etc.
>Try SELECT * FROM MSysObjects or SELECT * FROM
MSSysObjects (forget
>which)...
>
>
>
>"joey32" <joey32@.total.net> wrote in message
>news:044301c34725$1c648e60$a301280a@.phx.gbl...
>> i get this following message when executing the request:
>> >> Could not find '...\INFORMATION_SCHEMA.mdb"
>> and that's all i have.
>> >--Original Message--
>> >SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES
>> >
>> >
>> >
>> >"joey32" <joey32@.total.net> wrote in message
>> >news:03ee01c3471f$7fa45420$a301280a@.phx.gbl...
>> >> How to list available tables in a database using an
sql
>> >> statement?
>> >>
>> >> The following code does not work with ms-sql:
>> >> select table_name from user_tables;
>> >>
>> >>
>> >
>> >
>> >.
>> >
>
>.
>|||I got this answer from another ms-access forum wich is
exactly what i was looking for.
It might help somebody.
Thanks for your help.
----
Look in the MSysObjects table (tools|options| check system
objects). You
don't have to unhide the table to run the query, but it
wouldn't hurt for
you to poke around those tables to see what info is
available. Native
access tables are type 1. Attached access tables are type
6.
Select name, type from msysobjects where type = 1 or type
= 6
Richard Bernstein
"swat42" <swat42@.bit.com> wrote in
news:ETjPa.16788$Tx.811910@.news20.bellglobal.com:
> How to list available tables in a db by their table name
with an sql
> query?
> The following piece of code don't work:
> select table_name from user_tables;
>|||Thanks a lot but it's not MS-Access forum (it's MS SQL Server one) so I
don't think this might help anyone here
"joey32" <joey32@.total.net> wrote in message
news:057d01c3473a$0fc65fc0$a301280a@.phx.gbl...
> I got this answer from another ms-access forum wich is
> exactly what i was looking for.
> It might help somebody.

List available SQL servers in VB.Net

Hi,
I want to list all available SQL servers in the LAN in my VB.Net application
.
Therefore I use SQLDMO and the following code:
Private SQLServerDMOApp As New SQLDMO.Application
Sub SomeSub
SQLServerDMOApp = New SQLDMO.Application
....
' get available servers
Dim nl As SQLDMO.NameList
nl = SQLServerDMOApp.ListAvailableSQLServers
Dim i As Integer
For i = 1 To nl.Count
MsgForm.ComboBox_Servername.Items.Add(nl.Item(i))
Next
...
End Sub
The problem is, that the SQL server name list contains only (local) and not
the other available server names (which are available as can be verified in
Enterprise Manager).
Can anybody give me a hint! Thanks in advance.
Best regards
HenryHere's a very quick way to do it in C#, you can translate it...
Create a new console application, and add this reference:
Project | Add Reference | COM | Microsoft SQLDMO Object Library
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
SQLDMO.Application sqlDmoApplication = new SQLDMO.Application();
SQLDMO.NameList serverList;
serverList = sqlDmoApplication.ListAvailableSQLServers();
foreach(string serverName in serverList)
{
Console.WriteLine(serverName);
}
}
}
}
That's it... now, as others might mention, this isn't 100% accurate, because
some servers in your network may be "hidden," and the service also has to be
started to be detected this way.
"Henry" <henryoneal@.nospam.nospam> wrote in message
news:2FFDB242-B974-4446-9B6B-414D3EC570CC@.microsoft.com...
> Hi,
> I want to list all available SQL servers in the LAN in my VB.Net
> application.
> Therefore I use SQLDMO and the following code:
> Private SQLServerDMOApp As New SQLDMO.Application
> Sub SomeSub
> SQLServerDMOApp = New SQLDMO.Application
> ....
> ' get available servers
> Dim nl As SQLDMO.NameList
> nl = SQLServerDMOApp.ListAvailableSQLServers
> Dim i As Integer
> For i = 1 To nl.Count
> MsgForm.ComboBox_Servername.Items.Add(nl.Item(i))
> Next
> ...
> End Sub
> The problem is, that the SQL server name list contains only (local) and
> not
> the other available server names (which are available as can be verified
> in
> Enterprise Manager).
> Can anybody give me a hint! Thanks in advance.
> Best regards
> Henry|||On Mon, 19 Sep 2005 03:48:04 -0700, "Henry" <henryoneal@.nospam.nospam> wrote
:
in <2FFDB242-B974-4446-9B6B-414D3EC570CC@.microsoft.com>

>Hi,
>I want to list all available SQL servers in the LAN in my VB.Net applicatio
n.
>Therefore I use SQLDMO and the following code:
>Private SQLServerDMOApp As New SQLDMO.Application
>Sub SomeSub
> SQLServerDMOApp = New SQLDMO.Application
>....
> ' get available servers
> Dim nl As SQLDMO.NameList
> nl = SQLServerDMOApp.ListAvailableSQLServers
> Dim i As Integer
> For i = 1 To nl.Count
> MsgForm.ComboBox_Servername.Items.Add(nl.Item(i))
> Next
>...
>End Sub
>The problem is, that the SQL server name list contains only (local) and not
>the other available server names (which are available as can be verified in
>Enterprise Manager).
>Can anybody give me a hint! Thanks in advance.
>Best regards
>Henry
If you have any type of firewall running that interferes with communications
even for a fraction of a second, you will see only local instances and named
instances will appear as the server name absent the instance name.
Stefan Berglund|||Hello Henry,
The following KB describs the similar method. However, it may have issues
with MSDE instances
287737 INF: How to Enumerate Available SQL Servers Using SQLDMO
http://support.microsoft.com/?id=287737
If so, you may want to work around this by using the NetAPI function
NetServerEnum, looking for a
server type of SV_TYPE_SQLSERVER.
Also, you could list servers by using "osql -L " command.
Best Regards,
Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
========================================
=============
This posting is provided "AS IS" with no warranties, and confers no rights.
| From: Stefan Berglund <keepit@.in.thegroups>
| Subject: Re: List available SQL servers in VB.Net
| Date: Mon, 19 Sep 2005 10:01:37 -0700
| Message-ID: <d8rti1tud8ndlvbne5gbkb8f6vml553peq@.4ax.com>
| References: <2FFDB242-B974-4446-9B6B-414D3EC570CC@.microsoft.com>
| X-Newsreader: Forte Agent 3.1/32.783
| MIME-Version: 1.0
| Content-Type: text/plain; charset=us-ascii
| Content-Transfer-Encoding: 7bit
| Newsgroups: microsoft.public.sqlserver.programming
| NNTP-Posting-Host: pool-71-108-242-232.lsanca.dsl-w.verizon.net
71.108.242.232
| Lines: 1
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.programming:119288
| X-Tomcat-NG: microsoft.public.sqlserver.programming
|
| On Mon, 19 Sep 2005 03:48:04 -0700, "Henry" <henryoneal@.nospam.nospam>
wrote:
| in <2FFDB242-B974-4446-9B6B-414D3EC570CC@.microsoft.com>
|
| >Hi,
| >
| >I want to list all available SQL servers in the LAN in my VB.Net
application.
| >
| >Therefore I use SQLDMO and the following code:
| >
| >Private SQLServerDMOApp As New SQLDMO.Application
| >
| >Sub SomeSub
| > SQLServerDMOApp = New SQLDMO.Application
| >....
| > ' get available servers
| > Dim nl As SQLDMO.NameList
| > nl = SQLServerDMOApp.ListAvailableSQLServers
| > Dim i As Integer
| > For i = 1 To nl.Count
| > MsgForm.ComboBox_Servername.Items.Add(nl.Item(i))
| > Next
| >...
| >End Sub
| >
| >The problem is, that the SQL server name list contains only (local) and
not
| >the other available server names (which are available as can be verified
in
| >Enterprise Manager).
| >
| >Can anybody give me a hint! Thanks in advance.
| >
| >Best regards
| >
| >Henry
|
| If you have any type of firewall running that interferes with
communications
| even for a fraction of a second, you will see only local instances and
named
| instances will appear as the server name absent the instance name.
|
| --
| Stefan Berglund
|

List Attribute Names for Single Node

Hello,

I am trying to accomplish the following goal:

"For any given node in an xml variable, return via recordset a list of attributes."

Take the following query:

DECLARE @.x xml
SET @.x = '
<Item>
<Data Key="ID" Value="1001" />
<Data Key="Name" Value="Blue" />
<Data Key="Type" Value="Color" />
</Item>'

SELECT x.value('@.Key','varchar(255)') as [Key],
x.value('@.Value','varchar(255)') as [Value]
FROM @.x.nodes('//Item/Data') Data(x)

That will return:

Key | Value
-
ID | 1001
Name | Blue
Type | Color

What I want is to be able to query @.x ahead of time such that I get back something to the effect of:

Attribute

Key
Value

The reason is that I want to be able to build the columns of my SELECT statement dynamically by iterating through the attributes of a node. I would then execute my prepared statement to get that Key/Value recordset back.

Ignoring the structure of my example XML, what I'm returning in my Key/Value recordset, and how I'm going about returning it...all I want is to know whether or not I can get via recordset a list of attributes for an XML node, and if I can, how I do it.

Thanks!
Daniel

This is a bit clumsey, but should work.

WITH AllAttr(Vals)
AS
(SELECT @.x.query('<root>{for $a in /Item/Data/@.* return <attr>{$a}</attr>}</root>'))
SELECT DISTINCT
x.value('local-name(@.*[1])','varchar(255)') as [Attribute]
FROM AllAttr
CROSS APPLY Vals.nodes('/root/attr') Data(x)

|||

For any given node, for example <Data>, you do:

declare @.x xml
SET @.x = '
<Item>
<Data Key="ID" Value="1001" />
<Data Key="Name" Value="Blue" />
<Data Key="Type" Value="Color" />
</Item>'
select distinct x.value('local-name(.)', 'varchar(20)')
from @.x.nodes('//Data/@.*') as ref(x)

Monday, February 20, 2012

List all the tables on a SQL Server

How do I list all the tables on a SQL Server, along with the database that
they are in ?
Have tried the following ways, but they only list tables in the current
database:
select * from sysobjects
exec sp_tables
select * from INFORMATION_SCHEMA.tables
Thanks, CraigAm Tue, 7 Mar 2006 03:43:59 -0800 schrieb Craig HB:

> How do I list all the tables on a SQL Server, along with the database that
> they are in ?
> Have tried the following ways, but they only list tables in the current
> database:
> select * from sysobjects
> exec sp_tables
> select * from INFORMATION_SCHEMA.tables
> Thanks, Craig
maybe this can help:
http://www.dbazine.com/sql/sql-articles/larsen5
bye, Helmut|||This should get you starting:
EXEC sp_MSforeachdb 'SELECT * FROM ?.INFORMATION_SCHEMA.TABLES'
sp_MSforeachdb is not documented, so you really should create your own versi
on of it, with a bit of
inspiration from the procedure.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Craig HB" <CraigHB@.discussions.microsoft.com> wrote in message
news:A0DD05BA-5962-4D6E-A641-496D8E2684A8@.microsoft.com...
> How do I list all the tables on a SQL Server, along with the database that
> they are in ?
> Have tried the following ways, but they only list tables in the current
> database:
> select * from sysobjects
> exec sp_tables
> select * from INFORMATION_SCHEMA.tables
> Thanks, Craig|||Try:
create table #t
(
dbname sysname not null
, tabschema sysname not null
, tablename sysname not null
, primary key (dbname, tabschema, tablename)
)
go
exec master.dbo.sp_MSforeachdb 'insert #t select table_catalog,
table_schema, table_name from ?.information_schema.tables where table_type =
''base table'''
select * from #t
drop table #t
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
.
"Craig HB" <CraigHB@.discussions.microsoft.com> wrote in message
news:A0DD05BA-5962-4D6E-A641-496D8E2684A8@.microsoft.com...
How do I list all the tables on a SQL Server, along with the database that
they are in ?
Have tried the following ways, but they only list tables in the current
database:
select * from sysobjects
exec sp_tables
select * from INFORMATION_SCHEMA.tables
Thanks, Craig|||Thanks All -- that was exactly what I was after|||Run this
select 'exec '+name+'..sp_tables' from Master..sysdatabases
Copy the result back to QA and run them one by one
Madhivanan