Forum Replies Created

Viewing 15 posts - 916 through 930 (of 1,473 total)

  • RE: insert currency name and symbol

    Vladan (12/14/2008)


    Garadin (12/12/2008)

    At the time an invoice was generated, you'd look at your most recent record for Dollar > Euro conversion, calculate the amount in Euros and store those numbers...

  • RE: Sample SQL Code to do a table update from Excel

    While it may be possible to do this directly from excel, I would do it as follows:

    Import the excel sheet as a table using the import wizard.

    Update the original table...

  • RE: Basic T-SQL

    Gotta be a little more specific with "do something interesting".

    Are these databases on the same server?

    If they are, you can extract the information like so:

    SELECT *

    From Database1.dbo.Customer C

    ...

  • RE: Getting Count when "nothing is there"

    Untested due to no sample data, but something like this should work:

    SELECT R.ResourceID, PC.RCount

    FROM ResourceTable R -- This should be a table holding your 23 types if you have one

    LEFT...

  • RE: stored proc with paging works on 2K, breaks on 2K5

    gamache (12/12/2008)


    Garadin (12/12/2008)


    Oops, I ran that on my 2K8 test server.

    Microsoft SQL Server 2008 (RTM) - 10.0.1600.22 (Intel X86) Jul 9 2008 14:43:34 Copyright (c)...

  • RE: Which is better

    All this Tab -> spaces debate made me curious... so I did a little test. I'm guessing this is due to it mimic'ing html or something when...

  • RE: Which is better

    Jeffrey Williams (12/12/2008)


    Garadin (12/12/2008)


    Roger that. Just made the change. Mine was set to 8. It always kinda bugged me that it was so big, but never really...

  • RE: Which is better

    . )

    )

    )

    )

    You copy and paste a tab from elsewhere =).

  • RE: stored proc with paging works on 2K, breaks on 2K5

    For your table, this would likely look like this:

    CREATE PROCEDURE [dbo].[TEST_SS2K5_PAGING3]

    @slice_size INT = 1,

    @slice_start INT = 1

    AS

    ;WITH Paging AS(

    SELECT Users.*,

    ROW_NUMBER() OVER(ORDER BY lastname, firstname, user_id) 'RowNumber'

    From...

  • RE: stored proc with paging works on 2K, breaks on 2K5

    Oops, I ran that on my 2K8 test server.

    Microsoft SQL Server 2008 (RTM) - 10.0.1600.22 (Intel X86) Jul 9 2008 14:43:34 Copyright (c) 1988-2008 Microsoft...

  • RE: stored proc with paging works on 2K, breaks on 2K5

    Modifying your SP to use a Tally table (Sorted DESC so you can more easily see) instead of your user table, I get these results.

    20000

    19001

    20000

    20000

    Which seems correct.

    Modified code below:

    ALTER PROCEDURE...

  • RE: How do I use the GETUSERID() function?

    I'm guessing that unless your users are accessing the server directly, you aren't going to be able to extract this information in T-SQL. If you're going through an ODBC...

  • RE: Insert into linked table

    The logic behind it is this. It's a very common use of outer joins that makes a lot of things very easy.

    [font="Courier New"]DECLARE @YourView TABLE(

    I    INT,

    V    CHAR(1))

    DECLARE @YourTable TABLE(

    I    INT,

    V    CHAR(1))

    INSERT INTO @YourView(I,V)

    SELECT...

  • RE: Which is better

    Lynn Pettis (12/12/2008)


    Steve Jones - Editor (12/12/2008)


    Tab settings can be inconsistent, and so if you try to line things up, or open someone else's code, 2 tab stops could result...

Viewing 15 posts - 916 through 930 (of 1,473 total)