Forum Replies Created

Viewing 11 posts - 1 through 11 (of 11 total)

  • RE: URGENT: SQL Pivot Help Please!

    What should I do if it is ranking duplicates the same?

    --Apply Raw Rank to Payroll / CC

    SELECT *, RANK() OVER (PARTITION BY AGENCY_CODE ORDER BY PAYROLL DESC) AS 'Top 7...

  • RE: URGENT: SQL Pivot Help Please!

    See the Attachment

  • RE: URGENT: SQL Pivot Help Please!

    The post doesn't look like I was expecting,

    I get PA_EnterpriseID Then 1 - 10 Columns - BUT the PA_EnterpriseID continues to duplicate and I want it to group, I'm getting...

  • RE: URGENT: SQL Pivot Help Please!

    Thanks yewang80 but the values in the column vary, so far I've come up with this, it sucks:

    SELECT *, RANK() OVER (PARTITION BY PA_EnterpriseID ORDER BY PP_ID DESC) AS...

  • RE: SQL Query from Excel VBA

    Lol, I did not read your reply, Pass Through... how do I do that, lol

  • RE: SQL Query from Excel VBA

    Excellent Advice,

    I just tired SELECT VS SET and I still receive the same error message, this must mean it wasn't the "SET" command causing the issue. Also I have another...

  • RE: SQL Query from Excel VBA

    I'm not able to determine the cause of the error, excel refuses to allow the SET command, then again, maybe the SET command is invalid for use in the query...

  • RE: SQL Query from Excel VBA

    Just to Clarify, the Debug Window Code, pated into Management Studio works 100%

  • RE: SQL Query from Excel VBA

    Thank you, that did help, however I'm still lost 🙁

    Immediate Window:

    DECLARE @mydate DATETIME

    DECLARE @First AS DATETIME

    DECLARE @Last AS DATETIME

    SET @mydate = CONVERT(VARCHAR(25),GETDATE(),101) SET @First =...

  • RE: SQL Query from Excel VBA

    Also, the error is not very descriptive, I attached a copy of the error, if I goto Debug, the select line of code is at the end of the macro...

  • RE: SQL Query from Excel VBA

    The Debug.Print SQL command doesn't yield any results, the SQL Query is not allowed to execute, excel stops the query from executing with the run-time error 1004.

    I think there is...

Viewing 11 posts - 1 through 11 (of 11 total)