Forum Replies Created

Viewing 9 posts - 61 through 69 (of 69 total)

  • RE: Combining SELECT statements

    After thought,  what can become difficult is that a query returns multiple records say for the diary entries or a Notes table.  Then you would have to string all the...

  • RE: Combining SELECT statements

    With the multiple selects, why not select into a Temp Table for query 1 (#TempTable1), Temp Table for Query 2 (#TempTable2) each having a key field value that you would...

  • RE: Creating reports with sub total using CUBE

    Came across this.  Maybe it would help.  You can select the "Grouping" Value and also change your ordering of the output.

     

    SELECT CASE GROUPING(store_name)

    WHEN 1 then '[State total]' ELSE store_name End...

  • RE: Combining SELECT statements

    Thanks Remi.  Help clarify for me.  How is a view, which joins tables with a query, so much different than a sub-query?

    How about a technique where I Joins simpler views together...

  • RE: Combining SELECT statements

    Sometimes on queries like this, I use a view to gather most of the fields I want in one place  and then query that view.  I can and often do...

  • RE: Query Syntax Error

    Have you tried putting

    cast((select CASE WHEN [SvLOB]='HP' And [SvSrcX]='M' THEN topamt1 ELSE 0 END)

     

    into the group statement?  Usually works for me because you are summing or...

  • RE: Creating reports with sub total using CUBE

    Sorry to not be of much help but I did fool around with it a bit.  I do know the "order by" statement alters the output immensely. I also played...

  • RE: Sniped by QOD (26-Dec-2003)

    I was sniped as well. I got it wrong!

  • RE: String Value Validation

    I usually run the string through this function:

    Public Function SQLStrClean(inString As String) As String

    '*********************************************

    '* This just does a simple charater replacement on SQL Text Statements

    '* for insert and...

Viewing 9 posts - 61 through 69 (of 69 total)