Forum Replies Created

Viewing 15 posts - 31 through 45 (of 141 total)

  • RE: Check Certain ansi settings

    Any Ideas?

  • RE: Validation - time format in varchar field

    In SQL 2008 you could use the time datatype (12:35:29. 1234567)

    Prior to that I would use Datetime.

    I would use a datatype that understands date / time and not varchar.

    There are...

  • RE: How to get store procedure name from trigger

    you can do something like this in your trigger.

    Obviously this is risky as if the output of DBCC INPUTBUFFR changes your trigger will break.

    DECLARE @ProgramName nvarchar(128)

    DECLARE @Text nvarchar(4000)

    SELECT @ProgramName =...

  • RE: Determining if a substring is a number...with variable substring lengths

    you can use a tally or number table to split the string and do your comparison against each position.

    -- create a temp tally table for test and fill it with...

  • RE: Varchar or Char?

    this was a good question

  • RE: Need suggestions on Table design

    I like the bit on the territories table if all the territories are apples.

    From what I read it sounded like terrirtories of level 2 were apples and other territories were...

  • RE: Need suggestions on Table design

    based on the information provided I like the solution that is in place if most of your searches are to retrieve territories that have the preference --Create a table that...

  • RE: Computing sequential ranges of dates

    here is a quick sample I put together. I could probably come up with something more elegant after I think about it some more.

    Depending on the amount of data you...

  • RE: Handling of Primary Keys

    I have seen this strategy used before to help with merging disconnected datasets.

    The reason they do not use the PK + 1 is probably because of the possibilty of inserting...

  • RE: SQL & Crystal

    Depending on your sql security strategy ...

    1. they should be able to connect directly with windows authentication setting up the connection right within Crystal.

    Setup the user in Security for the...

  • RE: Performance with foreign key

    What he is saying is that if you have Table 1 ( PK int ) and Table 2 ( FK int )

    Lets say for instance you want to delete a...

  • RE: Distinct Query Problem

    Distinct does not apply to a single column -- it applies to all of the columns being selected.

    The data model may be suspect if you need to use distinct at...

  • RE: How split string in the row

    First, I would not use this table structure.

    I would have a users table, a group table, and a GroupUsers table.

    Storing all of the user ids in one column is a...

  • RE: A GROUP BY question

    I do not know your table structure, but you can do something like the following.

    --function to concatenate categories into comma seperated list by title

    CREATE FUNCTION dbo.fn_GetCategoriesForTitle (@TitleId int )

    RETURNS...

  • RE: DB Locking up until users log out and back in?

    I would start by looking at activity monitor when the system is locked up.

    Check for blocking transactions and see what host / application / statement is causing the issue.

    This is...

Viewing 15 posts - 31 through 45 (of 141 total)