Forum Replies Created

Viewing 15 posts - 316 through 330 (of 424 total)

  • RE: Database Design - Need help in Choosing a primary key

    The number one rule of a primary key is that it must be "meaningless" yet unique. To be meaningless it must not be one of your four columns that...

  • RE: Parsing out a string field

    DECLARE @t TABLE (line varchar(100));

    INSERT into @t VALUES ('ELA-DUPLECHEIN, KELLIE-13-14-2(A-B)');

    INSERT INTO @t VALUES ('READING -LANDRY, MICHELE B-13-14-2(A)');

    SELECT

    CASE WHEN a > 0 AND b> 0 THEN SUBSTRING(line, a+1, b-1) ELSE line...

  • RE: Identify the Backup used to Restore the Database

    Customers generally don't remember how their own backup scheme is set up. Jumping into the history files has helped me know the chain of full and log backups and...

  • RE: Calendar Tables

    I've used tables containing base data for calculating TimeZones and Daylight Savings Times for any year. But, let me tell you they were a royal mess to deal with....

  • RE: Calendar Tables

    I've used calendar tables for all manufacturing sites; they always contained one row per day.

    In my opinion the very biggest reason to create a calendar table is to know the...

  • RE: Execute large number of insert statements

    I'd probably insert the thousand rows into a table variable first. Then, insert the set in one shot. In either case it should take less than a second...

  • RE: Usage of Temprory Table in Stored Procedure

    You may create constraints and indexes on temporary tables. I think you would benefit by having a regular table; that way you could depend on constraints and indexes and...

  • RE: Sending a Variable Number of Elements in a Parameter

    My preference is also for UDTTs. Unfortunately, I think Microsoft faked the implementation by creating a temp table in tempdb and passing that to the stored procedure resulting in...

  • RE: Show All Rows When a Parameter is Null

    Your easiest solution might be to do this simple change. If a parameter is given a value, then a subset of rows will be returned. If the parameter...

  • RE: Leveraging Constraint Evaluation Sequence in SQL Server

    Two more questions I've had for some time.

    Are table and column check constraints actually different or is it just a semantic difference? And do they fire differently?

    Do FOREIGN KEYS...

  • RE: Leveraging Constraint Evaluation Sequence in SQL Server

    Thanks for doing so much work figuring out the order of constraints. I looked last week and could not find Microsoft documentation on it.

    The problem is bigger....

  • RE: Too Much Choice

    This reminds me of the Chinese food menu with 200+ numbered items. If you look at just the headings you can see all items are repeated for beef, pork,...

  • RE: We're not craftsmen and craftswomen

    I'm currently reading a book that beautifully covers the ideas expressed in this editorial.

    Better: A Surgeon's Notes on Performance

    by Atul Gawande

    Link: http://amzn.com/0805082115

    From my perspective, a programmer better meet the...

  • RE: Inline Query

    declare @t table ( birthdate date, age as datediff(year,birthdate,getdate()) ) ;

    insert into @t (birthdate) values ('20000101')

    select * from @t

  • RE: Trouble with setting the value of a variable

    I can't say for sure without a query plan although I virtually always get much better results breaking a monolithic query into several separate queries and using "procedural" step logic...

Viewing 15 posts - 316 through 330 (of 424 total)