Forum Replies Created

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

  • RE: Combining Two Grouping Select Statements

    David,

    That last query did it! You rock :).

    I was trying to get the total for the WSI as a whole as well as the

    total that were defects and...

  • RE: Combining Two Grouping Select Statements

    🙁 The problem is that I am also trying to get the total questionnaires per WSI

    not just the one that have SUMDEFECTS > 0.

    I need to have it as one...

  • RE: Combining Two Grouping Select Statements

    Jay,

    I tried your suggestion but am getting an error:

    It says "Incorrect Syntax" by the commas separating the last two

    select statements.

    I also had to add a TOP command because of the...

  • RE: Combining Two Grouping Select Statements

    To be more specific, I am trying to obtain the total of questionnaires in the

    query per "WSI" as opposed to the percentage from the whole.

    In other words:

    Number of questionnaires per...

  • RE: Complex view

    THANKS DAVID!!!

    That is exactly what I needed.

    One thing I definitely need to bone up on is grouping etc.

    Thanks to Jeremy as well!

  • RE: Complex view

    I wasn't doing a good job of being very clear. Sorry 🙁

    I am looking at trying to put the data into a single RECORD not RECORD SET.

    My mistake. I...

  • RE: Complex view

    Thanks Jeremy,

    It puts me on the right track, but how do I get the data into one

    recordset?

    I now have the following:

    Select Distinct AttributeID,

    CASE dbo.QIMS_FORMS_INSTANCE_DATA.ColumnID WHEN 1 THEN...

  • RE: Executing Dynamic Stored Procedure Comma

    Thanks for the nvarchar declaration comment.

    It fixed the problem. I then had to take the 'Set ' command out of the statement

    Thanks!!

    The code then became:

    Set @ExecSP = @DBName +...

  • RE: Executing Dynamic Stored Procedure Comma

    When I Print @ExecSP

    and then

    Execute sp_executesql @ExecSP

    I get the following:

    Set lareal_v170.dbo.stp_Interface_Import_ReportData 1

    Server: Msg 214, Level 16, State 2, Procedure sp_executesql, Line 43

    Procedure expects parameter '@statement' of type 'ntext/nchar/nvarchar'.

    Thanks!

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