Sponsored White Papers, Webcasts, and Downloads
TechRepublic Resources
- Understand the ambiguities of compound JOINs in SQL
- Arthur Fuller explains why he wants developers to think about this general principle: Compound JOINs become nonsensical when one of the clauses references only one of the tables. This article begins with a test. Look at the SQL below and determine, without using your computer, what the ...
- Tags: SQL, Arthur Fuller, dbo.Orders.OrderID, dbo.Orders.CustomerID, Databases, SELECT dbo.Customers.CustomerID, NULL CustomerID, OUTER JOIN dbo.Orders, dbo.Customers, SQL Server Newsletter, TechRepublic Inc., Clause, Row, dbo.Customers.CustomerID, Programming Languages, Software Development, Software/Web Development, Enterprise Software, Software, Data Management
- Technical articles 2005-07-25
Additional Resources
- Understand the ambiguities of compound JOINs in SQL
- good use of on clauseActually, I do use elements of the on clause that only reference one table to good effect. I use it when the table I'm joining with has a lot of records in it that I would like to filter out before joining, (e.g. a description lookup...
- Tags: clause, dbo.Customers.CustomerID, dbo.Orders.CustomerID, dominic@..., join, joins, software, SQL, sql server
- Discussion threads 2005-11-15
- table join
- Hey guys what is the best way to join a table like this let say I've got a table Towns with a pkID and TownName field. And I've got a table named Destination with a pkID, DepartureID, DestinationID. Now destination and departure obviosly refer to the towns pkID field.So how...
- Tags: pkID, SELECT
- Discussion threads 2005-05-17
- Sql Select from Databases on Multiple MSSql Servers
- Is there a way to include the server name in an sql select statement. (E.g select ([select columns] from server1.db1.dbo.table1 , server2.db2.dbo.table2 where [where statements])if not is there any other way to achieve thisLook up sp_addlinkedserverBeen a long time but yiou can then useselect * from Link.dbo.TableWhere link = server.database.Usually...
- Tags: Programming languages, Databases, awcrichton@..., SQL, database
- Discussion threads 2007-05-16
- Look up values in SQL Server using range joins
- Be careful when dealing with floating numberNice, but rather than altering MinWeight to 1.01 we should alter the join condition with x < 1 and x = dbo.ShippingRates.MinWeight AND dbo.Shipments.Weight < dbo.ShippingRates.MaxWeight)
- Tags: Look-up, MinWeight, sql, join, sanjaya.tio@..., software, Microsoft SQL Server, server
- Discussion threads 2006-05-16
- Building and using table UDFs in SQL Server
- Table UDFs (user-defined functions) are one of Arthur Fuller's favorite features of SQL Server 2000 and 2005. Find out why he says that, if you've never used them, you may be in for a surprise. Table UDFs (user-defined functions) are one of my favorite features of SQL Server...
- Tags: Microsoft SQL Server, UDF, Databases, Arthur Fuller, server, SQL Server Newsletter, TechRepublic Inc., Fun, Table, Enterprise Software, Software, Data Management
- Technical articles 2006-08-07
- Can a combo box be set to display only certain data
- I have a combo box that selects a customer and brings up all of the data associated with that customer (Billing data on Main form, Order data (on Sub form #1) and Shipping Data on Sub form #2)...The combo box is unbound and uses a select table/query.Both subforms are 'bridged...
- Tags: imroseofsharon@..., combo box, Sub
- Discussion threads 2007-09-12
- Build molecular queries from atoms in SQL Server
- What is your preferred method of doing things? Arthur Fuller says his M.O. is what he calls molecular queries. This scalable technique allows him to re-use and re-combine the atoms as requirements demand. Every SQL Server developer has a preferred method of doing things; mine is what I...
- Tags: Microsoft SQL Server, CustomerID, Databases, Arthur Fuller, server, ExtendedAmount, Northwind_New, SQL Server Newsletter, TechRepublic Inc., Atom, Column, Productivity, Enterprise Software, Software, Data Management
- Technical articles 2006-09-01
- Help with SQL Query (Date ranges)
- I've been struggling with a SQL query and can't find a answer anywhere, although I've come kinda close. I need to pull a range of users by hire date BUT just the month and day. For example I want to pull all users who had a hire date...
- Tags: ADynes@..., DatePart
- Discussion threads 2007-07-11
- Alter every table in a SQL database
- Adding two columns to every table in a database that contains hundreds of tables is impractical to do by hand. Arthur Fuller describes how simple it is to create a query that performs this task. All developers make mistakes from time to time; sometimes this happens...
- Tags: SQL, Databases, Arthur Fuller, database, ALTER TABLE NorthwindTest.dbo, ADD LastUpdated TimeStamp NULL, LastUpdated TimeStamp, SQL Server Newsletter, TechRepublic Inc., Table, Storage, Hardware, Enterprise Software, Software, Data Management
- Technical articles 2005-07-22
- Date Format and correlated subquery
- I need to take a month and day field in a table, and update a new date field, based upon the month and year. I tried this query, which says it updates the records, but none of the date fields are updated. Can someone tell me what is...
- Tags: dateTime, FETCH NEXT, programming, Randy.L.Kemp@...
- Discussion threads 2004-11-05
- Problem with SQL Query in Visual Basic
- The following query works if I remove the "tblLocations.PrimaryFlag=-1" from the WHERE statement. I wanted to see if anyone could tell me what I am doing wrong. I have also tried "tblLocations.[PrimaryFlag]='-1'" and "(((tblLocations.PrimaryFlag)=-1))". I need to be able to filter for records with a -1 result for...
- Tags: Microsoft Visual Basic, programming, SELECT tblCustomers.CustomerID, strSQL, tblLocations.PrimaryFlag, tblLocations.PrimaryFlag=-1, twhite@...
- Q&A 2005-09-14
- Create an AutoLookup query in Microsoft Access
- Want more Access tips and tricks? Automatically sign up for our free Microsoft Office Suite newsletter, delivered each Wednesday! You can reduce typing time by basing your Access forms on AutoLookup queries. For example, let's say you need todevelop an Order form that includes fields from both the Customers table...
- Tags: AutoLookup, AutoLookup query, Customers table, Mary Ann Richardson, Microsoft Access, Microsoft Corp., Orders table
- Technical articles 2005-03-15
- Assess a SQL Server applicant's skills with this TSQL test
- For Test item #7: "Return the Product Category and the average Sale Price for those customers who have purchased two or more products." If what you really asked as I believe you intended to ask was:"Return the Product Category and the average Sale Price for those customers who have purchased...
- Tags: applicant, developer, george_c57@..., Microsoft SQL Server, programming, server, SQL
- Discussion threads 2006-10-23
- Work in multiple databases using these methods
- Do you need to use tables residing in a database that is not the project's "home" database? Then check out these two different methods SQL Server expert Arthur Fuller offers for developing in multiple databases. SQL Server developers sometimes have to use tables residing in a database other...
- Tags: Arthur Fuller, Storage, Databases, Operational accounting, database, foreign database, server, SQL Server Newsletter, Table, Hardware, Enterprise Software, Software, Data Management
- Technical articles 2006-02-13
- Finding the highest value in several SQL Server columns
- If your task is to return the maximum value contained on a row from n columns, you may want to program defensively, anticipating that some new columns might be added. See why Arthur Fuller says this approach can leave you with useful functions. You have a SQL Server table...
- Tags: Microsoft SQL Server, Databases, Arthur Fuller, server, supposition, SQL, SELECT dbo.Max2, MinMaxID, SQL Server Newsletter, Column, NULL, dbo.Max2, Enterprise Software, Software, Data Management
- Technical articles 2007-02-26
- Thinking SQL: Set-based logic can improve query performance
- You can't teach an old dog new tricks—atleast that's what the cliché says. Many developers intentionally try to be the "olddog" so they don't have to learn new tricks. Some developers, even thosewho have been developing client server, Web-based, and smart clientapplications, still approach problems with a procedural mindset. They...
- Tags: customer id, id, performance, Robert L. Bogue, SELECT Customers.ID, SQL
- Technical articles 2005-01-18
- Defining cascading referential integrity constraints in SQL Server
- Cascading referential integrity constraints are foreign key constraints that tell SQL Server to perform certain actions when a primary key field in a primary key-foreign key relationship is updated or deleted. By using cascading referential integrity constraints, you can define the actions that SQL Server 2005 takes when a user...
- Tags: databases, sql server
- Blog posts 2007-06-25
- Using SQL Server 2008's MERGE statement
- Can you get the Identity key back?This is a great idea. It can reduce the "CU" of my CRUD stored procedures to have one for both create and update.When doing the "WHEN MATCHED", can you do a begin/end block there so that you can capture the @@IDENTITY value?YesYou could do...
- Tags: Paul C., Using SQL Server 2008, SELECT CustomerID, TotalSalesCount, TotalSalesAmount, GetDate, LoadDate
- Discussion threads 2007-09-25
- Thinking SQL: Set-based logic can improve query performance
- Personal Best QueryThinking in SQL can improve the performance of your database queries.However, knowing that fact and acting on it are two very different things. :D[b]What do you consider your personal best query; the query that makes you proud? Share it with the community and compare your SQL prowess...
- Tags: Mark W. Kaelin, performance, SQL
- Discussion threads 2005-01-18
- << Previous
- page 1 of 1
- Next >>