Forum Replies Created

Viewing 15 posts - 1,231 through 1,245 (of 1,473 total)

  • RE: Help with SELECT and COUNT query

    Thanks for the table structure and sample data.

    SETUP

    DECLARE @PropDet TABLE

    (

    PropId INT PRIMARY KEY,

    UserId UNIQUEIDENTIFIER,

    PropName NVARCHAR(50),

    Resort NVARCHAR(50),

    Col5 NVARCHAR(50),

    Col6 NVARCHAR(50),

    Col7 NVARCHAR(50),

    Col8 NVARCHAR(50),

    Col9 NVARCHAR(50),

    Col10 NVARCHAR(50),

    Col11 NVARCHAR(50),

    Col12 NVARCHAR(50)

    )

    INSERT INTO @PropDet

    ...

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: Display time clock data in daily columns.

    Can you show what your desired output would be if they had 2+ clockin/outs for the same day? You have columns designed for a 1 to 1 relationship of...

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: OPENQUERY DYNAMIC SQL PROBLEM

    This is a bit beyond me, but my thinking is that you should be able to do this via fully qualified names and a linked oracle server.

    Here is an article...

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: Display time clock data in daily columns.

    Yeah, I had a feeling that was going to happen. We always has the same annoyance with our time clock stuff. Worse, ours were constantly missing login/logout data....

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: refer from subquery to current record

    Do you mean you want to start over the count each year with 1?

    Also, as for the @ID, it serves no real purpose except to "anchor" that query. People...

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: Need help on performance and integrity

    Ok, so I've given up on the old method, and come up with this. Not set based :crying:. Hopefully I didn't completely bugger up my cursor syntax, I...

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: Trigger that checks another record

    Just to make sure you understand, I wasn't trying to chastise you for your errors, and I appreciate you giving it a shot. The only reason I...

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: SQL-Server 2005: Change Ordinal Column Position

    Heh... looks who's promoting laziness...

    I never said *I* wasn't lazy =). But I do try to avoid it when everyone is telling me it could cause major issues...

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: SQL-Server 2005: Change Ordinal Column Position

    Fair enough. It was a pretty bold statement that may not be 100% accurate. It was in response to this:

    Yes, that's all right, but if you make a...

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: Need help on performance and integrity

    ggraber (10/27/2008)


    bhovious (10/27/2008)


    Hey Seth,

    Could you give me one example of the iterative situation you describe. I didn't see that in all of the examples I looked at. ...

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: Need help on performance and integrity

    Basically, this:

    IDRowKeyLocaleCode

    11ENA

    22ENA

    32DUA

    41ENA

    52DUA

    You see that Rows 3 and 5 are duplicates. However, because Row 4 is a duplicate of Row 1, the matching starts over at row 4. There...

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: Need help on performance and integrity

    bhovious (10/27/2008)


    1. The rows where the Code column "breaks" to a new code, which doesn't include the first row in the table.

    2. Any duplicates (same Key,...

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: Building Stored Procedure from tables to populate view

    cpetersen (10/27/2008)


    Hello Sir,

    How did you figure out what the columns in table t374 were

    ie... C700002200 is Closed_date?

    Thanks,

    Carl

    Considering the OP hasn't logged on in over a year, I have a...

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: Display time clock data in daily columns.

    Thanks for the DDL and sample data, especially in Table Variable format, it makes things so much easier. How about something like this?

    [font="Courier New"]

    SELECT EmpNum

                    ,SUM(CASE WHEN DATEPART (dw,ClockInDate)=...

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • RE: Column Properties for result set of a Stored Procedure

    Check out the SET FMTONLY ON command. It won't return the column types and such, but it will get you all the column names.

    http://msdn.microsoft.com/en-us/library/ms173839.aspx

    You could also insert the output...

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

Viewing 15 posts - 1,231 through 1,245 (of 1,473 total)