Design

External Article

Free PDF Booklet: 119 SQL Code Smells

  • Article

Once you've done a number of SQL code-reviews, you'll be able to identify signs in the code that indicate all might not be well. These 'code smells' are coding styles that, while not bugs, suggest design problems with the code. In this PDF, Phil Factor's put together 119 of those code smells so you can see what to avoid and why.

2014-09-25

12,476 reads

Technical Article

RE: EXEC permission

  • Reply

You pretty much said it yourself. The user needs to have direct access to the table if you make the select in dynamic sql. Try this to solve your problem : Declare @maxrows as int set @maxrows = 10 Set rowcount @maxrows select * from dbo.SysObjects order by name set rowcount 0 This will allow […]

You rated this post out of 5. Change rating

2005-03-24

Technical Article

RE: Address table

  • Reply

If your question is: "Is it better to have a single table with the capacity for multiple addresses in a single row, or one master table linked to an address table?", basic database theory would tell you to create a separate address table and this is what I would recommend. This is how relational databases […]

You rated this post out of 5. Change rating

2004-11-21

Technical Article

RE: Simple recovery?

  • Reply

Tnx, this sounds promising and I am going to give it a try. Cuurently I am struggling with another problem, related to this 1: see http://qa.sqlservercentral.com/forums/shwmessage.aspx?forumid=5&messageid=114219If you have an answer to that 1, I owe you.

You rated this post out of 5. Change rating

2004-05-04

Technical Article

RE: ListExtendedProperties function

  • Reply

Lorna, You need to supply a maximum VARCHAR length in your CAST (same with CONVERT) function, or the max will be set at 30. Compare: select cast(replicate('1234567890', 20) AS VARCHAR) with select cast(replicate('1234567890', 20) AS VARCHAR(255)) Cheers, - Mark

You rated this post out of 5. Change rating

2003-08-14

Technical Article

RE: Wrong Data

  • Reply

The trick here is in excluding all people with any record where note_type_fk = 29. Your current query will return people with note_type_fk = 29 if they also have a record with a different note_type_fk. Analyzing a query of this complexity is not simple without the actual data behind it, but you can try this […]

You rated this post out of 5. Change rating

2003-07-31

1 reads

Blogs

Small Data SF 2024

By

I can’t remember how I heard about Small Data SF 2024, but it caught...

A New Word: Moledro

By

moledro – n. a feeling of resonant connection with an author or artist you’ll...

Snowflake + Azure blob

By

Let’s go back to data platforms today and I want to talk about a...

Read the latest Blogs

Forums

7 sept, scheduled book

By philip.scott

Comments posted to this topic are about the item 7 sept, scheduled book

7 sept, schedlued article

By philip.scott

Comments posted to this topic are about the item 7 sept, schedlued article

6 sept, published book

By philip.scott

Comments posted to this topic are about the item 6 sept, published book

Visit the forum

Question of the Day

Azure Data Lake Storage Gen 2

Azure Data Lake Storage Gen 2 is built on ...?

See possible answers