|
gajesh wrote: I created all required linked server object in studio express
Does Express support linked servers - I would be surprised if it does.
Are all the linked servers accessible to your system?
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi!
I have a table Validation:
Id_student --- - id_semestre ----- id_validation
102----------- - 1 ---------------- 4
102----------- - 1 ---------------- 3 --
102----------- - 2 ---------------- 4
103----------- - 1 ---------------- 4
104----------- - 2 ---------------- 3
104----------- - 2 ---------------- 4
I want to select students who have in semestre 2 id_validation = 4 only .
in the example i want have :
102 students, not 102 and 104
thank you.
|
|
|
|
|
This works (using a correlated subquery), but I'm sure it's not the only way to get the correct results:
select v1.id_student from validation v1
where v1.id_semestre = 2 and v1.id_validation=4
and not exists (select id_student from validation v2
where id_semestre = 2 and id_validation<>4
and V1.ID_STUDENT = V2.ID_STUDENT )
Scott
|
|
|
|
|
Thanks scottgp it works.
|
|
|
|
|
If I am working manually to create columns and add it on datagrid view at run time it is not updating through olddbcommandbulder command. But when I am using this code
"datagridview.datasource= ds.tables[0].defaultview;"
then it is updating. But how will I updating when I work manually. Plz give a code in c# .net.
thanx in advance.
|
|
|
|
|
i give up!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Post all your GridView and the related troubles in C# forum.
"Don't worry if it doesn't work right. If everything did, you'd be out of a job." (Mosher's Law of Software Engineering)
|
|
|
|
|
Your problem is not clear man. Can you please ellaborate more on this?
Either you love IT or leave IT...
|
|
|
|
|
How will I validate the text of email address. I am making a window application in c# .net, in the text box I want that the textbox of email contains the '@' without written @ it gives a messagebox that it is not valid email address.
thanx in advance
|
|
|
|
|
Same reply as the DGV, oh wait you know it is C# so go there
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
This is not the right place to ask C#.NET Question. Go to C#.NET Section.
Either you love IT or leave IT...
|
|
|
|
|
In datagridview how will I make a validation for the length of text written in cell, eg. mobile no column takes on 10 digits
|
|
|
|
|
Wrong forum
Take it to VB, C# or winforms
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Repost the question in the appropriate section.
Either you love IT or leave IT...
|
|
|
|
|
Hello,
I have created report using visual studio and in sql 2005. .rdl files got created with the report. Usually in development enviroment, its easy to deploy using the UI and specify the target url..But my requirement is to deploy the report to another server where there is no VS or BI of sql server to get the interface..
Is there way to deploy the created report to the server? Really would appreciate any help on this..
I have seen one article that mentioned to move the dbs to the server..my confusion in this case is that , would that remove the existing reports in the target machine..
Thanks in advance..
Rahul.
SoftwareDeveloper(.NET)
|
|
|
|
|
Hi Rahul,
If SSRS is not installed on the application server then the rdl reports can not run.
Either you love IT or leave IT...
|
|
|
|
|
|
I do not have a specific answer to your question, but your statement
Member 1959062 wrote: What would be causing the ExecuteReader to take so long when connecting to the same instance of a database
is incorrect.
It is not the same instance, you have copied it from the original local machine to a network machine. Therefore your two scenarios use two different databases, not one instance.
Other than that, how does your network perform for other database accesses? If it is generally slow(ish), that is probably the problem.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hi!
I work on an intranet site of a university(sqlserver2005) and I need to do statistics
for example I need to count the students new in the semester 2 for each city:
Here is the SQL query that selects the new students in semester 2:
WITH r1 AS (SELECT CAPITALISE_SEMESTRE_1.NUM_INSCRIPTION, CAPITALISE_SEMESTRE_1.CODE_SEMESTRE , CAPITALISE_SEMESTRE_1.ann_uni, SEMESTRE_1.LIBELLE_SEMESTRE_AR,
TYPE_RELATION_SEMESTRE_1.LIBELLE_TYPE_RELATION_SEMESTRE
FROM CAPITALISE_SEMESTRE AS CAPITALISE_SEMESTRE_1 INNER JOIN
SEMESTRE AS SEMESTRE_1 ON CAPITALISE_SEMESTRE_1.CODE_SEMESTRE = SEMESTRE_1.CODE_SEMESTRE INNER JOIN
TYPE_RELATION_SEMESTRE AS TYPE_RELATION_SEMESTRE_1 ON
CAPITALISE_SEMESTRE_1.CODE_TYPE_RELATION_SEMESTRE = TYPE_RELATION_SEMESTRE_1.CODE_TYPE_RELATION_SEMESTRE
WHERE (CAPITALISE_SEMESTRE_1.CODE_TYPE_RELATION_SEMESTRE = 4) AND (CAPITALISE_SEMESTRE_1.CODE_SEMESTRE = 2)),
r2 AS
(SELECT CAPITALISE_SEMESTRE.NUM_INSCRIPTION AS Expr1, CAPITALISE_SEMESTRE.CODE_SEMESTRE AS Expr2,
SEMESTRE.LIBELLE_SEMESTRE_AR AS Expr3,CAPITALISE_SEMESTRE.ann_uni AS Expr4
FROM CAPITALISE_SEMESTRE AS CAPITALISE_SEMESTRE INNER JOIN
SEMESTRE AS SEMESTRE ON CAPITALISE_SEMESTRE.CODE_SEMESTRE = SEMESTRE.CODE_SEMESTRE INNER JOIN
TYPE_RELATION_SEMESTRE AS TYPE_RELATION_SEMESTRE ON
CAPITALISE_SEMESTRE.CODE_TYPE_RELATION_SEMESTRE = TYPE_RELATION_SEMESTRE.CODE_TYPE_RELATION_SEMESTRE
WHERE (CAPITALISE_SEMESTRE.ann_uni = @ann_uni) AND (CAPITALISE_SEMESTRE.CODE_SEMESTRE = 1))
SELECT r1_1.NUM_INSCRIPTION, r1_1.ann_uni,r1_1.CODE_SEMESTRE, r1_1.LIBELLE_SEMESTRE_AR, r1_1.LIBELLE_TYPE_RELATION_SEMESTRE, r2_1.Expr1,
r2_1.Expr2, r2_1.Expr3, r2_1.Expr4
FROM r1 AS r1_1 INNER JOIN
r2 AS r2_1 ON r1_1.NUM_INSCRIPTION = r2_1.Expr1
but I do not know how to calculate the number for each city:
Number of sudent new in semester2------------City
12222---------------------------------city1
123----------------------------------city2
Thanks.
|
|
|
|
|
Somewhere in that godawful load of crap you call a query there is a join to a table that has the city in it, use group by cityname may be useful.
That is one ugly query!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Thanks Mycroft Holmes;
Groupby gives me no count of student in any city
WITH r1
AS (SELECT CAPITALISE_SEMESTRE_1.NUM_INSCRIPTION,
CAPITALISE_SEMESTRE_1.CODE_SEMESTRE , CAPITALISE_SEMESTRE_1.CODE_TYPE_RELATION_SEMESTRE ,CAPITALISE_SEMESTRE_1.ann_uni
FROM CAPITALISE_SEMESTRE AS CAPITALISE_SEMESTRE_1 WHERE (CAPITALISE_SEMESTRE_1.CODE_TYPE_RELATION_SEMESTRE = 4) AND (CAPITALISE_SEMESTRE_1.CODE_SEMESTRE = 2)),
r2 AS
(SELECT CAPITALISE_SEMESTRE.NUM_INSCRIPTION AS Expr1, CAPITALISE_SEMESTRE.CODE_SEMESTRE AS Expr2,
CAPITALISE_SEMESTRE.ann_uni AS Expr4
FROM CAPITALISE_SEMESTRE AS CAPITALISE_SEMESTRE
WHERE (CAPITALISE_SEMESTRE.ann_uni = '2008/2009') AND (CAPITALISE_SEMESTRE.CODE_SEMESTRE = 1))
SELECT r1_1.NUM_INSCRIPTION
FROM r1 AS r1_1 INNER JOIN
r2 AS r2_1 ON r1_1.NUM_INSCRIPTION = r2_1.Expr1
|
|
|
|
|
Hi all,
I'm using OLEDB to reading data from an excel file, using connection string below:
OleDbConnection conn = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + FileName + ";Extended Properties= 'Excel 8.0;IMEX=1'");
OleDbCommand command = new OleDbCommand("Select * from [ItemDetails$]", conn);
In my Excel sheet, one column contains data like this. :2424245900,PDD012000,IXX088700.
my code reads this value: 2424245900.
But Its return empty string while reading NXX012000,IXX088700
Help me, its urgent.
Thanks in advance..
I couldn't read the file...Please help me!
Thanks in advance.
deesh
|
|
|
|
|
SImple replication question. I am running MS-SQL 2005 on a couple of machines. How can I copy the data from one machine to another. The target machine has some of the data, but I would like to update the dataset with want is on another machine. Simple summary: Replicate the data from production to debug without using backup and restore. There are some tables on the debug machine that are in process of being worked on that have yet to be added to the production, so all I want is productions data to be copied. There are auto incremented keys that need to remain the same.
Thanks,
Leo T. Smith
Program/Analyst Supervisor
|
|
|
|
|
There is no easy way to do this without writing some programming.
Take these things into consideration:
1) What are the dependencies among the tables? This will determine the order of the tables to be processed. For example, Invoice Header is processed before Invoice Details.
2) Auto increment keys could be a killer for you. On production the key may be 1001, but in debug that key is already used. Therefore the program would have to look at the data as a “business object”, meaning it would have to re-create the Invoice Header with a new key and the subsequent invoice details would have to have the proper foreign key to point back to this new Invoice Header.
3) Get yourself a good ER (entity relationship) diagram of your system and start thinking about how you could pull data over in chunks.
Sounds like an interesting challenge , but once you have it made it will become invaluable.
Good luck.
|
|
|
|
|
Thanks for the information. I really was hoping this would not be the case. So then the next questions will to be; Is there a way via stored procedure to:
A. Command for turning on and off constrants?
B. Command to turn off and on auto increment, or would truncating reset increments to 0?
C. Is there a command that will allow for copying data between one DB server and DB another in SQL 2005?
D. Is any of this easier in CLR functions?
Thanks,
Leo T. Smith
Program/Analyst Supervisor
|
|
|
|