Forum Replies Created

Viewing 15 posts - 181 through 195 (of 284 total)

  • RE: Remove Decimals Without Rounding

    Just for grins, I compared two methods.

    Method 1: No (explicit) looping.

    Set @Result = Replace( RTrim( Replace( Replace( Convert( varchar, @original ), '.', '' ), '0', '...

    Tomm Carr
    --
    Version Normal Form -- http://groups.google.com/group/vrdbms

  • RE: Is this workable

    I think you guys scared off the OP.

    The comment was already made that it appears you are using integer values for datetime values and that this is generally a Bad...

    Tomm Carr
    --
    Version Normal Form -- http://groups.google.com/group/vrdbms

  • RE: Remove Decimals Without Rounding

    Jeff Moden (9/29/2007)


    Did someone say "loop"??? :blink: On a single row????? :sick:

    Don't let (y)our antipathy toward row looping turn you away from all looping. Many times it is appropriate, especially...

    Tomm Carr
    --
    Version Normal Form -- http://groups.google.com/group/vrdbms

  • RE: Remove Decimals Without Rounding

    The problem with using the Replace string function is that 10.341 ends up as 1034100 if the numeric is defined with five places. If you want 10.342 to end up...

    Tomm Carr
    --
    Version Normal Form -- http://groups.google.com/group/vrdbms

  • RE: UPDATE statement conflicted with the FOREIGN KEY constraint

    You have supplied us a tremendous lack of detail to supply a definitive answer, but thanks to your somewhat convoluted naming convention, I can make a guess. There are five...

    Tomm Carr
    --
    Version Normal Form -- http://groups.google.com/group/vrdbms

  • RE: updating a one-to-many DB with stored procedure

    Of course, if you supplied more details of the structure of the tables involved, we could supply more detailed answers. 🙂

    Tomm Carr
    --
    Version Normal Form -- http://groups.google.com/group/vrdbms

  • RE: updating a one-to-many DB with stored procedure

    Maybe I just don't understand but I don't see what the problem is. Say you have an entity you have normalized across three tables, Main, Norm1 and Norm2. So your...

    Tomm Carr
    --
    Version Normal Form -- http://groups.google.com/group/vrdbms

  • RE: Help with TSQL, getting StartDate and EndDate from WeekDate !!!

    I think this does what you want.select

    DateAdd( dd, 1 - DatePart(dw, WeekDate), WeekDate ) as StartDate,

    DateAdd( dd, 7 - DatePart(dw, WeekDate), WeekDate...

    Tomm Carr
    --
    Version Normal Form -- http://groups.google.com/group/vrdbms

  • RE: RTRIM not working on sysfiles column

    It just occurred to me that you may want more than one row. In that case, select into a temp table or table variable.

        declare @Sysfiles ...

    Tomm Carr
    --
    Version Normal Form -- http://groups.google.com/group/vrdbms

  • RE: Field name search

    Here's mine:

    -- Returns all tables that use a particular column. The specified column name
    -- may contain valid SQL wildcards.
    -- Examples:
    --  exec GetTablesByCol 'id';
    --  exec GetTablesByCol '%id';
    
    create procedure GetTablesByCol...

    Tomm Carr
    --
    Version Normal Form -- http://groups.google.com/group/vrdbms

  • RE: RTRIM not working on sysfiles column

    Keep it simple:

        declare @Filename   nvarchar( 260 ),
                @Name     ...

    Tomm Carr
    --
    Version Normal Form -- http://groups.google.com/group/vrdbms

  • RE: Using a calculate column in the Where clause

    Repeat the calculation in the WHERE clause. Yeah, it looks ugly. However, if looks are important to you (and I have to admit, sometimes I get more than a little...

    Tomm Carr
    --
    Version Normal Form -- http://groups.google.com/group/vrdbms

  • RE: Cluster index in identity column or actual value which is uniq. Pls guide

    I assume that the student id number is ubiquitous in your environment. Each student quickly learns his own and the teacher's class roster has them listed. Whenever any of them...

    Tomm Carr
    --
    Version Normal Form -- http://groups.google.com/group/vrdbms

  • RE: Can this query be optimized

    What is it about the 134 extra rows that make them wrong? That would help to see what is wrong with Peter's solution.

    Or that nothing is wrong with it.

    Tomm Carr
    --
    Version Normal Form -- http://groups.google.com/group/vrdbms

  • RE: Delimiter of string data

    As much as this may be sacrilege around here, there are other tools available besides SQL. Going back to the first post, it looks like there are two items on...

    Tomm Carr
    --
    Version Normal Form -- http://groups.google.com/group/vrdbms

Viewing 15 posts - 181 through 195 (of 284 total)