Forum Replies Created

Viewing 15 posts - 1,036 through 1,050 (of 1,085 total)

  • RE: UPDATE question

    This may work for you: 

     

    CREATE TABLE #tbl1( VoucherNum varchar(10),

      PaymentDate smalldatetime) 

    INSERT INTO #tbl1( VoucherNum, PaymentDate)

    SELECT 'ABC123', '12/31/2004'

    INSERT INTO #tbl1( VoucherNum, PaymentDate)

    SELECT 'ABC123', '12/25/2003'

    INSERT INTO...

  • RE: How to Flatten exploded data?

    It looks like every three records comprise the one record you want.  If that is not true, you will probably need to create some vicious flow control, (i.e., IF... BEGIN/END  ...

  • RE: Using Case in a Where Clause ???

    I believe the mixing of varchar with integer in the first case is your problem.  If you try this with @ID as a varchar, it should work. 

  • RE: How do I Using MAX (DATE) and still include nulls??

    Try this, (I used your data): 

    CREATE TABLE #Account( AccountNum int,

      EffEndDate datetime,

      EffBeginDate datetime)

    INSERT INTO #Account

    SELECT 4000331, '8/1/2004', '7/31/2005'

    INSERT INTO #Account

    SELECT 4000331, '8/1/2003', '7/31/2004'

    INSERT...

  • RE: Global UPPER function with trigger

    This may be a better solution since you only want to convert those records that aren't already UPPER case.  I am assuming the first character may be UPPER case, but...

  • RE: Global UPPER function with trigger

    I just checked this again and the WHERE statement may prevent Updating

  • RE: Global UPPER function with trigger

    Here is a script to look for and potentially update all fields which meet your needs. 

    I have commented out the Execute statement so you can see what will happen. ...

  • RE: Displaying every combo of unique id values

    I will look this weekend, but I have a dynamic SQL script that includes an ALTER TABLE and loops through a table, (or two) to generate something like what I...

  • RE: Trip to Mexico?

    I live in Maryland near Washington, DC.  I don't ski anymore - back surgery (don't ask... it was crappy).  I have been to Whistler though.  BEAUTIFUL! 

     

    Hopefully with three airports...

  • RE: Trip to Mexico?

    I know.., I know.  But I am contracting and did not expect to get the time off.  Oil well.  Maybe the lust for money will get some travel agency to...

  • RE: Build query by using function

    Try this: 

    SELECT SerialNumber, PassFail,

    CASE

    WHEN [PassFail] = 1

    THE 'Pass'

    ELSE 'Fail'

    END AS Expr1

    FROM TestLog

     

    (Note, this does not include any test for a NULL or...

  • RE: Insert "-" before "char10" field that has trailing spaces

    I am sorry.  You did say it was a char(10) field. 

    I tried this with a char(10) and it worked fine. 

  • RE: Insert "-" before "char10" field that has trailing spaces

    It looks like you are trying to insert into a char or varchar field from the code, but I am guessing this is actually a numeric field. 

     

    try multiplying Longitude...

  • RE: Table Variables

    I had a great deal of difficulty with this; I was trying to populate variables in which the name would change dynamic (via a loop) and hence the value would...

  • RE: Limiting Data to specific Format

    If the Project Number will "always" contain this format, then you should be able to use the following within your nested SELECT (Q1)

    WHERE SUBSTRING( Col004, 5, 1) = '-'...

Viewing 15 posts - 1,036 through 1,050 (of 1,085 total)