Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2004
    Posts
    1

    Unanswered: Crystal Reports 8 Query Help!

    I need a little help.
    First off, to get it out of the way I am new to Crystal Reports... and I'm useing Crystal Reports 8

    The issue I'm having is I can't get CR to save the query I'm entering into the "Show SQL Query" window.

    Here is a copy of the query I'm trying to save:
    SELECT
    ProcessHist."PROC_Date", ProcessHist."STORE_NMB", ProcessHist."UNITS_SHIPPED", LEFT(ProcessHist."LOCATION",3)
    FROM
    "Processing"."dbo"."ProcessHist" ProcessHist

    And this is what it default to:

    SELECT
    ProcessHist."PROC_Date", ProcessHist."STORE_NMB", ProcessHist."UNITS_SHIPPED", ProcessHist."LOCATION"
    FROM
    "Processing"."dbo"."ProcessHist" ProcessHist


    I can't get the "LEFT" function to stay in there..
    Is it possible I'm entering this in the wrong place? What I'm trying to do is take multiple data in a LOCATION column and just bring in the First three letters.

    Example: FC35436 FC35434, FC25435, FC00435 --> After the Query should display: FC3 FC3 FC2 FC0.

    The data in the report needs to be grouped by that field too....

    Anyone Help?!?!

    Thanks!

    Josh

  2. #2
    Join Date
    Sep 2003
    Posts
    83
    In Crystal reports you cannot change anything in the SELECT Statement in the show SQL query window,as far as I know.
    so use something like this,

    SELECT
    ProcessHist."PROC_Date", ProcessHist."STORE_NMB", ProcessHist."UNITS_SHIPPED", ProcessHist."LOCATION"
    FROM
    "Processing"."dbo"."ProcessHist" ProcessHist
    WHERE 0=1
    UNION ALL
    SELECT
    ProcessHist."PROC_Date", ProcessHist."STORE_NMB", ProcessHist."UNITS_SHIPPED", LEFT(ProcessHist."LOCATION",3)
    FROM
    "Processing"."dbo"."ProcessHist" ProcessHist

    Hope it helps.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •