Diff Betn Element & Attribute Centric
Jan 23, 2006Friends,
In OPEN XML statements . i'm not able to distinguish the diff betn Element centric and attribute centric clearly??
Can any one throw some light on this ??
Friends,
In OPEN XML statements . i'm not able to distinguish the diff betn Element centric and attribute centric clearly??
Can any one throw some light on this ??
Hi alll,can anyone tell me that In which cases cast is used in db and what is diff betn cast and convert
View 9 Replies View RelatedHii , can anyone tell me the difference of using function and stored procedure and similarity between them...
View 2 Replies View RelatedHello,
I use a XML Data flow item transformation in SSIS (XML Source). Here is an example of the input of xml file content:<extract date="2007-12-05"> <counters> <counter category="dispatcher" name="server1"> <runtime>6</runtime> <queue>3</queue> <maxrequest>8</maxrequest> <color>blue</color> <host> <name>svo2555</name> <path>\dispatcher</path> <lastaccessed>2007-02-03</lastaccessed> </host> </counter> <counter category="gateway" name="server1"> <runtime>1</runtime> <queue>10</queue> <maxrequest>10</maxrequest> <color>purple</color> <host> <name>svo2555</name> <path>\gateway</path> <lastaccessed>2007-02-03</lastaccessed> </host> </counter> </counters></extract>
How do I catch the extract date in the transformation? SSIS only shows me the <counters> element and not the <extract> one. Why? Is there a way to get it?Regards,
hi,
this is sanjeev,
i have SSIS package, using my c# program i want to add one execute package task to this package's sequence container.
it is creating the new package with out any probelm. but when i opened the package and try to move the newly created exeute package task it is giving the following error.
the element cannot be found in a collection. this error happens when you try to retrieve an element from a collection on a container during the execution of the package
this is my code
{
Package pkg = new Package();
string str = (string)entry.Key;
pkg.Name = str;
alEntity = (ArrayList)entry.Value;
ConnectionManager conMgr;
Executable chPackage;
TaskHost executePackageTask;
Microsoft.SqlServer.Dts.Runtime.Application app = new Microsoft.SqlServer.Dts.Runtime.Application();
//string PackagePath = @"c:Genesis.dtsx";
//p = app.LoadPackage(PackagePath, null);
p = new Package();
p.LoadFromXML(parentPackageBody, null);
p.Name = str;
//Sequence seqContainer;
IDTSSequence seqContainer;
//seqContainer = (Sequence)p.Executables["Extract Genesis Data"];
seqContainer = ((Sequence)p.Executables[0]);
string packageLocation = @"Geneva Packages";
conMgr = p.Connections["SQLChildPackagesConnectionString"];
foreach (string val in alEntity)
{
if (seqContainer.Executables.Contains("Load_" + val) == false)
{
chPackage = seqContainer.Executables.Add("STOCK:ExecutePackageTask");
executePackageTask = (TaskHost)chPackage;
executePackageTask.Name = "Load_" + val;
executePackageTask.Description = "Execute Package Task";
executePackageTask.Properties["Connection"].SetValue(executePackageTask, conMgr.Name);
executePackageTask.Properties["PackageName"].SetValue(executePackageTask, packageLocation + ddlApplication.SelectedItem.Text + @"" + executePackageTask.Name);
}
}
app.SaveToXml(Server.MapPath("../SynchronizeScript/Packages/" + ddlApplication.SelectedItem.Text + @"") + str + ".dtsx", p, null);
}
please let me know what is the wrong in my code.
thanks in advance.
regards
sanjeev bolllina
sanjay.bollina@gmail.com
I need to write a 'select' statement to fetch data from different tables, which are located on different servers.
Can any one help in writing this 'select' statement with out moving the tables on to same server.
Thanks in Advance.
Murali Raparla.
I want to insert attibute att1 in field F1 . Value for this attribute is content of another field in this table (F2).
My query :
update MyTable
set F1.modify
('insert attribute att1 {sql:column("F2")} into (/ROOT/Node1)[1]')
Where F1 Is not null
But I get this error :
XML well-formedness check: Duplicate attribute 'att1'. Rewrite your XQuery so it returns well-formed XML.
How do I check the douplicate attribute ?
HI,
I had to change the key columns of a dimension attribute to fix an error. I did this in BIDS. The change was from a single key column to a composite key column. Now I am getting these error when I process the cube:
Measure group attribute key column x does not match source attribute ..
I looked at the cube XMLA definition under mesaure groups and it still shows a single key column with inherited binding. However, the BIDS does not give me an option correct this in any way. I have had to do this once before and the only option seems to be removing the dimension from the cube and add it back in. But that is very error prone since I lose any specific settings at the cube dimension level not to mention aggregations no longer include the dimension, etc.
Not seeing an alternative, I went through each measure group (I have 7) and changed the key columns manually in the XMLA and saved the cube. This worked, but I don't understand why BIDS automatically doesn't do it.
Is this a flaw in the BIDS or I should be missing something.
thanks
MJ
I've recently taken over management responsibility for an application that uses Microsoft SQL Server 2000.
My experience is primarily in Oracle and I've already self educated myself about some of the differences (such as needing to initiate a BEGIN TRAN if I want a rollback segment.)
I couldn't readily find any resources that would coach me in the core differences between Oracle and SQL Server and I wondered if someone could point me in the right direction.
Thanks for your help.
Hello JoeOver the past several years, I have found your responses to jdbcusage/driver related issues to be extremely helpful. I am sure thatyou're very busy so I will make my question as brief as possible - thereason I didn't post this to a newsgroup is that I don't want to hearany more hype or links to benchmarks (since the vast majority of thebenchmarks don't test concurent/mixed-transaction environments). (I amalso posting a modified version of this message to some newsgroups, butbased on past responses - don't have too much hope that these will leadto a resolution.) If the only way to answer this question would be tohave a phone conversation, my company would be more than happy to pay aconsulting-service fee for your time.My situation:My company has a enterprise level web-app that targets SQL Server. Wedon't use J2EE - so we stick to a simple to administer web containers(JRun,Tomcat). Recently, we have been getting worse and worseperformance from our jdbc driver (we use the free MS jdbc driver) -things like strange transaction resource handling, chopy overallperformance, etc.. I have spent significant time tweaking it (followingvarious advice - many times yours - on newgroups... I can go intodetails, but I don't want to take up your time). As the project'sarchitect, I need to do something about this problem - but varioushigh-level tunnings that I have done to the way we use connections withthis driver haven't significantly improved perfomance under normaleveryday load. (Our queries often span tables with millions of records,and are relatively dynamic. We use a seperate pool of autocommit-offconnections for writes, and autocommit-on connecions for reads)So, then, my question - in your expert opinion - what is the BESTdriver from SQL Server 2000 given the following needs:Things I need it to have are solid jdbc 1.0, solid transactionhandling, decent concurrent load handling, stable implementation ofresource handling (i.e. auto closing result sets when parent statementsclose, closing of result sets & statements when connections close) andsupport for multiple open statements/result sets per connection.Things I do not have a direct need for:Connection Pooling (I keep my own pool of open connections), DataSourcesupport, distributed transactions or 2-phase commit support, RowSetvariants, jdbc 3.0 autokey generation, J2EE compliance. We do make useof updatable result sets - but I don't care if it isn't supported sinceI can still use MS driver for those, as they are mainly done it batchjobs).Things that are nice:It would also be good to have a driver that can handle prep statementcaching on a driver level (vs connection level) although this isn't anecessity, and if it is available - it would need to have aconfigurable caching strategy (or have a way to be turned off :)I very much appreciate your help in advanceThanksGary BogachkovSystem ArchitectStericycle Direct Return
View 1 Replies View RelatedTrying to develop a smart client which will have data centric approach for storage of local data. The server is SQL Server 2000 and foot print database is going to SQL Server Express 2005. Is Merge replication a vaiable option. Can somebody guide me on this approach
Is there any other architecture proposed for Smart client arcjitecture where the data tranfer will be in a couple of GBs. Can somebody tell me more about SOA as well
Thanks!
please help me to take element in datagrid?
View 1 Replies View RelatedWe have to export survey results in an XML-file. The XML my scripts generates is:
Code:
<Surveys2014>
<Survey Course="20" SurveyDate="2015-01-30">
<Question QuestionCode="Satisfaction" Score="2" />
<Question QuestionCode="Recommend" Score="4" />
<Question QuestionCode="Infrastructure" Score="3" />
[code]...
The requirement is to read XML element from database column.The column looks like
<ClMetadataDataContract xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.cch.com/pfx.net/psi/">
<EntityType>1</EntityType>
<NameLine1>David Jones</NameLine1>
[code]....
I have also tries OPENXML but no luck
Hello all,I'm trying to generate some XML directly from MS SQL with thefollowing codeSELECT1 AS tag, NULL AS parent, NULL AS [GoogleCustomizations!1], NULL AS [Annotations!2], NULL AS [Annotation!3], NULL AS [Annotation!3!about], NULL AS [Annotation!3!score], NULL AS [Label!4], NULL AS [Label!4!name]UNIONSELECT2 AS tag, 1 AS parent, NULL, NULL, NULL, NULL, NULL, NULL, NULLUNIONSELECTTOP 503 AS tag, 2 AS parent, NULL, NULL, NULL, 'www.' + domainName, 1 -- score, NULL, NULLFROM tbl_auDomainNameUNIONSELECT4 AS tag, 3 AS parent, NULL, NULL, NULL, NULL, NULL, NULL, '_cse_ad-o6lgdody'FOR XML EXPLICITThe XML it needs to create is as following<GoogleCustomizations><Annotations><Annotation about="www.clickfind.com.au/*" score="1"><Label name="_cse_ad-o6lgdody" /></Annotation><Annotation about="www.lookle.com/*" score="1"><Label name="_cse_ad-o6lgdody" /></Annotation><Annotation about="www.sensis.com.au/*" score="1"><Label name="_cse_ad-o6lgdody" /></Annotation></Annotations></GoogleCustomizations>It is currently creating<GoogleCustomizations><Annotations><Annotation about="www.10000steps.org.au" score="1" /><Annotation about="www.101fm.asn.au" score="1" /><Annotation about="www.aao.gov.au" score="1"><Label name="_cse_ad-o6lgdody" /></Annotation></Annotations></GoogleCustomizations>I cannot get my head around how I can get the label <Labelname="_cse_ad-o6lgdody" />in each element. Does anyone know?Thanks in advance.
View 2 Replies View RelatedHello :
I have a report with several pages, I want poster the same element in all pages, it is what the solution or the property for that?
Thank you very much.
Greetings!
Why does XML Source in MS VS 2005 Integration Services Data Flow Sources XML Source not pick up the root element?
The problem is the following example:
<root createddate="2008-01-01">
<elements>
...
</elements
</root>
The XML Source picks up everything after the first element which is the root element but it does not seam to pick up the root element where there is a need for the createddate attribute.
Is there a soultion for this problem or a workaround?
Thanks for help.
I want to find 2nd max element in a Table . Pls Help me ?
raghu
Hey
Its easy to get the MAX or MIN from a table,
but what if you want to get the 2nd largest ? or 2nd smallest ?
Hi,
I have simple report with RS 2005. I use matrix component. I€™ve added €œSubtotal€? element to the row and It works perfect. But I would like to make some modification to it and I€™m looking for expression of it, but I can€™t find it - there's just "TOTAL". Also On layout page I see text box €œTOTAL€? and that€™s all. Where can I find it?
Thank you
Tomasz
What is the difference between an XML "node" and an XML "element"?
TIA,
Barkingdog
Hi All,
I have created 2 packages in BIDS, these are both working fine. I am trying to deploy to the server using the Package installation wizard, but I am stopped by an error stating "Could not save package" and "Element not found".
Can anyone shed any light on what I need to do?
Thanks in advance
Hi,
I use an XML source to integrate an XML file into my db. My problem is that in my XML source component, the global element of my XML file does not appear in the Input/Output (The XSD file was generated using the same component). This global element contains attribute which I want to integrate in a table.
have an idea obout how can I do that?
thank you in advance
RDL/SRS - Is there a way to tag a reference on a data element?
For example, let€™s say that each data element in column 5 is the result of some equation applied to the elements in columns 1 through 4. The field in column 6 is a function applied to the resulting value from column 5. Is there a way to tag a reference on the column 5 data elements, so they can be referenced from column 6 without reapplying the whole function used to derive column 5 in the first place?
Hi there, I am sorry to be abother but I was wondering if there was someone to tell me what I am doing wrong. Here is my statement. I am getting the following error.
Element SADDR1 is undefined in SESSION
SELECT [clv].[dbo].[UNIT].[HMY] ,[clv].[dbo].[UNITTYPE].[sdesc] ,[clv].[dbo].[UNIT].[SRENT]
,[clv].[dbo].[UNIT].[dtAvailable] , clv.dbo.property.saddr1, clv.dbo.unit.scode
FROM [clv].[dbo].[UNIT] inner join clv.dbo.PROPERTY on clv.dbo.property.hmy =
clv.dbo.unit.hproperty inner join clv.dbo.UNITTYPE on clv.dbo.UNITTYPE.hmy = clv.dbo.unit.hunittype
WHERE saddr1 = #session.saddr1# and ( hunittype='2' OR (hunittype='3') OR (hunittype='4')
OR (hunittype='5') OR (hunittype='6') OR (hunittype='7') OR (hunittype='8') OR
(hunittype='25') OR (hunittype='26') OR (hunittype='27') OR (hunittype='28') OR
(hunittype='29') OR (hunittype='30') OR (hunittype='31') OR (hunittype='32') OR
(hunittype='33') OR (hunittype='34') OR (hunittype='35') OR (hunittype='36') OR
(hunittype='37') OR (hunittype='39') OR (hunittype='41') OR (hunittype='42') OR
(hunittype='44') OR (hunittype='45') OR (hunittype='46') OR (hunittype='47') OR
(hunittype='48') OR (hunittype='49') OR (hunittype='50')
Thanks
'message' Field Data:<xml>....<test>ABC</test>....</xml>How do I query out 'ABC' from this xml field data in a SQL Server?Assume message field is in table 'Persons'
View 3 Replies View RelatedI am getting setup problems with Reporting Services 2005.
When I try to connect through SQL Server Management Studio, the browser in the connect dialog can see the Reporting Services 2005 instance, but when I try to connect, I get an error dialog with the message, "The Report Services instance could not be found (Microsoft.SqlServer.Management.UI.RSClient)"
I manually setup ReportServer and ReportManageer virtual directories in IIS to point to the corresponding directories within the Reporting Services installation. Was I supposed to do this manually? Was the installer supposed to set this up?
Anyway, when I browse to http://localhost/ReportServer/ I get:
* The report server has encountered a configuration error. See the report server log files for more information. (rsServerConfigurationError)
o Access to the path 'C:Program FilesMicrosoft SQL ServerMSSQL.4Reporting ServicesReportServerRSReportServer.config' is denied.
When I browse to http://localhost/ReportManager/ I get:
An error occurred while parsing the configuration file. The ReportServerVirtualDirectory element is missing.
Anyone know what I'm doing wrong and what I can do to fix?
Configuration: SQL Server 2005 Enterprise edition on Microsoft Cluster. Machines named Node1, Node2 and NodeV (Virtual Node). Best practices require SSRS be deployeed on an IIS6.0 server. Reporting services was installed on the Web1 machine and pointing back to the database on the NodeV platform. Everything appears to run fine in Reporting Services. However, when I use the ReportViewer control from within a webpage, the basic control appears along with the message "root element is missing". Using the same code, I point the ReportViewer control to a different server Web2 where Sql server standard, IIS and RS are installed and the report renders properly. What am I missing in the configuration of the Web1 box as far as IIS or SSRS are concerned?
Hi:
A branching element is critical to any process flow. Currently, as far as I know, there;s only a Conditional Split Data Flow Element. There is no direct way I can branch out in a control flow.
In some cases, I could branch by using a conditional operator ?: to either create a dynamic sql string for each patch, or a package name for a Package Execution task and so on.
This approach is not always good enough.
Are there others out there who want a Conditional Control Flow element?
TIA
Kar
I have sample XML data which is shown below in my table. I need to update one of the column names in this field.
Changing <Desc> to <Description>
Input:
DECLARE @myxml
XML
SET @myxml
= '<Cust id="1">Â Â Â Â Â Â Â Â Â Â Â
<Name>aaaaaaaaaa</Name>
            Â
<Desc>bbbbbbbbbb</Desc>
</Cust>'
Output:
DECLARE @myxml
XML
SET @myxml
= '<Cust id="1">
            Â
<Name>aaaaaaaaaa</Name>
<Description>bbbbbbbbbb</Desc>
</Cust>'
I'm trying to set the value of the SelectedDatabases collection property of an Update Statistics Task using an expression for the task, basing it on a user variable. Ultimately, I'll set that variable's value from a configuration file at run time and thereby specify the database whose statistics I want to update.
When I set this up in the designer, I get an error at the time I try to save the package:
TITLE: Microsoft Visual Studio
------------------------------
Nonfatal errors occurred while saving the package:
Error at Update Statistics Task: The result of the expression "@[User::SelectedDatabase]" on property "SelectedDatabases" cannot be written to the property. The expression was evaluated, but cannot be set on the property.
Error at Update Statistics Task: The result of the expression "@[User::SelectedDatabase]" on property "SelectedDatabases" cannot be written to the property. The expression was evaluated, but cannot be set on the property.
------------------------------
BUTTONS:
OK
------------------------------
I used the expression editor's expression builder to select the user variable, so I assume the syntax is correct. However, I'm suspecting that there's some additional syntax required to store that value in the collection's array. I cannot find any references to any special formats and am wondering if anyone know's how to do this correctly. On the other hand, maybe it is telling me setting this property from an expression is not even allowed. If it's not allowed, why is it in the list of properties to set? In any case, none of this is clear.
Any ideas or suggestions are appreciated. Thanks,
Joe
Hi All,
I receive data in the form of xml file and it has one to many relationships. Below I am giving you the sample node and how it should be parsed. Please suggest whether this is possible in SSIS using XML Task if not pls suggest a fast and efficient method.
<Element1>
<SubElement1>S1</SubElement1>
<SubElement2>S2</SubElement2>
..
..
<SubElement20>
<Child1>c1</Child1>
<Child2>c2</Child2>
</SubElement20>
<SubElement20>
<Child1>c3</Child1>
<Child2>c4</Child2>
</SubElement20>
..
..
<SubElement25>
<SubElement25Child1>s25_One</SubElement25Child1>
</SubElement25>
<SubElement25>
<SubElement25Child1>s25_Two</SubElement25Child1>
</SubElement25>
</Element1>
The above one is a sample xml. I should get 8 rows for the above element. There are 2 elements with "SubElement20" and it has 2 childs each. So there are 4 such nodes. The element "SubElement25" occured 2 times. Now we need to multiply these two counts.i.e. 4 * 2 = 8.
The relationship in the xml is one to many.
After parsing the xml I should get the rows in the following format and it should be one to one mapping only.
S1, S2, ....c1,... s25_One
S1, S2, ....c1,... s25_Two
S1, S2, ....c2,... s25_One
S1, S2, ....c2,... s25_Two
S1, S2, ....c3,... s25_One
S1, S2, ....c3,... s25_Two
S1, S2, ....c4,... s25_One
S1, S2, ....c4,... s25_Two
The options are as follows
1) Writing a custom source component to parse this xml and produces the rows in the specified way.
2) First write a XSLT or Style Sheet to break the above one to many relationships to one to one relationships and create an xml file and then use native SSIS xml parser.
3) Using the Script Task as the source component and do the parsing. But I think it would be difficult to handle and maintain.
If any other suggessions please share. Thanks in advance.
Regards
Venkat.
declare @inputXml xml
set @inputXml='<root>
 <row>
   <col>start_date</col>
   <col>1</col>
   <col>rpton#on#13-May-2015|$|rpton#on#13-May-2015</col>
[Code] ...
I get below output ....
But I need below output ....