|
|
jimrice14
jimrice14
 |
|
Stories kicked by jimrice14
|
|
submitted by
jimrice14
6 months, 24 days ago
weblogs.sqlteam.com — Everyone seems to want to "pivot" or "cross tab" data, but knowing how to do the opposite is equally important. In fact, I would argue that the skill of "unpivoting" data is more useful and more important and more relevant to a SQL programmer, since pivoting results in denormalized data, while unpivoting can transform non-normalized data into a normalized result set. read more...
add a comment
|
category: Database | Views: 1
|
|
tags:
Database | tag it
Everyones tags: | Your tags: | |
|
|
|
|
|
submitted by
jimrice14
1 year ago
weblogs.sqlteam.com — In SQL, the general rule of thumb is that the number of rows returned from a SELECT will be zero if your criteria did not match any data. However, there is an important exception to this rule; it does not apply when asking for aggregate calculations such as SUM(), MIN() or MAX(), without any grouping. This is rather interesting and important to know and look out for, as it can cause some confusion and recently some of my ASP.NET code failed due to this. Let's take a look. read more...
add a comment
|
category: Database | Views: 1
|
|
tags:
Database | tag it
Everyones tags: | Your tags: | |
|
|
|
|
|
submitted by
foreach
1 year ago
weblogs.sqlteam.com — A simple function in C# that takes a single DataTable and creates a related parent DataTable in the same DataSet based on specified parameters. This is useful if you only have a single result set from SQL (or any other data source) and you'd like to break that data up into two separate parent-child DataTables in order to use nested repeaters or any other type of parent-child processing on the data. read more...
add a comment
|
category: ADO.NET | Views: 0
|
|
tags:
Database, ADO.NET | tag it
Everyones tags: | Your tags: | |
|
|
|
|
|
submitted by
jimrice14
1 year ago
weblogs.sqlteam.com — I think the easiest way to think of CROSS APPLY is that it is like doing a CROSS JOIN with a correlated sub-query instead of a derived table. Let's take a look .... read more...
add a comment
|
category: Database | Views: 1
|
|
tags:
Database | tag it
Everyones tags: | Your tags: | |
|
|
|
|
|
published 1 year, 1 month ago, submitted by
jimrice14
1 year, 1 month ago
weblogs.sqlteam.com — I had previously written about the danger of Criteria on Outer Joins, but recently another situation popped up that occasionally causes issues with OUTER JOINS that I thought I might address. The issue is when you have multiple tables joined in a single SELECT, and you mix OUTER and INNER JOINS together. The end result doesn't always seem to "work", and it can be tricky to understand exactly why and how to fix it without incurring additional unintended side effects. read more...
add a comment
|
category: Database | Views: 1
|
|
tags:
Database | tag it
Everyones tags: | Your tags: | |
|
|
|
|
|
submitted by
jimrice14
1 year, 1 month ago
weblogs.sqlteam.com — A question I see very often in the SQLTeam forums is how to return data in a somewhat summarized form by concatenating multiple values into a single CSV columns. This can be done fairly easily in T-SQL, but as the formatting and concatenation requirements becomes more elaborate, be sure to ask yourself: Am I forcing presentation code into the database layer? read more...
add a comment
|
category: Database | Views: 0
|
|
tags:
Database | tag it
Everyones tags: | Your tags: | |
|
|
|
|
|
published 1 year, 2 months ago, submitted by
jimrice14
1 year, 2 months ago
weblogs.sqlteam.com — Some tips regarding optimizing your SELECT statements when using conditions in your WHERE clause based on optional parameter values. read more...
add a comment
|
category: Database | Views: 1
|
|
tags:
SQL, Database | tag it
Everyones tags: | Your tags: | |
|
|
|
|
|
published 1 year, 2 months ago, submitted by
jimrice14
1 year, 2 months ago
weblogs.sqlteam.com — It's all about using the right data types. Sure, there's no "date" or "time" only data type available, but that's no excuse to return VARCHAR strings formatted as dates or times instead of the correct data type: datetime. read more...
1 comment
|
category: Database | Views: 0
|
|
tags:
Time, Date, SQL | tag it
Everyones tags: | Your tags: | |
|
|
|
|
|
published 1 year, 2 months ago, submitted by
jimrice14
1 year, 2 months ago
weblogs.sqlteam.com — When you define more than one column as your primary key on a table, it is called a composite primary key. And many experienced and otherwise talented database programmers have never used them and may not even be aware of them! Yet, composite primary keys are very important when designing a good, solid data model with integrity. read more...
add a comment
|
category: Database | Views: 0
|
|
tags:
DataModel, DB, CompositeKeys | tag it
Everyones tags: | Your tags: | |
|
|
|
|
|
published 1 year, 3 months ago, submitted by
jimrice14
1 year, 3 months ago
weblogs.sqlteam.com — Dealing with poorly designed databases is a simple and common fact of life for programmers. It happens, sometimes due to lack of experience or education, or sometimes because business requirements were never analyzed properly or they changed. It's hard to avoid poor database designs, but it takes only a simple concept to make fixing those designs much easier. read more...
1 comment
|
category: Database | Views: 1
|
|
tags:
DB, Database | tag it
Everyones tags: | Your tags: | |
|
|
|
|
|
published 1 year, 3 months ago, submitted by
jimrice14
1 year, 4 months ago
weblogs.sqlteam.com — Column 'xyz' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
Arggh!! There it is, yet again .. that annoying error message. Why is SQL so picky about this? What's the deal!? read more...
1 comment
|
category: Database | Views: 1
|
|
tags:
GroupBy, SQL | tag it
Everyones tags: | Your tags: | |
|
|
|
|
|
published 1 year, 4 months ago, submitted by
jimrice14
1 year, 4 months ago
weblogs.sqlteam.com — There's a fascinating technique that I see many beginners use when writing SQL statements, and I call it the "Nested WHERE-IN" anti-pattern. It is, unfortunately, a common SQL technique used to avoid JOINS at all costs. read more...
add a comment
|
category: Database | Views: 1
|
|
tags:
AntiPatterns, SQL | tag it
Everyones tags: | Your tags: | |
|
|
|
|
|
submitted by
jimrice14
1 year, 4 months ago
weblogs.sqlteam.com — I see it time and time again in forums -- "dates" that don't sort properly, "numbers" that don't sort or sum() correctly, made up "boolean" conventions that are difficult to work with, and so on ... Of course, without a schema or DDL to see, it sometimes takes many posts going back and forth until we finally realize: "wait ... you aren't using a datetime data type to store these dates???" read more...
add a comment
|
category: Database | Views: 0
|
|
| tag it
Everyones tags: | Your tags: | |
No tags
|
|
|
|
|
published 1 year, 4 months ago, submitted by
terrble
1 year, 4 months ago
weblogs.sqlteam.com — SQL Server has everything you need already in place to accept large, complicated sets of data as parameters in a stored procedure! read more...
add a comment
|
category: Database | Views: 1
|
|
tags:
SQL, StoredProcedures | tag it
Everyones tags: | Your tags: | |
|
|
|
|

Sponsored Link: www.carlist.ie
Ads via The Lounge
|