Wierd XML Results From 'Exec SQL Task

Sep 15, 2006

Hi All, we got a problem that I hope you guys can help us with.

We are trying to extract data from a SQL database in XML format to a variable (string) using an 'Execute SQL Task'

In the task we are using an ADO.NET connection to the database which is fine and via direct input we are using this query.

SELECT
title,
initials,
surname,
username,
gender,
emailaddress,
addressline1,
addressline2,
addressline3,
town,
postcode,
country,
emailcontact,
postalcontact,
telephone
FROM
CRMCustRecords
FOR XML path('customer'), root('CRMData'), ELEMENTS XSINIL

In SSMS this is fine and returns an ok (to my eyes anyway!) XML resultset.

<CRMData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<customer>
<title>xxx</title>
<initials>xxxxxxx</initials>
<surname>xxxxxx</surname>
<username>xxxxxx</username>
<gender>x</gender>
<emailaddress>xxxx@xxxxxxx.xx.xx</emailaddress>
<addressline1>xxxxx</addressline1>
<addressline2 xsi:nil="true" />
<addressline3 xsi:nil="true" />
<town>xxxx</town>
<postcode>xxxxxxxxx</postcode>
<country>xx</country>
<emailcontact>x</emailcontact>
<postalcontact>x</postalcontact>
<telephone>99999999999</telephone>
</customer>
<customer>
</CRMData>

However the SSIS task (running exactly the same query) is returning

<ROOT>
<CRMData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<customer>
<title>xxx</title>
<initials>xxxxxxx</initials>
<surname>xxxxx</surname>
<username>xxxxxxxx</username>
<gender>x</gender>
<emailaddress>xxxxx@xxxxxxxxxx.xx.xx</emailaddress>
<addressline1>xxxxxxxxxx</addressline1>
<addressline2 xsi:nil="true" />
<addressline3 xsi:nil="true" />
<town>xxxxx</town>
<postcode>xxxxxxxx</postcode>
<country>xx</country>
<emailcontact>x</emailcontact>
<postalcontact>x</postalcontact>
<telephone>9999999999</telephone>
</customer>
</CRMData>
</ROOT>

I setup the query as a stored procedure and changed the SSIS accordingly. Running the sp from within SSMS was fine but the task still returned the wierd results.

This is completely unexpected and giving us headaches. It doesn't even look like well-formed XML to my eyes and won't display in IE without showing problems! Where are the eroneous /'s and ROOT nodes coming from?

I can't imagine we are the only people to have run into this and I'm sure we aren't doing something quite right - just stuck as to what we're doing wrong.

Hopefully I've provided enough info. If not just ask.

Thanks for any and all input
Pat

View 3 Replies


ADVERTISEMENT

Wierd Results With != Operator

May 19, 2006

Hi all,

I have a table - customer with a Column state_code varchar(5) and another valid( smallint)

select count(1)

from customer

where state_code != 'U' -- for unknown

and valid= 0 -- for valid

Returns different counts each time, even when the data in the table is NOT Changing.



something with != operator ?



Thanks for your help !

Sri

View 5 Replies View Related

Wierd Query Results When Comparing Field Values

May 8, 2008

Hi Guys, I am experiencing weird results

SELECT DSNew, DTTM, RQDT
FROM dbo.Feb
INNER JOIN DMSEFL
ON ACTR = DSNew
where cast(DSNew as varchar(20)) = cast(ACTR As varchar(20))
If I run the above query I get zero recs back.

If I substitute a Value then I get the desired results (ie. where DSNew = '93235500') or if I enter (ACTR = '93235500') or if I put (where DSNew = '93235500' AND ACTR = '93235500')

Can anyone suggest a reason why this is happening. I know the records exist on both tables I ran the query in Acess and got the desired resutls.

Thank you,
Trudye

View 4 Replies View Related

Exec Without Results

Feb 20, 2007

this might sound dumb or impossible, but is there a way to run exec commands forcing them to not return results

View 6 Replies View Related

EXEC @SQLString With Output Results

Jun 2, 2005

Hello, I have been working around this issue, but couldn't yet find any solution.I have a stored procedure that calls a method to do a certain repetitive work.In this function, I have a dynamic query, which means, that I am concatinating commands to the query depending on the input of the function.for example, there is an input for a function called "Id"Inside the function, if Id = 111I need to add " and ID <> 1" and if Id has another value I need to add " and ID = c.ID" something like that.Now, inside the function, I need to return a value by executing the above @SQLString as follows:EXEC @SQLStringWhen I need is something likeEXEC @SQLString, @Total OutputReturn (@Total)Are there any ideas ?regards

View 1 Replies View Related

Capturing The Results From Exec Command

Apr 21, 2006

Hi,

I'm writing a small query where I have a dynamic table name and dynamic condition for the criteria. In order to execute this, I need Exec command.

exec(select count(*) from @dynamictable where condition = @dynamiccond)

But here I want to capture the count from the select statement. Could any of you help me capture the results from exec command? 

 

Thanks

 

 

View 6 Replies View Related

Need To Pull A Select Few Results From INSERT EXEC

Aug 17, 2006

I'd *like* to execute a sProc within another sProc, because this other one (let's call it dataProc) will provide me with results I need that are calculated based off execing other procs within that proc itself.

I'd like to use this data in a new sProc (we'll call it newProc), but I don't need NEARly all of the columns. The dataProc returns 1 row with 42 columns. I need about 4-5 of those for my newProc.

The dataProc does not have any output variables, and I do not want to change the signature, because several pages/apps use this existing dataProc.

My question:
Is there a way to INSERT INTO table EXEC dataProc
*Without* making a temp table that takes in every single column the dataProc puts out?

Any help is much appreciated.. thanks!

View 8 Replies View Related

Join Results From Multiple EXEC Calls

Apr 25, 2006

I would like to make inner join with results from different exec %procedureName% calls.

thanks.

View 3 Replies View Related

EXEC SQL Task

Nov 9, 2007

Hello, I am very, very new to the world of SSIS and from a totally different platform (iSeries), learning, digging and finding golden nuggets as I go.

Two questions please.

Question One:

I am presently encountering the following exception.

SSIS package "DW.CUST_CNCL_ORD.dtsx" starting.
Error: 0xC00291E2 at BP Parter Exec SQL, Execute SQL Task: There is an invalid number of result bindings returned for the ResultSetType: "ResultSetType_Rowset".
Task failed: BP Parter Exec SQL
Warning: 0x80019002 at DW CUST_CNCL_ORD: The Execution method succeeded, but the number of errors raised (1) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
SSIS package "DW.CUST_CNCL_ORD.dtsx" finished: Failure.


Try as I do to find information regarding this exception, I am not able to. Can anyone share their wisdom on this topic?


Question two:

Is there a book that you may recommend that will contribute to my learning this new platform and evironment? I presently have the SQL Server 2005 integration services book.

Thank you in advance for any information you may provide.

God Bless.

Thanks,

Carlos.

View 5 Replies View Related

Linked Server Exec Stored Procdure Results In Transaction Context In Use By Another Session.

Nov 3, 2005

I am using sql 2005 beta

View 23 Replies View Related

Problem Exec SP With Parameters In SQL Task

Jan 12, 2008

Hello,
I am trying to use an Execute SQL Task to execute a stored procedure with parameters in SSIS but it keeps giving me errors, for example I type in 'exec someproc ?, ?, ?' in SQL Task it wouldnt parse correctly and when I set the bypassPrepare to 'true' the package runs but gives me error at the destination saying couldnt find stored procedure 'someProc'.

Does anybody know how I can solve this problem?

Also how do I pass the results of the queries in the Execute SQL Task into the Data Flow Task? The proc is supposed to retrieve data and transform them into XML format to be placed at a XML file. I am not sure if I should used an OLEDB source or an XML source since the data has been transformed into XML. Any help will be greatly appreciated.

View 1 Replies View Related

Exec Process Task Problem

Apr 16, 2007

I am trying to use a variable in an Execute Process Task

Here is my code that I use to set the variable and it works and has the right information:

Public Sub Main()

Dim serverNamePart As String = Mid(CStr(System.Environment.MachineName()), 1, 5)

Dts.Variables.Item("gvServerName").Value = (CStr(System.Environment.MachineName()))

Select Case serverNamePart

Case "ATCDE" 'Development server

Dts.Variables.Item("gvAppServer").Value = "ATCDEVRPNAPP01"

Case "ATCIN" 'Intergration server

Dts.Variables.Item("gvAppServer").Value = "ATCINTRPNAPP01"

Case "ATCDE" 'Development server

Dts.Variables.Item("gvAppServer").Value = "ATCQARPNAPP01"

Case "LTC1P" 'Development server

Dts.Variables.Item("gvAppServer").Value = "LTC1RPNAPP01 LTC1RPNAPP02 LTC1RPNAPP03 LTC1RPNAPP04"

End Select

' MsgBox(Dts.Variables.Item("gvServerName").Value)

MsgBox(Dts.Variables.Item("gvAppServer").Value)

Dts.TaskResult = Dts.Results.Success

End Sub



On my Execute Process task I have User::gvAppServer as my StandardInputVariable but when I execute the task I get

[Execute Process Task] Error: In Executing "D:RPNUtilityinAutoTransmitCall.exe" "" at "", The process exit code was "1" while the expected was "0".



If I take out the StandardInputVariable and hard code the value in Arguments it works. What am I doing wrong?

View 3 Replies View Related

Exec SQL Task (stored Procedures)

Jan 24, 2007

Hi,

Can anyone tell me how to pass parameters from one exec sql task to other ?... (I used stored proc in 1st exec sql task) and passed input parameter (default value set using a variable A) and stored the output parameter value in another variable B.

In the 2nd exec sql task , I passed the output param ( value of B) and doing insert into table xyz...

I get errors (in passing int and string values) . I tried using ole-db as well as ado.net.

Kindly give sample example.

Thanks,









View 1 Replies View Related

EXEC SQL TASK To FLAT FILE - Questions

Mar 21, 2007

Hi,

I have a FOREACHLOOP container that contains an EXECUTE SQL TASK. The EXECUTE SQL TASK is executing a list of stored procedures from a table. This part is working.

However, I now need to send the output of each stored stored procedure to a flat file.

I dropped a DATA FLOW task inside the FOREACHLOOP container, and then created an OLEDB source and FLAT FILE destination on the Data Flow tab.

However, I'm not sure how this is going to work. When I click on the OLEDB source, Connection Manager, I thought I should select the Data Access Mode as SQL Command from variable. Then select the variable name.

But I get this error when I try to save:

Error at Data Flow Task [OLE DB Source [42]]:SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E0C

An OLE DB Recored is available. Source: blah

"Command text was not set for the command object"

What to do??

Thanks



View 5 Replies View Related

How To Supply Config File To Exec Package Task?

Feb 22, 2007

How do I do this ? Or is there any way to bundle Package with Config file so that they both are deployed in MSDB?

View 5 Replies View Related

Error With Execute DTS 2000 Package Task On 64-bit With 32-bit Exec

Dec 17, 2007

Hello all,


I am running a package on a 64-bit server using the 32-bit dtexec. It contains an embedded Execute DTS 2000 package. I deployed the package to the server using the sa account. I set up a SQL Agent job that runs under an account that should have complete admin privileges. The network guys tell me that Legacy components have been installed (although I believe that shouldn't be necessary because SSIS is installed). This is SQL Server 2005, SP2.


When I execute this job, I receive this error message:


Executed as user: Domainuser. ...age Utility Version 9.00.3042.00 for 32-bit Copyright (C) Microsoft Corp 1984-2005. All rights reserved. Started: 11:13:18 AM Error: 2007-12-17 11:13:35.65 Code: 0xC0010018 Source: Execute DTS 2000 Package Task Description: Error loading a task. The contact information for the task is "Execute DTS 2000 Package Task;Microsoft Corporation; Microsoft SQL Server v9; ? 2004 Microsoft Corporation; All Rights Reserved;http://www.microsoft.com/sql/support/default.asp;1". This happens when loading a task fails. End Error Error: 2007-12-17 11:13:35.71 Code: 0xC0010026 Source: Execute DTS 2000 Package Task Description: The task has failed to load. The contact information for this task is "Execute DTS 2000 Package Task;Microsoft Corporation; Microsoft SQL Server v9; ? 2004 Microsoft Corporation; All Rights Reserved;http://www.microsoft.com/sql/support/default.asp;1". End Error Error: 2007-12-17 11:13:35.71 Code: 0xC0024. The step failed.


Is there any way to get this to run?


Thank you very much,
Jessica

View 7 Replies View Related

Exec SQL Task: Capture Return Code Of Stored Proc Not Working

May 19, 2006

I am just trying to capture the return code from a stored proc as follows and if I get a 1 I want the SQL Task to follow a failure(red) constrainst workflow and send a SMTP mail task warning the customer. How do I achieve the Exec SQL Task portion of this, i get a strange error message [Execute SQL Task] Error: There is an invalid number of result bindings returned for the ResultSetType: "ResultSetType_SingleRow".



Using OLEDB connection, I utilize SQL: EXEC ? = dbo.CheckCatLog

EXEC SQL Task Editer settings:
RESULTSET: Single Row
PARAMETER MAPPING: User::giBatchID
DIRECTION: OUTPUT
DATATYPE: LONG
PARAMETER NAME: 0

PS-Not sure if I need my variable giBatchID which is an INT32 but I thought it is a good idea to feed the output into here just in case there is no way that the EXEC SQL TASK can chose the failure constrainst workflow if I get a 1 returned or success constraint workflow if I get a 0 returned from stored proceedure





CREATE PROCEDURE CheckCatLog
@OutSuccess INT
AS

-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON
DECLARE @RowCountCAT INT
DECLARE @RowCountLOG INT

---these totals should match
SELECT @RowCountCAT = (SELECT Count(*) FROM mydb_Staging.dbo.S_CAT)
SELECT @RowCountLOG = (SELECT Count(*) FROM mydb_Staging.dbo.S_LOG)
--PRINT @RowCountCAT
--PRINT @RowCountLOG
BEGIN
IF @RowCountCAT <> @RowCountLOG
--PRINT 'Volume of jobs from the CAT file does not match volume of jobs from the LOG file'
--RETURN 1
SET @OutSuccess = 1
END
GO

Thanks in advance

Dave

View 6 Replies View Related

Execute SQL Task (catching Results)

Aug 7, 2007

Hi,

I'm trying to use an execute SQL task with a simple select to get results and scan them.
I have to create a variable for each column to get results? or may i create something like a resultset variable?
Does this task return only one row and i have to loop manually? (maybe on al script task..) or can i get all returned data on a result set to be the input for next step?

Thanks!

View 6 Replies View Related

How To Pass Results Of A SQL FOR XML Query To An XML Task?

Aug 15, 2006

How do I pass the results of a sql 'FOR XML' query to an XML Task? I tried using a user variable of type string. In my Exec SQL Task on the General tab I set the ResultType to XML. Then on the Result Set tab I map it (Result 0) to my user variable (string). Then in the XML Task I use that variable as the Source. However, it fails in the Exec Sql Task with error
"End tag 'CustomJob秱孒秱怈пField' does not match the start tag 'CustomJobField'

It looks like some extraneous chars are getting inserted into my tags? 
I also tried setting the ResultType to SingleRow but that failed with error:

"The type of the value being assigned to variable "User::ForXmlResult" differs from the current variable type. Variables may not change type during execution. Variable types are strict, except for variables of type Object. ".

Any ideas?  Thanks.

View 2 Replies View Related

Execute SQL Task: Executing The Query Exec (?) Failed With The Following Error: Syntax Error Or Access Violation. Possible F

Jan 23, 2008

Hi,
I'm having an SSIS package which gives the following error when executed :

Error: 0xC002F210 at Create Linked Server, Execute SQL Task: Executing the query "exec (?)" failed with the following error: "Syntax error or access violation". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.Task failed: Create Linked Server

The package has a single Execute SQL task with the properties listed below :

General Properties
Result Set : None

ConnectionType : OLEDB
Connection : Connected to a Local Database (DB1)
SQLSourceType : Direct Input
SQL Statement : exec(?)
IsQueryStorePro : False
BypassPrepare : False

Parameter Mapping Properties

variableName Direction DataType ParameterName

User::AddLinkSql Input Varchar 0


'AddLinkSql' is a global variable of package scope of type string with the value
Exec sp_AddLinkedServer 'Srv1','','SQLOLEDB.1',@DataSrc='localhost',@catalog ='DB1'

When I try to execute the Query task, it fails with the above error. Also, the above the sql statement cannot be parsed and gives error "The query failed to parse. Syntax or access violation"

I would like to add that the above package was migrated from DTS, where it runs without any error, eventhough
it gives the same parse error message.

I would appreciate if anybody can help me out of this issue by suggeting where the problem is.

Thanks in Advance.

View 12 Replies View Related

Remove ROOT Tags From SQL Task XML Results

Dec 19, 2007

Hi All,

I'm currently using an Execute SQL Task to return XML data from a query into an SSIS string variable. In my FOR XML clause in SQL I'm specifying a certain name for my root tag, called "Accounts". This works great in Management Studio, however, the Execute SQL Task appends a <ROOT> and </ROOT> tag to the start and end of the string, so now it looks like:

<ROOT><Accounts>...all my elements...</Accounts></ROOT>

I'd like to remove the ROOT tags so that the <Accounts> tags are actually the root for this doc. What would be the best way to remove the ROOT tags from the SSIS string variable?

Thanks!

View 9 Replies View Related

XML Data Task XPath No Results Returned

Oct 22, 2007

Hi,

I'm trying to use the XML Task XPath operation for the first time but having some problems. I'm using the following settings:

Source type: File connection
SaveOperationResult: True (file destination)
SecondOperandType: Direct Input
PutResultInOneNode: False
XPathOperation: Values

The XML file I'm testing has the following stucture:

<?xml version="1.0" standalone="yes"?>
<BackupDataSet xmlns="http://tempuri.org/BackupDataSet.xsd">
<Device>
<DeviceID>6356452a-e7a6-42e1-895a-d4ade62210d5</DeviceID>
<UserID>1533c44f-c263-db11-9db3-000e9bd9f98d</UserID>
</Device>
</BackupDataSet>

When I set the SecondOperand to /* the output is a concatenated text string of DeviceID and UserID values. I'm trying to get just the DeviceID but perhaps my understanding of XPath syntax is wrong. I've tried setting the SecondOperand to the following:

//Device/DeviceID
/BackupDataSet/Device/DeviceID
//DeviceID

All of these return no results. What am I doing wrong?

Regards,

Greg



View 3 Replies View Related

Sql Task To Save Query Results To File ?

Sep 14, 2007

In sql mgt studio, I can save the query results to a file. How would I do this in an SSIS package?

View 2 Replies View Related

Integration Services :: Two Results From Single Task

Jul 22, 2015

I have a table with email addresses and CC_Flag.

Email     | CC_Flag
xxxx           0
yyyy           1
zzzz           1

Using Task SQL, I am trying to pass these email addresses to two separate variables - To_field, Cc_field on basis of the CC_Flag..Is it possible to fill two variables from a single SQl Task,.

View 4 Replies View Related

Is It Possible To Skip All Steps Following The Script Task Results (Step 1) In A For Each Container?

Jun 13, 2006

Is it possible to skip all steps following the script task results (Step 1) in a For Each container. I am iterating thru all the files in a For Each container and parsing a few lines of the file and based on the result I want to force the For Each loop to get to the next file instead of executing the next steps. Is it possible to force the for each loop to get the to the next file if the test criteria in the very first step (Script Task) fails. Any inputs will be much appreciated.



THanks,

MShah

View 1 Replies View Related

Exec Pkg Task: Error 0xC0202009 While Preparing To Load The Package. An OLE DB Error Has Occurred. Error Code: 0x%1!8.8X!.

Feb 21, 2007

I cannot execute a package by using Execute Package task.
I supplied sa credentials to connection manager, and it shows the list of Packages on SQL Server but when running the task it says

Error 0xC0202009 while preparing to load the package. An OLE DB error has occurred. Error code: 0x%1!8.8X!.



Any clue ?


Thanks,
Fahad

View 1 Replies View Related

Bulk Insert Vs. Data Flow Task (different Row Results Using Flat File Source)

Nov 2, 2006

I'm importing a large csv file two different ways - one with Bulk Import Task and the other way with the Data Flow Task (flat file source -> OLE DB destination).

With the Bulk Import Task I'm putting all the csv rows in one column. With the Data Flow Task I'm mapping each csv value to it's own column in the SQL table.

I used two different flat file sources and got the following:

Flat file 1: Bulk Import Task = 12,649,499 rows; Data Flow Task = 4,215,817 rows
Flat file 2: Bulk Import Task = 3,403,254 rows; Data Flow Task = 1,134,359 rows

Anyone have any guess as to why this is happening?

View 9 Replies View Related

Wierd Error...

Sep 21, 2000

Hi all,
I was trying to run this query

strSQL = "select '<input type=text name='& id &'size=4 maxlength=4 value=>',product,description,moreinfo,media,License,unitc ost from newdeal where category='" & session("category") & "'"

Idea is the value of id to be fetched from the DB and substituted in the input box.It works well with MS Access but in SqlServer it is showing an error saying that data of varchar type cannot be converted to *******.Id is ******* data type in the DB .can anyone help me please

Thanks
Shyam

View 2 Replies View Related

Wierd Query

Dec 6, 2004

I'm writing a report for a survey application. There is a subscriber table, a question table, and an answer table. The subscriber table holds info like the name, address, etc of the publication's subscribers. The Question table holds the questions on the survey (ie, How many widgets do you own? What is your age? How many do you think you will purchase in the coming year?). The Answer table holds answers to each question (18-21, 25-50%, 20+, etc). I am forced to work within a very non-standard database application running on MS SQL Server 2000 that also uses a separate Relationships table, so to determine which answers go with which questions the relationships table will have a record linking a question to an answer (and vice versa). To determine how each subscriber answered the question the subscibers have a record in the relationships table linking them with specific answers (and vice versa). Both types of entries are in the same table. There are several questions that will include a note to "check all that apply" (you may get several widgets from the company). The report runs through each question, shows how many subscribers answered the question, and how many selected each answer as a percentage of the total for that question. It is nearly finished, I can run it on the test data for any date, but there is one special case I'm having trouble with. For one question, they want to know additionally how many people chose one possible answer, but no others. I can do it using simple SQL to get the list of the subscribers that chose the answer in question, and then loop through each one in vb and run another query that will tell me how many answers related to that question they selected. This works okay for the test data, but in production there are more than 100,000 subscribers, which means running 100.000+ individual querys. I know it's possible to do this in one (all I want is the final count), but the SQL for this is horrid. Any help appreciated.

View 3 Replies View Related

Integration Services :: Oracle Procedure Is Not Returning Results When Executing From Script Task On SSIS

Jul 13, 2015

I'm executing Oracle procedure, which has three OUTPUT parameters and returns results in table type variable. i should not use ODBC, MSDAORA providers to call the procedure. So I'm planning to using Oracle OLEDB provider. I'm able to execute the procedure successfully, but when i do check (while dr.Read()) its not returning any records. But I know as per stored procedure results, it should return 66 records.

Dim conn As New OleDbConnection
Dim cmd As New OleDbCommand
Dim dr As OleDbDataReader
Dim QSQL As String

[code]...

View 10 Replies View Related

Wierd Result Set Problem

May 2, 2007

Hi all,

We have an asp.net2 website pointing at sql2005 (not service packed yet - it may be the cause, not sure - would like opinions first!).The website will run without problems, but randomly we get the following scenario:We have a function that takes a SP name and a sqlcommand with parameter information.  It opens a connection and uses a dataadapter to fill a datatable, then closes the connection and returns.  When the problem occurs, we get a sqltimeout on the line where it tries to fill the datatable.  However, when the function is called again, the results from the first query seem to get populated into the datatable.  Then when it gets called again, the previous results are again returned.  Its like ADO sees the timeout (but sql doesn't), but then picks up the next available resultset from sql (which is the wrong one!).Hope the above makes sense....Cheers,James. 

View 5 Replies View Related

Wierd Bug With Sqlserver 2000

Apr 16, 2006

hey ppl, if there is any1 that can help me here i would apreciateerror line(probably)Comando = New SqlCommand("INSERT INTO Table1(name) VALUES('a')", Conexao)on Table1 i have those fieldsid(int, identity) e name(text)but when i execute this code i get the following error:Error on the XML processing: no element found(ps. the error wasnt on english so i made a poor translation but i think u can have a general ideia)(the error message untranslated)Erro no processamento de XML: nenhum elemento encontradoPosição: http://localhost/teste.aspxNúmero da linha 1, Coluna 1:anyway, the wierd part is that on the sqlserver the data is insertted normally.. so.. what is that error??any1 pls help me! im going nuts (ps. im still noob on asp.net/sqlserver so please be gentle ^.^)(ps2. sorry for the crap english but it isnt my native language :) )

View 3 Replies View Related

Wierd Select Statement, Possible?

Sep 25, 2007

Ill try describe this as best I can, because this isnt something that would be done usually, I think.

------------

SELECT Items

FROM tblFood

WHERE Type = "Fruit"

RETURN

-------------


This would return...

Items
-----------
Apple
Orange
Pear
Strawberry

etc...


Would there be a way to create a new Column for each Item of the Select? eg..

Col1------Col2---------Col3----------Col4
Apple--Orange------Pear-----Strawberry

The amount of columns needs to be dynamic. If i were to add pineapple there needs to be 5 columns etc.
Sorry if this has been covered before but I wasnt sure on search criteria. Thanks in advance.

View 8 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved