Forum Replies Created

Viewing 15 posts - 2,416 through 2,430 (of 5,103 total)

  • RE: PhoneFormat

    are those the only possible combinations?

    What if a number is missing?

    What if the country code is more than one digit, ex: UK = 44?

    ...

     

  • RE: Tree Sort

    Yes I know but I posted that I didn't understand the rules neither

    You are trying to perform the ordering now on this fashion:

    (level),...

  • RE: Can''''t set QUOTED_IDENTIFIER or ANSI_NULLS on mult-statement table valued function

    Definitely you have hit a bug in SS.

    As far as I can tell the status bit IS updated correctly but the code generator is NOT generating the appropriate value...

  • RE: Auto Generate a table with 1000,000 unique strings

    OK now that you have specified the problem you can modify my solution as:

    select number as n into #T1 from master..spt_values where number < 100 and type ='P'

     

    select Replace (...

  • RE: Auto Generate a table with 1000,000 unique strings

    here is something to get you started:  

     

    select number as n into #T1 from master..spt_values where number < 100 and type ='P'

     

    select dbo.fn_varbintohexstr( t1.n +...

  • RE: Auto Generate a table with 1000,000 unique strings

    you said:

    "It Cannot contain the Letter A,I or numbers  1, 0"

    but in the examples

    AAAAA2, AAAAA3, AAAAA4, AAAAA5, AAAAA6, AAAAA7, AAAAA8, AAAAAA9,

    B22236,

     you used the letter "A"...

  • RE: Computing the % of Total for a column

    This is what I would do

     

    Select Name, Sales, round(100*Sales/TotalSales,0) [% os Sales]

    from

    (Select Department as Name, Sum(Amount) as Sales

    from SalesTable

    Group by Department ) dt1

    cross join (Select Sum(Amount) as TotalSales from SalesTable...

  • RE: Tree Sort

    Ah...

    Try:

    Select * from yourTable

    ORDER BY Len(level)-len(replace(level,';','')), type, ProductDesc

     

    Cheers,

    [EDIT]: Wait a minute but if the level (for ordering purposes) is the number of items then, how come

    "a;b;a5;a51" is before "a;b;a3" ...

  • RE: Using SQL Server 2000 SP3 to Update IBM DB2 UDB 7.2

    and to add a bit more ...

    UPDATE FROM is not supported by DB2 that's a MS extension

    Cheers,

     

  • RE: Tree Sort

    There are things still not clear for me.

    You said: "The tree structure needs sorting based on tree level + type of material + description"

    Then on the example why :

  • RE: help with CASE / Cross tab report

    Just to complement abit more govinn solution. Make sure "dateadded" does not contains NULLs and change

    datepart(yy, dateadded)     for    year ( dateadded )

    datepart(mm, dateadded)    for    month ( dateadded )

    datepart(day, date...

  • RE: Enterprise Manager Table Properties - Record Count Different??

    EM is using sysindexes and therefore does not need to be equal. Try executing

    DBCC UPDATEUSAGE (0) on the DB that you are quering and you'll see the numbers match...

  • RE: trigger

    Like PW said change pkey in the join for your primary key column(s)

     

    CREATE TRIGGER Q_U on dbo.Quarter

    FOR UPDATE

    AS

    BEGIN

    if @@rowcount = 0 return

    UPDATE Q SET LastModified = getdate()

    FROM Quarter Q join...

  • RE: Can''''t select count(*) from large table

    rowcnt is the one that you should be using because:

    1. rowcnt is bigint, (rows is only int)

    2. rows is provided only for backward compatibility

     

    Cheers,

     

  • RE: Syntax for querying a timestamp column

    >> Either we have been extremely lucky or timestamps are incremented in a uniform manor as I believe/hope they should be! <<

     

    My point is that they may have been behaving...

Viewing 15 posts - 2,416 through 2,430 (of 5,103 total)