|
Yes I actually tried that and made it. IT is actually union of left join, right join and inner join
|
|
|
|
|
Branislav Vidovic wrote: and inner join
Of course - stupid of me to forget it.
Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis
|
|
|
|
|
|
Hello,
I have two data tales in Access. One contais 2 million recors and the other contains 116000 records. The Customer name, street address, city and zip code fields need to be matched against each other across both tables in order to fin mismatches and exact matches.
Since one of the tales is very large, I am having a problem with the database program hanging every time I run the query. I tried doing this in SQL server 2005 as well, with no success.
Can anyone suggest a method for accomplishing this?
Regards.
|
|
|
|
|
Please post your query so that we might be able to understand why it refuses to dance.
"My interest is in the future because I'm going to spend the rest of my life there." - Charles F. Kettering
|
|
|
|
|
You can create a non-clustered index for every condition and If you optimize your query that also will help you. Please post your query.
Education is not a way to escape poverty — it is a way of fighting it.
|
|
|
|
|
2 million records is not large in SQL server (although it may be in Access) so it has got to be your query. As suggested by others add some indexes and try optimising your query.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi
how i can see if the server is working or not ?
in sql server 2000 there was tool that show it
if there Isn't any tool, how i can open and close the server ? (script ?...)
thank's in advance
|
|
|
|
|
E_Gold wrote: how i can see if the server is working or not ?
Just try to open a connection
E_Gold wrote: how i can open and close the server ?
Open the Control Panel, go to the Administrative Tools and open the "Services" applet. From there you can start and stop the service.
Wha?
|
|
|
|
|
is there any script that can open/close the server ?
thank's
|
|
|
|
|
No SQL script; if the server is closed, how would you execute that SQL-script?
You can use VBScript[^]
I are Troll
|
|
|
|
|
|
net start [Service] and
net stop [Service]
|
|
|
|
|
I learned here, we have to issue " netstat -an " to identify the port-1433 is configured or not..
I also checked and got the following screen,
Proto Local Address Foreign Address State
....
TCP 0.0.0.0:1433 0.0.0.0 Listening
TCP MY SQL SERVER INSTALLED
MACHINE IP : 139 0.0.0.0 Listening
...
and then for UDP.
And Iam not getting like the below,
TCP MY SQL SERVER INSTALLED
MACHINE IP : 1433 0.0.0.0 Listening
So what I have to do? From where I have to troubleshoot? Also getting confusion, my domain only have static ip, this Sql server installed machine ip is not a static ip.
Any ideas please?
Thanks
|
|
|
|
|
hi
I want to learn sql joines can anyone provide me link for the best article that would help me.
Thanks
|
|
|
|
|
Here is one of the Best Join article link from Code Project, This is totally visual representation of Join in SQL.
Visual Representation of SQL Joins[^]
This will clear your doubts on joins
|
|
|
|
|
A Real Work at Home Opportunity as an Independent Advertising Executive. We offer home workers the opportunity to earn extra money from the comfort of their own home. Visit Us at http://www.clicknearn.net/idevaffiliate/idevaffiliate.php?id=3171_9
|
|
|
|
|
If you want to advertise pay for it, don't spam forums - and the jobs are a con anyway
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
hi friends please help,
while logging into database iam getting following error:-
ora-12528 tns listener all appropriate instances are blocking new connections
i tried every thing that i found in forums
problem still continues.....
|
|
|
|
|
|
hello
About to install a Reporting Service - and I want to tighten security by not assigning to Reporting Service an Administrator (OS level) or sa (SQL level) account.
Any recommendation? An URL would be nice.
Thanks
dev
|
|
|
|
|
What a nightmare...
I'm currently writing pl sql for postgresql. I'm not a qualified DBA and pl sql is quite new to me. I've always rather used plain sql/linq and ADO.NET but for this specific problem it is better(I think) to write a stored procedure. The thing is that I can't seem to get debugging to work in postgresql. I'm running postgres v 8.4.(something). Is there a opensource ide that I can use to compile and debug postgresql stored procedures (Currently running dreamcoder and pgadmin III). I need help and google isn't giving me helpful answers. I have a logical error in my procedure and I can't step throught the code. I'm also using unidirect as my dataprovider in VS 2008 but guess what: No design time support for unidirect. Big up to corelab and my idiot boss for deciding on this so everything has to happen @ runtime(So much for RAD). VS 2008 would have allowed me to generate the SP if this worked...Please help me fellow programming mates. What is there to do
Regards
.Net developer with DB issues
modified on Friday, August 7, 2009 5:44 AM
|
|
|
|
|
I'm trying to search some data in a table I don't have control over and I need to figure out how to do an logical and between two specified search items.
I need to find all rows in a table that has the same value in collumn A and column B is equal to X or Y.
The is similar to the following, but it contains more than 600,000 records.
Tablename: data_table id | record_id | parm_type | value | 0 | 0 | 1001 | 10 | 1 | 0 | 1002 | 20 | 2 | 0 | 1003 | 30 | 3 | 0 | 1004 | 40 | 4 | 1 | 1001 | 15 | 5 | 1 | 1002 | 25 | 6 | 1 | 1003 | 35 | 7 | 1 | 1004 | 45 | 8 | 2 | 1005 | 20 | 9 | 2 | 1002 | 30 | 10 | 2 | 1003 | 40 | 11 | 2 | 1008 | 50 | 12 | 3 | 1007 | 20 | 13 | 3 | 1002 | 30 | 14 | 3 | 1003 | 40 | 15 | 3 | 1007 | 50 | 16 | 4 | 1001 | 20 | 17 | 4 | 1002 | 30 | 18 | 4 | 1007 | 40 | 19 | 4 | 1008 | 50 |
I want to get every value with the same record_id, that has a parm_type type of 1002 or 1003 and the value is greater than 20 for type 1002 and less than 40 for 1003.
Here is what I tried but it was taking very long and gets execution timeouts
SELECT id,record_id,parm_type,value FROM data_table
WHERE record_id IN
(
SELECT record_id FROM data_table
WHERE parm_type=1002 AND value > 20
)
AND record_id IN
(
SELECT record_id FROM data_table
WHERE parm_type=1003 AND value > 40
);
I know there have to be others ways to accomplish this, but I'm no DBA...
|
|
|
|
|
Couple of ideas,
1 - Create a temporary table. Execute each query separately and insert to temporary table. Finally, select the temporary table. Here is it
CREATE TABLE #temp
(
);
insert into #temp
SELECT record_id FROM data_table WHERE parm_type = 1002 AND value > 20
insert into #temp
SELECT record_id FROM data_table WHERE parm_type=1003 AND value > 40
SELECT * FROM #temp
2 - Use UNION[^]
SELECT record_id FROM data_table WHERE parm_type = 1002 AND value > 20
UNION
SELECT record_id FROM data_table WHERE parm_type=1003 AND value > 40
|
|
|
|
|
Navaneeth thank you for your reply.
I think a UNION statment would merge record_id that would match either of the parm_type requirements.
Please correct me if I am wrong!
|
|
|
|