Forum Replies Created

Viewing 15 posts - 61 through 75 (of 106 total)

  • RE: arithmatic function

    quote:


    As you're wanting to truncate rather than round, I think cmore means:

    
    
    SELECT ROUND(1,-2,1)*ROUND(b,-2,1)

    If the vales are an integer...

  • RE: arithmatic function

    
    
    declare @MyNumbers table (a int not null, b int not null)
    insert into @MyNumbers select 345,234
    insert into @MyNumbers select 567,345

    select round(a,-2,0)*round(b,-2,0) from @MyNumbers
  • RE: Trigger from Select Query?

    I can't think of a way. To me it seems odd that you would need to track something based on a select and not a data modification. What...

  • RE: Is this possible in a view

    
    
    go
    create function dbo.tfnCustomerQuery(
    @CustomerID nchar(5)
    ,@CompanyName nvarchar(40)
    ,@ContactName nvarchar(30)
    ,@ContactTitle nvarchar(30)
    ...
  • RE: Is this possible in a view

    If prepared sql/string executes wont fit the bill, how about:

    set rowcount 10000

    <do query>

    set rowcount 0

    Or if you have to have this logic in a view/udf instead of a stored procedure...

  • RE: Select with variable assignment

    Unless it's a very limited environment, I tend to avoid using global temp tables. Never have liked the way it can make people step on each other.

  • RE: Trigger problem

    Perhaps the app is firing an 'update' that isn't changing the values of an existing row (it'll still fire even with no real data value changes)? Never heard of/seen...

  • RE: Removing spaces in the middle of a string

    there's several of string manipulation functions in SQL online help. I'm no expert on them all but the replace function would work.

  • RE: Selecting hierarchial data

    I meant that the other way- if you custom code a loop to build a heirarchy from a rowset of child/sponsor records, you don't have to worry about a depth...

  • RE: String Concat in Group

    Just an option- doesn't do anything more than what sainswor99's code did tho:

    after table creation and fill run

    declare @x table (

    IDCol int identity(1,1) primary key -- provides clustered index

    ,RowID...

  • RE: Using the bit datatype

    Looking at my DB im working on atm, I see two bit fields; XPOUsable and BoxUsable ( whether a shipping carrier allows APO/XPO and box addresses). Not really sure...

  • RE: Using the bit datatype

    Maybe I'm not using it wisely then. I use it when I need to have a 'flag' variable, that I am sure will never need to determine two different...

  • RE: Running Query batches in stored procedure

    Hehe - that was very well said.

  • RE: Running Query batches in stored procedure

    K. Wasn't sure how wierd i was being. As for your script, it's right on imo. I've had code generator scripts save me a ton of time...

Viewing 15 posts - 61 through 75 (of 106 total)