Re: Question

18 views
Skip to first unread message

[support], _

unread,
Dec 17, 2014, 1:13:06 PM12/17/14
to MMcCo...@shopvac.com, web-obje...@googlegroups.com
Mike,

FYI....  Alias can be used to provide an alternate column name for fields:


Thanks, Paul

On Tue, Dec 16, 2014 at 10:48 AM, <MMcCo...@shopvac.com> wrote:
The field name "Parts List" comes from the title and this is from a file
that is uploaded from an access database.   When I changed the SQL as
follows: and changed it to the short name, it seemed to work fine in WOW.

SELECT model00001, part_00001,
locate('#\\wptserver3', cast(parts00001 as char(120))) + 1 as MyStart,
locate('#', cast(parts00001 as char(120)),12)  as MyEnd,
replace (
substring(
Cast(parts00001 as Char(120)),
     locate('#', cast(parts00001 as char(120))) + 13,
     locate('#', cast(parts00001 as char(120)),12) - 24 )
    , '\', '/') AS MYPARTLIST

FROM MDMTECH_DB.PLISTINSTM

Mike McConnell
Programmer Analyst
570-321-7434


|------------>
| From:      |
|------------>
  >-----------------------------------------------------------------------------------------------------------------------------------------|
  |"[support], _" <sup...@planetjavainc.com>                                                                                               |
  >-----------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| To:        |
|------------>
  >-----------------------------------------------------------------------------------------------------------------------------------------|
  |MMcCo...@shopvac.com, "_ [support]" <sup...@planetjavainc.com>                                                                        |
  >-----------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Date:      |
|------------>
  >-----------------------------------------------------------------------------------------------------------------------------------------|
  |12/16/2014 12:43 PM                                                                                                                      |
  >-----------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Subject:   |
|------------>
  >-----------------------------------------------------------------------------------------------------------------------------------------|
  |Re: Question                                                                                                                             |
  >-----------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Sent by:   |
|------------>
  >-----------------------------------------------------------------------------------------------------------------------------------------|
  |ph...@planetjavainc.com                                                                                                                  |
  >-----------------------------------------------------------------------------------------------------------------------------------------|





Hi Mike,

Happy Holidays!!!!

There can be differences between STRSQL and WOW due to JOB settings or
properties.

In your case here, SQL0206 is coming from OS400 and seems to indicate it
can't find the column PARTS LIST

Is the column actually named PARTS LIST or "PARTS LIST"?  Is there supposed
to be a space in there?  If so, you may need to escape the "

Thanks WOW SUPPORT



On Tue, Dec 16, 2014 at 6:27 AM, <MMcCo...@shopvac.com> wrote:

  Question.  I have the following SQ: that runs inside the STRSQL on the
  iSeries and gets errors within WOW when I try to run it.   Can you tell
  me
  why this would be???
  Thanks.



  SELECT "Model Number", "Part Number",
  locate('#', cast("Parts List" as char(120))) + 1 as MyStart,
  locate('#', cast("Parts List" as char(120)),12)  as MyEnd,
  replace (
  substring(
  Cast("Parts List" as Char(120)),
       locate('#', cast("Parts List" as char(120))) + 1,
       locate('#', cast("Parts List" as char(120)),12) - 12 )
      , '\', '/')
      as MyPartList
  from mdmtech_db.plistinstm
  (Embedded image moved to file: pic12787.gif)


  (Embedded image moved to file: pic03600.gif)


  Mike McConnell
  Programmer Analyst
  570-321-7434


Reply all
Reply to author
Forward
0 new messages