SELECT a.interest_parent_id, a.interest_element_id, b.alr_category_id AS
interest_category_id, a.allergy_parent_id, a.allergy_element_id,
c.alr_category_id AS allergy_category_id
FROM (AllergyDrugPermutation AS a INNER JOIN alr_category_drug_map AS b ON
a.interest_element_id = b.drug_id) INNER JOIN alr_category_drug_map AS c ON
a.allergy_element_id = c.drug_id
and all is well!
When I create the same query in SQL sever (using the desinger), I get:
SELECT a.interest_parent_id, a.interest_element_id, b.alr_category_id AS
interest_category_id, a.allergy_parent_id, a.allergy_element_id,
c.alr_category_id AS allergy_category_id
FROM dbo.AllergyDrugPermutation a INNER JOIN
dbo.alr_category_drug_map b ON a.interest_element_id =
b.drug_id INNER JOIN
dbo.alr_category_drug_map c ON a.allergy_element_id =
c.drug_id
The only structural difference I see here is that SQL removed the ( and )
from around the first join and created the double join.
When I run this query I get stuck in a loop and eventually the sever will
time out. If I only have the first join there is no time out issues but of
course the result is not what I desire.
Can someone help me out here and tell me what is wrong with the statement
used in SQL?
I wish to know the performance benifits of using SQL Server 64 bit over 32-bit and under what conditions should one make a transition from 32 bit environment to 64 bit one.
What is the difference between MS SQL Server Management Studio Express and MS SQL Server 2005 Express Edition? i download SQLEXPR.EXE, do i also need to download the other?
Hi, I am totally a newbie to MS SQL. I have a question regarding the MS SQL: What is the difference between the MS SQL and the SQL Server? Is it the same? and what should be install for MS SQL on the server and the client side???
I am new to SQL Server and am trying to write a query that subtracts the time difference in the same column. I need to know the time difference between BatchSequence 2, LoadSequence 1 and BatchSequence 13, LoadSequence 3. Below is an example of the data. Thanks in advacne for the help!
BatchSequenceLoadSequenceScanLabelProcessDate 13 1Part Number11/1/2007 6:08:02 AM 13 2Scan Trace11/1/2007 6:08:03 AM 13 3Slot Position11/1/2007 6:08:04 AM 2 1Part Number11/1/2007 5:53:06 AM 2 2Scan Trace11/1/2007 5:53:07 AM 2 3Slot Position11/1/2007 5:53:08 AM
Do you find that there is a big difference between the different versions of SQL server (6.5, 7, 2000, 2005) as is between Microsoft programming languages (VB.4, VB5, VB6, .Net and now .Net 2) Or is the difference in SQL server minimal and very small compared to the programming languages I mentioned. Thanks a lot
I'm a beginner programmer and databases are still a bit of a mystery to me. I have some basic questions that I can't find direct answers for anywhere but which I think should be fairly simple for someone acquainted with using databases in programming.
1. MySQL & MS SQL Server (or Express)...what's the difference? Are they mutually compatible? Are all SQL files written in the same file format?
2. If I write create a MySQL database on my website to store customer data, can my application which was written with VB 2005 Express (and which uses MS SQL Server Express) read those database files? Vice-versa?
3. If I create a MS SQL database in VB express for my application, is that database on some huge central server somewhere or is my computer used as the server, or what? (yeah, I know that's probably a really stupid question but I can find the answer in any of the three programming books I've bought in recent months or online either.)
4. I've read the MySQL is free unless I use the databases within an actual application from which I'm making money, in which case I need to buy a license. What about MS SQL Server or MS SQL Express? Microsoft can be so withholding about what costs money, what is free, and what is temporarily free.
That's all for now...I hope someone can answer my stupid questions.
Hi Everyone,Apparently, I was being asked on a question, "Why don't we procure adesktop PC to run MS SQL Server 2000 rather than a buying a server?".From a Management point-of-view, buying a desktop PC is much cheaperthan a server. However, I just wanted to understand that is it aviable solution given the database size is something around 200 GB?Equipping with more memory, more storage and a more powerful CPU on adesktop PC could really taking up the role to support the DBMS?Besides this "sensitive" costing concerns, what will be othersdifference in running the SQL Server 2000 on the two differenthardware architecture? For example, IO rate, reliability, RAID-1support, performance, … etc.(Note: The operating system is Microsoft Windows 2000 EnterpriseEdition)Regards,Ambrose
Hi all, I want to share an experience I made in the last few days and like to hear your comments about it. I am developing an ASP.Net 2.0 Web Application using SQL Server 2005 on my local system. After implementation was done, I had to deploy the application to the production server. Because of license problems, on the server is the express edition of SQL Server installed. The system worked fine for about 2 month. But the last week we noticed, that there was deadlocks in the application. After searching a while I noticed, that there were a lot of open connections. When you open SQL Server Management Studio and look at Management > Activity Monitor, you can see all opened connections in the connection pool. So the problem was, that with every request, a new connection was created, instead of using the existing ones, even if the state of the connections was sleeping. On SQL Express, if a specific limit of connections is reached, it'll wait for a connection to be released, but there is no release, so it threw a timeout error. But suprisingly, on SQL Server there also were a lot of connections created, but there were never a deadlock, which I can't explain. Also I can't explain, why it also worked for 2 months on SQL Express. The architecture: I have data classes, which are implementing IDisposable. In the dispose method, I call Dispose on the connection and set it to null. And in code I instanciate my data classes in using blocks. So on reaching the end of the using block the data class instance is disposed. In the dispose method the connection is disposed. So I thought, that everythink will work fine, but it doesn't. The problem was solved by calling Close() on the connection in the Dispose method in my data class just before calling conn.Dispose(). So does this make sense to you? The fact, that it solved my problem lets me believe to that solution, but I can't really say why. So if you have any ideas or knowledge, I'd love to hear it. Regards, Koray
Hi, I am developing an web-database application using ASP.net,c# and MSDE. and after the completion of the project i want to deploy the database over the server whichs got sql server professional edition. Are there any changes to be made while deploying it over the server and also will the connection string for MSDE and SQL client the same ? Please do clear me the confusions i have got .. thanks inadvance
As we known, we can build up the data in not only in Server version but also in Sesktop version. So, what's the difference? Except the power that Server can provide compared to the desktop computer. Whatelse?
I am using SQL 2000 and/or SQL 2005 to link to an Oracle Db usingOPENQUERY.The SQL 2000 box is SP4 on Win2000.I can run a query thru Q.A. for SQL 2000 or I can run an Oracle querythru SQL-Plus to see the data. But, if I run a date-query using thelinked server then SQL Server returns a TIME that is off by 4 hours.SQL Query:SELECT * FROM OPENQUERY( ORASERVER, 'SELECT MYDATE FROM MYTABLE')Oracle Query:'SELECT MYDATE FROM MYTABLE'Oracle results:04/16/2006 01:07:00SQL 2000 result:04/16/2006 05:07:00Has anyone seen this before? Is there a fix?I have searched the newsgroups and MS Kb but can not find an answer.Thanks,Marty
do any body know the article that can give me berif idea about the difference between sql server 2005 and 2008, acutally i want to move over to 2008. but if the difference is not that much then i m might think about that.
Hello everyone,i want to know abt the "Difference between MSDE and SQL Server 2000". For example the features they support, capacity and requirements etc...
--find day,month,year --for day select datediff(d,'01 may 2008',getdate()) -- --for month select datediff(m,'01 jun 2006',getdate()) -- --for year select datediff(year,'01 jun 2006',getdate()) above working fine but suppose difference is 1 year 4 month and 2 month 15 days then It's giving 1 year and 2 month respectively. but I want completely so I can use this in case of expired user in my project. User can be expired in 1 month,3 month and 1 year. So I'm not able to recognize. thanks
I have an issue with Delete statement.In the code given below (its a part of actual proc),if we use TRUNCATE to clean the temp tables, everything goes fine.But if I use DELETE in place of truncate, system skips the IF loop 'if (@script_type = 1 OR @script_type = 2)'I am not able to understand this behavioral difference between DELETE and TRUNCATE.Recently the database is being used for replication, but that should not be a reason.
SELECT @max_rows = COUNT('X') FROM #temp_table1 SET@row_cnt = 1 WHILE @row_cnt <= @max_rows BEGIN
I have a table with a list of jobs along with their start and end datetime values.
I am looking for a function which will return the time taken to process a job using a start date and an end date. If the date range covers a Saturday or Sunday I want the time to ignore the weekends.
Example
Start Date=2014-05-15 12:00:00.000 End Date=2014-05-19 13:00:00.000
Total Time should be: 2 Days, 1 Hour and 0 Minutes
I have a table with appdt as first appointment date and the another record for the same customer# has follow up appointment.
Each customer is uniquely identified by a customer#
I need to find out if the customer came back after 200 days or more when the first appointment date was between jan12014 and Aug 31 2014. I am only interested in first follow up appointment after 30 days or more.
Hello,I just installed a SQL server and playing with it. I was reading up onCollation and tried rebuilding the master database after changing toLatin 1. After the master database was built, I looked at the regionalsettings and realized that it was still English. When I tried tochange the settings again using rebuild database, I saw that myselection was gone and replaced by the default setting. Iam a newbieand any help is appreciatedThanks!Sunder
1. I have 2 sets of CDs, one is called Sql Server 2005 Developer Edition, Applications Developer Tools, and another one called Sql Server 2005 Developer Edition Servers Server Applications.
I installed the Applications Developer Tools on my development pc, and I was able to use create and populate a database, and use Sql Server Management Studio fine. I wonders what 's the Servers Server Applications set of cds for.
2. I just like to install Sql Server 2005 on a test pc also. Can I use my Developer Edition Applications Developer Tools to install it ?
I created a CLR UDF that returns a large number of rows, when I run it from my VPC (XP, SQL Server Developer Edition and 1GB Memory) it takes approx 2 min and 30 secs to start displaying the rows (Using Management Studio), when I run the same query in our development server (Win 2003, SQL Server Enterprise Edition, 8 GB Memory and 8 Processors) it takes more than 15 min to start displaying the results, does anybody have an idea why is this happening?