|
In short, no.
However, you can export the database in 2005 (scripts, csv etc) and import the data in 2000 as long as you don't use 2005 specific features or datatypes.
|
|
|
|
|
XQuery - its a tricky beast.
Have a look at the script below, I'm creating a simple xml document in a single row in a temporary table. What I want to do is update EVERY value element and set it to D. There's three, A, B and C, and I want all three to be updated to D.
The script complains that I'm attempting to update more than one node. Does this mean I have to use some iterative approach to do this? Any ideas anyone?
CREATE TABLE #temp ( myXml xml )
INSERT INTO #temp VALUES ('<document><value>A</value><value>B</value><value>C</value></document>')
select * from #temp
update #temp set myXml.modify('replace value of (//value/text()) with "D"')
drop table #temp
Regards,
Rob Philpott.
|
|
|
|
|
Rob Philpott wrote: Does this mean I have to use some iterative approach to do this?
Yes, you'll have to iterate through the nodes. SQL Server doesn't support multiple node updates at once.
One way you could do this is something like this:
declare @counter int
set @counter = 1
while (@counter <= 3)
begin
update #temp
set myXml.modify('replace value of (/document/value[sql:variable("@counter")]/text())[1] with "somevalue"')
set @counter = @counter + 1
end
|
|
|
|
|
Perfect. Thanks Mika.
Regards,
Rob Philpott.
|
|
|
|
|
|
Hi,
I am considering using Mono to develop an specific purpose image browser to run on Windows, MAC/OS and Linux.
To meet performance requirements the application requires a database to store thumbnails and search data.
I am looking for suggestions for database products that run on Windows, MAC/OS and Linux that do not require use of technologies such as VMWare or Parallels, which I could use from within a Mono/C# environment.
The application along with the database and the images will be distributed at no cost to "qualified" users, so I'm looking for a zero cost run time database system. The application must run stand-alone - i.e. no network, no servers,
The thumbnails and search data would be imported from the original image files.
The search data would be sourced from embedded IPTC metadata such as keywords and supplemental categories.
The thumbnail and IPTC metadata are injected into the image files using a commercial Digital Asset Management (DAM) application.
I don't insist that the "database" be SQL compliant, b-tree indexes would probably suffice. As long as the same database or index files can be used from within the same Mono application running on Windows, MAC/OS or Linux.
TIA
|
|
|
|
|
|
Hi Mika,
An earlier experience with MySQL was not a happy one so I'd more or less dismissed it, also like many of the others its overkill for my needs.
However SQLite looks good, I like the idea of a using library rather than a separate process. Wonder if anyone's used in a Mono/C# app. I found this[^] nearby, it should get me off the ground.
Thanks heaps - PhilD
|
|
|
|
|
|
Mika Wendelius wrote: If you don't need a "byrocratic" installation, SQLite is most propably a good choice
Nuh, I prefer "graphitic" installs, they're much easier to rub out.
Thanks for doing my research, I put myself on the ximian mailing lists earlier this evening.
rgds PhilD
|
|
|
|
|
Hello everybody,
i have 3 tables Student, Instructor, and Allocation. I have 5 students and 2 instructors how can I allocate 2 instructors to 5 students for project supervision.
StudentId StudentName
1 Learner
2 Paul
3 Griffin
4 Inese
5 Kelly
InstructorId InstructorName
1 Sharma
2 Bill
this is out put table
AllocationId InstructorName StudentName
001 Sharma Learner
002 Sharma Paul
003 Bill Griffin
004 Bill Inese
005
where the Kelly will go?
please any body could give me a clue how should I do it either with queries or mathematical calculations.
let suppose if I write a stored procedure 'Allocation' which take two inputs students and instructors like Allocation 5,2 how it will work.
thnx in adv for any kind help.
regards
learner
|
|
|
|
|
usually, when creating this sort of association you use the ID fields from Student and Instructor table.
But you've answered your own question - If Kelly's instructor is Bill then:
001 Sharma Learner
002 Sharma Paul
003 Bill Griffin
004 Bill Inese
005 Bill Kelly
|
|
|
|
|
thnx for your response
actually it is my fault that i didn't explain properly. Allocation table is only the format that how i need to display it but I'm not sure how can I get this format as (Allocation Table)
cos I got double minded that I should use joins or should i do mathematical calculation first like this
create proc AllocatIns
as
Declare @NumOfRec int,@NumOfRe int, @Result float
select @NumOfRec= count(*) from Student
select @NumOfRe= count(*) from Instructor
Print @NumOfRec
Print @NumOfRe
select @Result =@NumOfRec % @NumOfRe
Print @Result
if you give me the idea how to allocate instructor to students that would be helpful. cos it is all automated process no need for operator to allocate one by one. as we do in GUI Number of students should be assigned from dropdownlist. may be I m not thinking in right direction.
thanx in adv.
regards
learner
|
|
|
|
|
You've still provided a shockingly bad description of your problem and your naming of variables does not help! I think you want to allocate any given number of students to an instructor.
If that is right the process is easy. Insert x number of students who have not been allocated an instructor. I have assumed you hgave changed the Allocation table to hold the StudentId and InstructorId as already suggested. I have also assumed that AllocationId is an identity field.
CREATE PROC AllocateInstructor
@numStudents INT,
@InstructorId INT
AS
INSERT INTO Allocation (InstructorId, StudentId)
SELECT TOP @numStudents
@instructorId,
studentId
FROM Students
WHERE studentId NOT IN(SELECT studentId FROM Allocation)
|
|
|
|
|
your assumption is absolutely fine.
let me try to explain this time may be better this time
we have two table student and instructor
number of records can be change of both student and Instructor tables
lets suppose
Number of students Number of Instructor
30 11
42 9
21 13
16 5
1-what we need to do we have to allocate 11 instructor to 30 students.
2- 9 instructor to 42 students.
3- 13 instructor to 21 students.
4- 5 instructor to 16 students.
let suppose 1,2,3,and 4 represents 2001,2002,2003,2004.
every year number of students and instructor changes and we have to allocate instructor to new students.
any way I really appreciate your patience and time you gave to understand my requirements.
regards
learner.
|
|
|
|
|
How to start a stored procedure, type code and End it? And how to execute the procedure in SQL? Can anyone explain it?
|
|
|
|
|
whether you try to search on google ? if no, then click Google[^]
|
|
|
|
|
|
I think you really need to buy a book, or at least google for some examples as this is one of the most basic parts of database programming. If you don't know this, I suspect you will not know what T-SQL to use in it either.
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
Hi Team,
We need a SSIS functional to move file from source (Local path) to FTP location. (Destination )
The task have been done successfully and move file via objects FTP TASK and ForEach Control provided by SSIS.
Now the given functional is quiet changes, that is we need to create folder date wise dynamically on FTP and move the files.
So could it be feasible to achieve the target and help me out from this scenario.
Thanks and Regards
Tarun Singh
tksingh@zenta.com
|
|
|
|
|
Hi friends
I am getting an error (unknown 0x80005000)like this while installing SQL server 2008 in my system .can u give me some solutions.
regards
B.anand
|
|
|
|
|
Check in your Windows services that Windows Installer Service is running. Also remember that you have to install Windows Installer 4.5[^].
|
|
|
|
|
SELECT DISTINCT Firms.dbo.FirmNames.id, Firms.dbo.FirmNames.FirmName
FROM FirmsInFamily INNER JOIN
Families ON FirmsInFamily.FamilyID = Families.FamilyID INNER JOIN
Firms.dbo.FirmNames ON FirmsInFamily.FirmID <> Firms.dbo.FirmNames.id
WHERE (Families.FamilyID = @FamilyID)
I guess this would work if FirmsInFamily.FirmID only had one entry, but there is a possibility of there being multiple records for this field so how can I remove the records that don't belong because they are located in the FirmsInFamilyTable from the Firms.dbo.FirmNames.
I'm lookin for something that is extremely quick as this search is going to be done quite a bit.
I tried doing a derived table and then deleting, but I guess you can't do that.
Thanks in advance.
Franklin Smith
|
|
|
|
|
You could have a look, what kind of execution plan comes out of something like this. Also check if this gives the desired result (I understood that the original query didn't):
SELECT Firms.dbo.FirmNames.id, Firms.dbo.FirmNames.FirmName
FROM Firms.dbo.FirmNames
WHERE Firms.dbo.FirmNames.id NOT IN
(SELECT FirmsInFamily.FirmID
FROM FirmsInFamily
INNER JOIN Families
ON FirmsInFamily.FamilyID = Families.FamilyID
WHERE Families.FamilyID = @FamilyID)
|
|
|
|
|
Thanks worked like a charm.
SQL sometimes reacts so different from the way I would expect.
I really need to take an indepth class on it.
|
|
|
|