Forum Replies Created

Viewing 15 posts - 436 through 450 (of 663 total)

  • RE: How can I add Number at the end?

    Try to improve the update a bit.

    Update t1

    Set SomethingIWant=

    Case When Exists(Select '1' from test as t2 where t2.[id]<t1.[id] And t2.code=t1.code) Then

    t1.Code+Right('0'+Cast((Select count(*) from test as...

  • RE: How can I add Number at the end?

    Create Table Test(id int, Code char(1), SomethingIWant Varchar(10))

    GO

    Insert test values(1,'A','')

    Insert test values(2,'A','')

    Insert test values(4,'B','')

    Insert test values(23,'C','')

    Insert test values(34,'C','')

    Insert test values(25,'C','')

    Insert test values(89,'D','')

    GO

    Update t1

    Set SomethingIWant=

    ...

  • RE: Variable where clause

    Steve Jones solution is beter.

    There is an 'issue' with OR's and optimizing.

    Did not actually check my facts, remember from some article.

  • RE: Case statement in where clause

    CKLEIN hang in there.

    Start searching for Joe Celko Smarties(=book).

  • RE: Short-life data structure suggestions

    Article on partioning:

    http://sqlteam.com/item.asp?ItemID=684

    Then OLAP:

    If you have the Enterprise version of SQL Server, consider dividing your OLAP cubes into partitions to boost performance. A partition is just a separately managed unit...

  • RE: Indexes and Statistics

    Agree with Steve Jones. View can take the name of the original table.

  • RE: Customer or Customers?

    Later changes sometimes get ignored because it just not worth the effort, front end, middle tier, back end, etc. I think I'll stick with NPeeters post. Do it 'right' the...

  • RE: Olap calculation problem

    Find a view quite handy, since one can throttle the visibility of the data during testing. Other words for testing we allowed only a few clients data throught. Going life...

  • RE: Search for a specific character length

    Is the requirement of n characters the only requirement?

    How about a view and two tables, one for n character length barcodes and the other for the none n length barcodes.

    Insert...

  • RE: VERY slow running cursor

    Agree drop the cursors if possible.

  • RE: cast varchar as datetime

    CREATE FUNCTION MyStrip(@v varchar(50)) RETURNS DateTime AS

    BEGIN

    Declare @vv Varchar(50)

    Set @vv=Right(@v,DataLength(@v)-CharIndex(' ',@v))

    RETURN Cast(Left(@vv,DataLength(@vv)-CharIndex(' ',Reverse(@vv))) as DateTime)

    END

    Select dbo.MyStrip('Fri, 06 Dec 2002 14:52:26 -0500')

    Select dbo.MyStrip('Fri, 6 Dec 2002 15:08:59 EST')

  • RE: table join

    Can you provide a bit more info

  • RE: TIMESTAMP not unique! help!

    Agree with Andy Warren.

    Never used timestamps.

    Did spend some time reading about timestamps in BOL 2000.

  • RE: Am I crazy?

    Try something similar:

    Select *

    From SomeTable as t

    Inner Join (Select Serial_Number

    ...

  • RE: CheckDB Errors and weird fix

    Very long shot, maybe way of target.

    Any possibility of hardware problems, new disk controllers, display adapter, etc. ?

Viewing 15 posts - 436 through 450 (of 663 total)