Forum Replies Created

Viewing 15 posts - 166 through 180 (of 196 total)

  • RE: Round function

    Here is a slightly more generic version:

    DECLARE @BaseAmount MONEY,

            @BaseAmountPlus MONEY,

            @Increment INT

    SET @Increment = 5.0

    SET @BaseAmount = 16.00

    SET @BaseAmountPlus = @BaseAmount + @Increment

    SELECT @BaseAmount, @BaseAmountPlus, ROUND(@BaseAmount,0,1) + (2*@Increment)-(CAST(ROUND(@BaseAmount,0,1)AS INT)...

  • RE: Round function

    This may be a good case for using a UDF to hide the ugly calculation below.  The expression can probably be simplified a bit, but I'll leave that as an...

  • RE: DATEADD and time zone support - any known issues?

    All good comments.  Kenneth has picked out the key issue - retrieving the data in the time zone of the user.  The application stack is pulling the users time zone...

  • RE: Its all relative...

    You can handle this in a couple of different ways, depending on how frequently the data changes.  The simple solution is to write a recursive query that walks the tree,...

  • RE: SPROCS

    Is it safe to assume that you have access to Enterprise Manager?  If so, expand the SQL Server group, and then expand the server you wish to document.  Expand databases. ...

  • RE: Data Sort

    Hi Pete,

    I'm not sure I actually understand the problem well enough.  Can you post the table strucutre you are querying, and perhaps the query itself?

    Wayne

  • RE: Ordering Numeric Text sequentially.

    This problem has been around for, oh, something like 40 years or so.  One approach is to use a computed column in the order by clause on the second select.  The effect...

  • RE: BULK INSERT - Overly large table

    Is the table 10 times larger, or is the database 10 times larger? 

    If you meant that the database is 10 times larger, I would then suspect that your database...

  • RE: Fun little UDF puzzle

    The code posted at the bottom of this post shows what I have tried so far.  Each line that failed has the error message as an end-of-line comment.  From books...

  • RE: Help with query

    I would approach this from a slightly different perspective, specifically a data warehousing view.  The problem becomes easier to solve if you split the problem space into two components.  From...

  • RE: Inserting a record count using Dynamic SQL

    Perhaps you could post the structure of the TableCounter table?

    Here is a possible solution:

    declare @SqlString varchar(500)

    set @SqlString = 'INSERT TableCounter (TableName) SELECT COUNT(*)FROM InterchangeDTA.dbo.' + @TableName

    execute (@SqlString)

     

    You may want to...

  • RE: Fun little UDF puzzle

    Thanks for the response.  I have the system implemented using a stored proc right now.  My intention is to move the logic into a UDF so that I can then...

  • RE: Selecting the nth record in a table throug a single Querry

    I am not sitting in front of my server at the moment, so the syntax may be a bit off.  However, here is a method.  Basically, use a derived query...

  • RE: OpenXML and memory usage...

    Hi Paul,

    This post is very much a "your mileage may vary" sort of response.  I'm running a system doing near-real-time data collection from a set of network applicances.  The appliances...

  • RE: Concatenating records not fields

    If you are attempting to create a delimited list of values from the same column but different rows, take a look at "coalesce".  Here is a simple example that concatenates...

Viewing 15 posts - 166 through 180 (of 196 total)