Example Illustrating SMO Enumeration Needed.

Jun 5, 2006

I planned to write a VB.NET SMO app enumerating all tables in a given database, all fields in each table, the properties (length, NULL, PK, etc) of each field, and finally store the result in a table. I think that should be quite doable.

But I noticed that the ForEach Loop editor has a SMO enumerator. (I don't know if it can be used to do exactly what I want.) By clicking on the options in the ForEach Loop editor I can get the Enumerator as follows:



Database[@Name='AdventureWorks']/Table[@Name='AWBuildVersion' and @Schema='dbo']/SMOEnumObj[@Name='Columns']/SMOEnumType[@Name='Names']

but it's not clear to me how to work with this thing! ( It must return a collection of items that I access through a variable.) Anyone know of an example illustrating SMO enumeration?



TIA,



Barkingdog

View 1 Replies


ADVERTISEMENT

Enumeration In SQL Server?

May 31, 2006

Is there "enumerate values" in SQL server? I know that VB.Net has enumeration. If there is enumeration in SQL server, how to do that?
Thanks.

View 11 Replies View Related

ResultSetOptions Enumeration ?

Jul 18, 2007

While using SQLCE 3.0, I need to insert ~20000 records. I using the following code :


Code Snippet

cmd.CommandText = "M_Reclass";

cmd.CommandType = CommandType.TableDirect;

SqlCeResultSet rs = cmd.ExecuteResultSet(ResultSetOptions.Updatable | ResultSetOptions.Scrollable);

SqlCeUpdatableRecord rec = rs.CreateRecord();

while ((strInput = srFile.ReadLine()) != null)

{

if (strInput.Trim().Equals(""))

continue;

intCount = intCount + 1;

arInfo = fileIO.SplitRow(strInput, fldSep);

try

{

// GKH 2007/07/17 : Perform check, but sacrifice speed

//if (arInfo.Length >= 5)

//{

rec.SetString(0, arInfo[0]);

rec.SetString(1, arInfo[1]);

rec.SetString(2, arInfo[2]);

rec.SetString(3, arInfo[3]);

rec.SetString(4, arInfo[4]);

rs.Insert(rec);

ProgressText("Processing " + Para.RECLASS_IMP_FILE + ": " + intCount + " records(s)");

//}

}

catch (Exception ex)

{

throw new Exception("Record " + intCount + " cannot be imported : ", ex);

}

}



I did a search on MSDN, I found the option available are:








Code Snippet






Member name
Description


Insensitive
The ResultSet does not detect changes made to the data source.


None
No ResultSet options are specified.


Scrollable
The ResultSet can be scrolled both forward and backward.


Sensitive
The ResultSet detects changes made to the data source.


Updatable
The ResultSet allows updates.



SqlCeResultSet.Scrollable Property : True if the ResultSet is scrollable; otherwise, false.

SqlCeResultSet.Updatable Property : True if the values in the record can be modified; otherwise, false;

SqlCeResultSet.Sensitivity Property :

The sensitivity of the ResultSet indicates whether the ResultSet is aware of changes to the data source. A ResultSet that is sensitive is aware of changes; an insensitive ResultSet is unaware of changes. If no sensitivity is set, the ResultSet is asensitive and will use the optimal configuration based on other settings.The default value is asensitive.





Since I just insert only, does it mean I no need "Scrollable" ( i think insert is mere forward scroll)?

But what about "Updatable" ? which one from SIUD (Select/Insert/Update/Delete) need to use this "Updatable"?

View 3 Replies View Related

How To Add New Values In SQL 2000 DTS Enumeration Task

Apr 10, 2008

Hi. I am using SQL 2000 and DTS package to transfer data between two databases. In my DTS package, I need to create a enumeration task with a enumeration data task. However when I tried to add enumeration values, I cannot find any ways to create new values by right click to select from drop down menu or use Control + New in the enumeration properties. Could anyone point out how I can add new values in DTS Enumeration type.


Thanks

View 1 Replies View Related

For Each Loop Container File Enumeration

Feb 27, 2008



I am trying to move files from one directory to anonther using the For Each Loop Container and a File System Task. However, on the FIRST iteration of the ForEach Loop the variable that I am setting to the 0 index of the For Each Loop is returning me a valid directory with no file ( path only ) from who knows where ????

On the second iteration of the For Each Loop everything works as expected and I get the full path and file name and it iterates through all the files in the directory o.k.

So I have had to put a Hack to skip the fist iteration of the loop and then execute the File Task on the second iteration but I dont see anyone else doing this.

Where in the heck is it getting this odd directory from on the fist iteration ( its not my User varible because I am initializing it to \nowhereofile ). What am I doing wrong?

View 3 Replies View Related

Error:Collection Was Modified; Enumeration Operation May Not Execute

Apr 7, 2008

Hi,
This is my save procedure.
Please check and give me some advice.looping is need or not?
i get error "Collection was modified; enumeration operation may not execute"
plz help me.
-------------------------------------------------------------------------------- Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click
Dim con As SqlConnectionDim cmd As SqlCommand
Dim da As SqlDataAdapter
Dim userid As String
Try
userid = Request.QueryString("userid")con = New SqlConnection(ConfigurationSettings.AppSettings("strcon"))
' con.ConnectionString = ConfigurationSettings.AppSettings("strcon")
con.Open()cmd = New SqlCommand("dbo.sp_AddAns", con)
cmd.CommandType = CommandType.StoredProcedure
 
 For Each Item As DataListItem In dlAQ.ItemsDim paramid As New SqlParameter("@id", SqlDbType.Int, 4)
paramid.Value = userid.Trim
cmd.Parameters.Add(paramid)Dim paramans As New SqlParameter("@proansw", SqlDbType.NVarChar, 50)
Dim txtbox As New TextBoxtxtbox = CType(Item.FindControl("txtAns"), TextBox)
paramans.Value = txtbox.Text.Trim
cmd.Parameters.Add(paramans)
 Dim paramprodesc As New SqlParameter("@prodesc", SqlDbType.NVarChar, 50)
Dim lbldesc1 As New Labellbldesc1 = CType(Item.FindControl("lbldesc"), Label)
paramprodesc.Value = lbldesc1.Text.Trim
cmd.Parameters.Add(paramprodesc)
 Dim paramproid As New SqlParameter("@proid", SqlDbType.Int, 4)
Dim lblproid1 As New Labellblproid1 = CType(Item.FindControl("lblproid"), Label)
paramproid.Value = lblproid1.Text.Trim
cmd.Parameters.Add(paramproid)Dim paramreso As New SqlParameter("@proreso", SqlDbType.NVarChar, 50)
Dim lblreso1 As New Labellblreso1 = CType(Item.FindControl("lblreso"), Label)
paramreso.Value = lblreso1.Text.Trim
cmd.Parameters.Add(paramreso)Dim paramchk As New SqlParameter("@chk", SqlDbType.Int, 4)
paramchk.Value = "2"
cmd.Parameters.Add(paramchk)
'Dim rowaffected As Integer
cmd.ExecuteNonQuery()
bindData()
 
 
Next Item

View 1 Replies View Related

ForEach File Enumeration With Bulk Insert Problem

Jul 14, 2007

OK, a new package, with a Foreach container enumerating CSV files in a directory.

I create the container pointing it at the directory and retrieving the fully qualified name, and create a variable (called 'CSVFiles') with a package scope, but no value.



Inside the container is a bulk insert task. The destination db/table is set, and the input flat file connection manager for the CSV files is defined with the connection string set to the variable created above.



As it iterates through the files, the variable is correctly set to the next file in the directory (I put a message box in the stream to display the file name/variable). It resembles 'C: empLocation1.csv'.



But when it gets to the bulk insert, I get this error message:



[Bulk Insert Task] Error: The specified connection "CSVFiles" is either not valid, or points to an invalid object. To continue, specify a valid connection.



What's going on here? Can I not use a bulk insert task in the container? Or some other parameter needs to be set?



SQL Server 9.00.3159









View 4 Replies View Related

Sp Help Needed

Sep 24, 2006

Im new to stored procedure, but here's what I want, if someone can get me started and provide this as an example it would be VERY welcome!I have the following, a SP with parameter IsMale. This parameter may be empty. If it's not empty I want to add some text to my selection query: AND IsMale=paramvalueHere's the SP so far:ALTER PROCEDURE [dbo].[spFindUsersAdvanced] --declare parameters here@IsMale bitASBEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON;   SELECT DISTINCT BirthDate,IsMale, FROM aspnet_Users INNER JOIN tblUserData ON aspnet_Users.UserId = tblUserData.UserID WHERE tblUserData.Username<>''IF @IsMale THENBEGIN  AND IsMale='True'ENDELSEBEGIN  AND IsMale='False'ENDEND IFEND1. How do I check if the parameter is empty?2. How do I add the text to my selection query?

View 3 Replies View Related

Help Needed

Oct 30, 2007

Hi all,I am trying to write a stored procedure, which has two insert statements.the first insert statement, is simple which inserts data into a table and returns the primary key for the new row added. using this primary key, i am writing another insert statement, which passes a list of elements which would be then entered into another table, with the primary key of the first table.Is this possible to do in a single stored procedure? I have implemented this using two different sp, but am wondering if it can be done other way?thanks for your help! 

View 10 Replies View Related

Help Needed

Dec 1, 2004

Hi,

For many to many relationship, what is the minimum number of tables required.

View 1 Replies View Related

Hep Needed!!!

Oct 17, 2005

Hi plz read below is my scenarioI have two diff tables which stores passwords (don't ask why b'coz it was there).Now to make data in both table consistance what I need to do?plz provide optimized solution.Thanks in advance.bye bye.happy coding!!!

View 1 Replies View Related

Help Needed.

Dec 20, 2000

Experts,

I've few questions regarding SQL Server. Appreciated, If any one out there help me with it.

I would like to do T-SQL Programing and would like to know some good book. I'll mostly be doing Stored procedures,Triggers and views programming. Any advice?

On my sql server I've 10 logins. But, I cannot view these logins from the Enterprise GUI. But, When i run a query against the syslogin table, those all 10 logins shows up. Why is that?

any help would be greatly appreciated.

View 1 Replies View Related

SQL Help Needed.......

Mar 25, 2004

Access 97.................

I'm trying to construct the following SQL statement but am missing something somewhere.

I get a syntax error with the 1st FROM highlighted.

If i construct a query out of the bit that works and then construct a query on that query then i can get it to work no problem but how to mimic that in SQL ? I can't simply view the SQL of the queries because the query names replace the SQL statements.

I'm trying to SUM the 5 volumes that get returned by the TOP 5 SQL statement. The VotingUniverse_TotalVolumeByType query returns the TotalVolume which will enable me to divide the SUMmed 5 volumes by the TotalVolume to obtain a %age.



SELECT
Type,
Sum(Volume) AS Volume,
TotalVolume
FROM
>>>>>>>>>>this following bit works............
(SELECT TOP 5
VotingUniverse_TopFirmsVolumeByType.Type,
VotingUniverse_TopFirmsVolumeByType.Volume
FROM
VotingUniverse_TopFirmsVolumeByType
WHERE
(((VotingUniverse_TopFirmsVolumeByType.Volume)
In (SELECT TOP 5 VotingUniverse_TopFirmsVolumeByType.Volume
FROM
VotingUniverse_TopFirmsVolumeByType
ORDER BY Volume DESC)))
ORDER BY
VotingUniverse_TopFirmsVolumeByType.Volume;)
>>>>>>>>>>>end of bit that works
INNER JOIN
VotingUniverse_TotalVolumeByType
ON
Type = VotingUniverse_TotalVolumeByType.Type
GROUP BY
Type,
TotalVolume;



hope this makes sense to someone anyway

thanks


====
Paul

View 5 Replies View Related

Immediate Help Needed!! Thanks A Lot!

Aug 15, 2002

I have a xxx.exe running on SQL 2000 server as a sql job every hour. For some reason this job sometime just hung in the middle and never finish. But
if I stop it and rerun it, it will be down within 10 seconds. I am wondering
if we can set up something so that the job aborts automatically if it ran more than 10 minutes.

View 1 Replies View Related

Help Needed!!!

Feb 22, 2001

Hi everyone.

We are running Sql 6.5 sp5 on a Pentium II 350 Mhz with 512 Mb. RAM, 1 ScSi 4 Gb hd, one 8Gb ScSi hd and 2 IDE hd (13,6 Gb and 8Gb) computer running windows NT 4.0 sp 6 without any problems.
Now have bought a new computer. The new one is a Pentium III 733 Mhz 512 Mb Ram with 2 ScSi ultra wide 2 18Gb each and one 40 Gb Ide Hd. We have installed windows NT 4.0 sp 6 and Sql 6.5 sp 5. We have restored our database to make some tests to it. The database is 7 Gb big.
The results of our test are that the old computer is between 20% and 30% faster than the new one when doing sql instructions and using the database even knowing that the hd´s of the new computers are 4 times faster than the old ones.

Would you please give us any help or clue that would make the new computer go faster?
We know that upgrading to sql 7 will work but we need first to make this computer work better with the 6.5.
Thank you.

View 3 Replies View Related

Help Needed

Jun 18, 2004

Hello,
When I try to run my asp file it gives me this error. :mad:

Technical Information (for support personnel)

Error Type:
Microsoft OLE DB Provider for SQL Server (0x80040E07)
Syntax error converting datetime from character string.
/conOpen_inc.asp, line 10


Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)

Page:
GET /Default.asp


Anyone can tell me whats happening ? thank you

View 5 Replies View Related

DTS Help Needed!

Oct 12, 2004

I often use DTS to move databases between the servers. When you choose "Transform" data and “Column Mappings and Transformation” window opens, the default option is “Append rows to destination table”.
Question: Is there a way to change the default option to “Delete rows in destination table”, so I wouldn’t have to go thru the transformation of dozens of tables every time I move databases around.

P.S. I know that I can save DTS package with my settings and use it later. The problem is that every time it might be different database or objects might change. So, it is not a solution for me.

Thanks

View 8 Replies View Related

SQL DB Help Needed!!!

Jul 25, 2007

Dear All,

I have a client requirement. We are integrating two applications. So the problem is that, whenever some updates (meaning to say "create" , "delete" , "update") happens in the SQL DB Tables, i needed to track that data and send it to a different system.

What I have thought abt is that if SQL could generate a file with all the values deleted/updated/created in the DB, then I could take those values and do the needful. Please help me..

Thanks,
Sanjo

View 2 Replies View Related

Help Needed!!

Feb 28, 2004

Hello guys,
I'm new to the forum and to MS SQL 2K.
I'm trying to a merge similar rows in a table into a single row and put them in a new table.

Example:-
This is my input table
TableA
ID A B C
------------------------
1 jk kl bj
2 sd we op
3 io po kl
1 ui gh ew
2 kl re op
1 qw kj nn

My output table should look like this
TableB
ID A1 B1 C1 A2 B2 C2 A3 B3 C3
-----------------------------------------------------
1 jk kl bj ui gh ew qw kj nn
2 sd we op kl re op
3 io po kl

Please help me on how to create my output.
Thanks in advance,

Sid.

View 11 Replies View Related

Help NEeded!!

Mar 26, 2004

Hi,
I have a table structure like this

TableName: Common

Columns
PartnerId: int
NativeId: int
FirstName: nvarchar(50)
LastName:nvarchar(50)

1)I should get the records with a minimum native id for a particular PartnerId,
2) if duplicates exists in the above condition i should select top 1 (first record)


How can i do it??

TIA,
sudheer

View 5 Replies View Related

Help Needed!!

Apr 12, 2004

Hi,
I have been SQL developer for past 2 yrs, want to get into Administration(DBA) can any one suggest me some good articles on net and good books for this.

TIA,

sudheer.

View 14 Replies View Related

Is It Needed?

Feb 26, 2008

Hi experts,

I am upgrading my database from SQL Server 2000, SP4 to SQL server 2005, SP2.

1) Is it required to recreated my user defined functions? I mean drop them and recreate them again?

2) Do I need to recreate the views and Stored procedure?


3) Do we have a checklist from Micorosoft for upgradation?


Thanks in advance

Regards
Sachin

Don't sit back because of failure. It will come back to check if you still available. -- Binu

View 2 Replies View Related

Help Needed!!

Jul 23, 2005

Hey all, I need some help to build some data bases and maybe some morestuff. Please reply only if you can do it volunteerly or very cheap please;but there is incentives in time..TIA

View 4 Replies View Related

SQL Help Needed

Jul 20, 2005

I have a tableCreate Table Payments {paymentid int,customerid int,amount int,date datetime}What I want is the sum of the amounts of the last payments of all customers.Now the last payment of a customer is not necessarily the one with thehighest paymentid for that customer BUT it is the one with the highestpaymentid on the MOST RECENT date. We dont keep the time part just the dateso if there are more than 1 payments of a customer on a date ( and there aremany such cases ) only then the paymentid decides which is the last payment.Further the last payment may be the last as of today but I may want to findthe sum of all the last payments upto say March 1, 2003or any date. My own solution is too slow even it is correct.SELECT SUM( AMOUNT )FROM PAYMENTS AS P1WHERE PAYMENTID =( SELECT MAX( PAYMENTID ) FROM PAYMENTS AS P2 WHERE P1.CUSTOMERID =P2.CUSTOMERID AND DATE =( SELECT MAX(DATE) FROM PAYMENS AS P3 WHERE P3.CUSTOMERID = P2.CUSTOMERIDAND DATE < #9/8/03# ))What would be the most efficient solution to this.Both in SQL Server and in Access 2000thx in advance

View 3 Replies View Related

T-SQL Help Needed!!

Feb 11, 2008

I am using the following T-SQL to pull records from a given table that have a start time between 6:59:59PM and 7:00:00AM. However, it's not working. The SQL I'm using is listed here. What am I doing wrong?


select RecNum, convert(varchar(8), StartTime, 8) as Start_Time from TableA

where convert(varchar(8), StartTime, 8) between '18:59:59' and '07:00:00'



By the way, there are a multitude of records that I'm looking for in the table.

View 4 Replies View Related

Help Needed

Feb 20, 2008

hi friends


I need some Help with VSA in SSIS . Whenever i open VSA for scripting , it shows the following validation errors.

Warning 1 The dependency 'EnvDTE' could not be found.
Warning 3 The dependency 'Microsoft.SqlServer.DTSRuntimeWrap' could not be found.
Warning 5 The dependency 'Microsoft.SqlServer.msxml6_interop' could not be found.
Warning 4 The dependency 'Microsoft.SqlServer.PipelineHost' could not be found.
Warning 6 The dependency 'Microsoft.SqlServer.SqlTDiagM' could not be found.
Warning 2 The dependency 'Microsoft.SqlServer.VSAHosting' could not be found.
Warning 7 The dependency 'Microsoft.SqlServer.VSAHostingDT' could not be found.


I am able to locate these dependencies in the c: programfilesmicrosoftsqlserver90SDKAssemblies.

What is the solution for this type of problem ?

thanks and regards
MAxx

View 4 Replies View Related

Help Needed

Apr 3, 2008



Hello,
When I try to open the ReportBuilder.application file
It gives me a error message
contact vendor


PLATFORM VERSION INFO
Windows : 6.0.6001.65536 (Win32NT)
Common Language Runtime : 2.0.50727.1434
System.Deployment.dll : 2.0.50727.1434 (REDBITS.050727-1400)
mscorwks.dll : 2.0.50727.1434 (REDBITS.050727-1400)
dfdll.dll : 2.0.50727.1434 (REDBITS.050727-1400)
dfshim.dll : 2.0.50727.1434 (REDBITS.050727-1400)

SOURCES
Deployment url : file:///C:/Users/pmohan/Desktop/ReportBuilder(2).application

IDENTITIES
Deployment Identity : ReportBuilder.application, Version=9.0.3042.0, Culture=neutral, PublicKeyToken=c3bce3770c238a49, processorArchitecture=msil

APPLICATION SUMMARY
* Online only application.
* Trust url parameter is set.
ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of C:UserspmohanDesktopReportBuilder(2).application resulted in exception. Following failure messages were detected:
+ Downloading file:///C:/Users/pmohan/Desktop/ReportBuilder.exe.manifest did not succeed.
+ Could not find file 'C:UserspmohanDesktopReportBuilder.exe.manifest'.
+ Could not find file 'C:UserspmohanDesktopReportBuilder.exe.manifest'.
+ Could not find file 'C:UserspmohanDesktopReportBuilder.exe.manifest'.

COMPONENT STORE TRANSACTION FAILURE SUMMARY
No transaction error was detected.

WARNINGS
There were no warnings during this operation.

OPERATION PROGRESS STATUS
* [4/3/2008 3:25:51 PM] : Activation of C:UserspmohanDesktopReportBuilder(2).application has started.
* [4/3/2008 3:25:51 PM] : Processing of deployment manifest has successfully completed.
* [4/3/2008 3:25:51 PM] : Installation of the application has started.

ERROR DETAILS
Following errors were detected during this operation.
* [4/3/2008 3:25:51 PM] System.Deployment.Application.DeploymentDownloadException (Unknown subtype)
- Downloading file:///C:/Users/pmohan/Desktop/ReportBuilder.exe.manifest did not succeed.
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
at System.Deployment.Application.SystemNetDownloader.DownloadAllFiles()
at System.Deployment.Application.FileDownloader.Download(SubscriptionState subState)
at System.Deployment.Application.DownloadManager.DownloadManifestAsRawFile(Uri& sourceUri, String targetPath, IDownloadNotification notification, DownloadOptions options, ServerInformation& serverInformation)
at System.Deployment.Application.DownloadManager.DownloadApplicationManifest(AssemblyManifest deploymentManifest, String targetDir, Uri deploymentUri, IDownloadNotification notification, DownloadOptions options, Uri& appSourceUri, String& appManifestPath)
at System.Deployment.Application.ApplicationActivator.DownloadApplication(SubscriptionState subState, ActivationDescription actDesc, Int64 transactionId, TempDirectory& downloadTemp)
at System.Deployment.Application.ApplicationActivator.InstallApplication(SubscriptionState& subState, ActivationDescription actDesc)
at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension)
at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)
--- Inner Exception ---
System.Net.WebException
- Could not find file 'C:UserspmohanDesktopReportBuilder.exe.manifest'.
- Source: System
- Stack trace:
at System.Net.FileWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Net.FileWebRequest.GetResponse()
at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
--- Inner Exception ---
System.Net.WebException
- Could not find file 'C:UserspmohanDesktopReportBuilder.exe.manifest'.
- Source: System
- Stack trace:
at System.Net.FileWebResponse..ctor(FileWebRequest request, Uri uri, FileAccess access, Boolean asyncHint)
at System.Net.FileWebRequest.GetResponseCallback(Object state)
--- Inner Exception ---
System.IO.FileNotFoundException
- Could not find file 'C:UserspmohanDesktopReportBuilder.exe.manifest'.
- Source: mscorlib
- Stack trace:
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync)
at System.Net.FileWebStream..ctor(FileWebRequest request, String path, FileMode mode, FileAccess access, FileShare sharing, Int32 length, Boolean async)
at System.Net.FileWebResponse..ctor(FileWebRequest request, Uri uri, FileAccess access, Boolean asyncHint)

COMPONENT STORE TRANSACTION DETAILS
No transaction information is available.

View 1 Replies View Related

XML Help Needed Please

Nov 7, 2007



Hello,
I want to turn this chunk of XML:






Code Block
<ElementList>
<Element>Martin</Element>
<Element>Cyril</Element>
</ElementList>









into a 1-column recordset containing 2 rows with the values 'Martin' and 'Cyril'

Here's the nearest I have got:




Code Block
declare @pElementListXML XML
set @pElementListXML = '
<ElementList>
<Element>Martin</Element>
<Element>Cyril</Element>
</ElementList>

'
;WITH nodes_cte as
(
SELECT [c].[value]('/', 'NVARCHAR(40)') Element
FROM @pElementListXML.nodes('/ElementList/Element') T(c)
)
SELECT *
FROM nodes_cte








but that returns

MartinCyril
MartinCyril


Anyone wanna take this on?

Thanks
Jamie

View 7 Replies View Related

Does Anyone Knows What Is Needed In Each PC For That?

Jul 10, 2006

Hi everyone,
I€™m pursuing a fast deployment for SSIS. I mean, we€™ve got ten ASP/VB6 developers which often doing some DTS stuff by mean, of course, Enterprise Manager.

Now, they€™d have to handle the same but with SSIS. I don€™t have very clear whether only is necessary install them SSIS component or it€™d requires something else. Framework 2.0 too??

View 9 Replies View Related

Please Help Needed!!!

Oct 21, 2007

Hi,

We want to create an Internet sealing system. The web server where the site is located isn€™t owned by our company however the SQL server that contains reservation data is in our Local Area Network. In the beginning, due to security reasons, we considered to set another SQL Server in our DMZ and update our internal SQL Server through Replication. We€™ve been highly recommended to use Web Services instead of Replication. Replication has been let out; however, I€™m thinking of setting a SQL Server in the DMZ which only has stored procedures that update our Internal database (The database which contains reservation data). What€™s your opinion about this? I know that Web Services is the best choice but I would like to know if it€™s a good alternative.

Thanks in advance...

View 1 Replies View Related

Help Needed?

Aug 23, 2006

Hi

I'm a newbie to SQL server..... l'm building a website where companies can save important data. I have a SQL server available but I'm not sure how to store the data. Should I create a new database for every user or should I store everything in the same database and then use a UserId to recognize the data and the user?

The data stored for each user are stored in tables which are exactly the same so all tables could be gathered into one table and then a UserId could tell which records belong to whom.

Hope my english isn't too bad..otherwise just ask me questions and I'll get back A.S.A.P.

Regards

Joachim



View 4 Replies View Related

Please Help Needed!!!

Oct 22, 2007


Hi,

We want to create an Internet sealing system. The web server where the site is located isn€™t owned by our company however the SQL server that contains reservation data is in our Local Area Network. In the beginning, due to security reasons, we considered to set another SQL Server 2000 in our DMZ and update our internal SQL Server through Replication. We€™ve been highly recommended to use Web Services instead of Replication. Replication has been let out; however, I€™m thinking of setting a SQL Server in the DMZ which only has stored procedures that update our Internal database (The database which contains reservation data). What€™s your opinion about this? I know that Web Services is the best choice but I would like to know if it€™s a good alternative.

Thanks in advance...

View 1 Replies View Related

Help Needed

Mar 17, 2007

Hello geeks,
I am new to database thing, wanted to know that does MS reporting services 2005 works with SQL 2000..? if yes than can any one please give me reference link.
I appreciate for the efforts to be taken by you people.

Thanks,
Pranav

View 2 Replies View Related







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