.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

I need to import XML from Cognos to a flat table in SQL Server 2005

Posted By:      Posted Date: October 12, 2010    Points: 0   Category :Sql Server

How do I query data in this form?

<?xml version="1.0" encoding="utf-8" ?> 
 <dataset xmlns="http://developer.cognos.com/schemas/xmldata/1/" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance">
  xs:schemaLocation="http://developer.cognos.com/schemas/xmldata/1/ xmldata.xsd"

 <item name="NAME_LAST" type="xs:string" length="62" /> 
 <item name="NAME_FIRST" type="xs:string" length="62" /> 
 <item name="NAME_MIDDLE" type="xs:string" length="32" /> 
 <item name="GUID" type="xs:string" length="20" /> 
 <item name="NETID" type="xs:string" length="18" /> 
 <item name="WORK_EMAIL" type="xs:string" length="62" /> 
 <item name="HOME_ADDRESS_STREET_1" type="xs:string" length="50" /> 
 <item name="HOME_ADDRESS_STREET_2" type="xs:string" length="50" /> 
 <item name="HOME_ADDRESS_CITY" type="xs:string" length="32" /> 

View Complete Post

More Related Resource Links

sql server 2005 express - don't allow to create table

i have downloaded sql server 2005 Express version from the web and use domainname\SQLEXPRESS as server name but now i can't create table seems every create by sa user, what is the password of this user or how to grand right to my window login user so that i can modify/create something in database.

What is loweredrolename meant in aspnet_users table (SQL Server 2005)

For my existing data, both RoleName and LoweredRoleName are same, but some are lower case and some are in same case too. Anyone knows what is the use of column LoweredRoleName in aspnet_users table?For my existing data, both RoleName and LoweredRoleName are same, but some are lower case and some are in same case too. Anyone knows what is the use of column LoweredRoleName in aspnet_users table?

getting error while inserting values into table in sql server 2005

i have connected to sql server n my connection string is

conn.ConnectionString =

"data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\subi.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True"

But i am not able to insert values into the table..

am getting sqlexception error.... and msg as invalid object name "staff" as staff is my table name.. before this i had some problem with connection then i cleared that problem then after that this problem occured.. plz guide me on this ... i need to complete my project as soon as possible

Import Complex XML into flat table


I have an XML feed supplied which I need to get into a SQL Server table. I have tried SSIS but because it has DTD in the file that does not work.

The format is as follows :

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE merchantProductFeed SYSTEM "http://www.xxxxx.com/DTD/datafeed.dtd">
   <merchant id="123" name="MerchantName">
    <prod id="123456" in_stock="no" pre_order="no" web_offer="no" hotPick="no" adult="no">
     <text lang="EN">
      <name>Product Name</name> 
      <desc>Product description can be quite long</desc> 
      <spec>Product Specs</spec> 
     <uri lang="EN">
     <price curr="GBP">

SQL SERVER 2005 - problem with Import Wizard


I am importing some tables from a MS Access to SQL server 2005 and I am using the import wizard but I am not seeing the data mapping tool, I need to have the ability to delete the data from the destination server and allow the identity.  I had done many times in the past, but I just got a new computer and I installed the SQL server 2005 workstation in it.  Is a setting that I need to change? that will allow me to have the data mapping.

Thanks a lot


sqlbulkcopy not working for defaulvalue of table in sql server 2005



i am facing problem in sqlbulkcopy function.

in database i have one ID column in where i am generating unique id through db function.

now for insert query its working properly but when i am using Sqlbulkcopy the default value fuction not executing.

please help.

Sql Server 2005 table item limit



I am having a file which is contain 70,000 data. i try to upload this file into sql server table using front end sharepoint server.i am getting time out period expired error.

So please help me to solve this issue





Can we import data from Green plum to SQL Server 2005 using OLEDB connection manager in SSIS



actually we are planning to move data from GreenPLum data base to SqlServer 2005 data base using SSIS as ETL tool. What type of connection manager can we use. Is to good to use OLEDB connection manager or ODBC connection manager.

Please give me a reply as soon as possible.




SQL 2005 Import of Flat File always truncates data longer than 50 chars

My source data is a flat file, semicolon-delimited, and has three columns.  The first is 10 chars, the second can be up to 240, and the third can be up to 240.  For the import I select "Flat File Source" for the Data Source.  When I select my source file, I use the Flat File Manager, Advanced tab, to configure it as follows:

I leave the defaults for Column 0.
For Column 1 I select a DataType of Unicode String and set the OutputColumnWidth to 240.
For Column 2 I select a DataType of Unicode String and set the OutputColumnWidth to 240.

On the Destination page I choose "SQL Native Client", and point it at my database.  The destination table has 3 columns.  Column 0 is CHAR(1), Column 1 is NVARCHAR(240), and Column 2 is NVARCHAR(240).

However, when I get to the "Select Source Tables and Views" page of the wizard and hit the "Edit" key under "Mapping", it shows a size for all three columns of "50".  Sure enough, when I perform the import, it truncates everything to 50 characters.

How do I get more than 50 characters to import?

Excel 2007 Spreadsheet - need to import it to SQL Server 2005


Trying to import spreadsheet from Excel 2007 to a table in SQL Server 2005, when I follow the steps for a linked server ,, I am able to create a linked server but because the instructions I am following are calling for a Microsoft 4.0 Jet something or another as "Provider" and I do not have that I am getting an error.. I have the a list of providers but the 4.0 Jet is not one of them...


Any help is greatly appreciated

how to restrict user from droping and truncating table in sql server 2005




I have to restrict users from  droping & truncting on table's

so how i will achive it,




Import/Export data with SQL Server 2005 Express

Hello folks!
I have installed SQL Server 2005 Express and SQL Server Management Studio Express. Everything looks ok and works fine, but I can't find the Data Import/Export Wizard.  Can anyone tell me how to Import/Export data?

Thank you!!!

Import xls file into sql server database table in asp.net


I have one xls file which has 1.98 lacs rows. Whenever I try to import it in sql database table then I am getting following error to open OLE db connection.

External table is not in the expected format.

My code:

string con = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + Server.MapPath("TowerWorkOrders20110316.xls") + ";Extended Properties=\"Excel 12.0\"";       

 //string con = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("TowerWorkOrders20110317.xls") + ";Extended Properties=Excel 8.0";        

OleDbConnection connection = new 

OleDbDataReader reader;        
 OleDbCommand command = new OleDbCommand("SELECT * FROM [Sheet1$]", connection);        
reader = command.ExecuteReader();.................

Import excel data to Sql Server 2005 problem




I have tried to import data from Excel 2003 to Sql Server 2005 using the Import Wizard to no avail.  Here is my issue:


Excel column has            After import, database table

these value sets:             has these corresponding value sets:

1.01                              null

1.02                              null

1.04                              1.04

1.05                              1.05

1.06                              null

"SQL Server Import and Export Wizard" (SQL 2005) Excel & ISAM


When I run the “SQL Server Import and Export Wizard” (SQL 2005) on my laptop, I attempt to import an EXCEL file to a table.


If I try both Excel-2007 and Excel-2010 format files, I get the following error.


     “The operation could not be completed” “Could not find installable ISAM. (Microsoft JET Database Engine)”


Can not create table in SQL server 2005 Express


hello !

I have database in SQL server Express 2005,  I just create table Customer and table Employee , table Product .They are OK , I want create table Bill and table DetailBill , but they are wrong,

create table Bill
 IDbill char(10) primary key not null,
 IDcustomer char(10) foreign key(IDcustomer) references Customer(IDcustomer),
 IDemployee char(10) foreign key(IDemployee) references Employee(IDemployee),
 StartBill datetime default getdate() not null,
 EndBill datetime not null
 constraint checkendbill

SQL Server 2005 Try and Catch Exception Handling

I'm pretty excited to see that there is some real error handling for T-SQL code in SQL Server 2005. It's pretty painful to have your wonderfully architected .NET solution tainted by less-than-VBScript error handling for stored procedures in the database. The big difference being the addition of TRY..CATCH blocks. Let's take a look:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend