Maximo List Archive

This is an archive of the Maximo Yahoo Community. The content of this pages may be a sometimes obsolete so please check post dates.
Thanks to the community owner Christopher Wanko for providing the content.



SQL Assistance Requested w/Actuate

From: hankinskeith (2012-01-02 16:40)

Hello -
Can anyone help me with this SQL statement... It is working except that I need it to pull the data based on the record I have open in Maximo through Actuate... i.e. the WHERE statement needs to indicate using the current record in Maximo... but I know I can't say this... for example: WHERE ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit1 Is Not Null))
Here is the SQL.... the only part that is not correct is the WHERE statement... any help is GREATLY appreciated!
Keith
SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
asset1.tile, longdescription.ldtext
FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
asset2.assetnum
LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
'DESCRIPTION'
WHERE ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit1 Is Not Null))
OR ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit2 Is Not Null))
OR ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit3 Is Not Null))
ORDER BY asset1.cb_circuit1


From: Brian Swanson (2012-01-02 13:40)

HI All,
I'm looking for some words of experience here. In 7.5, by default they
have removed the Category field in the Inventory app and replaced it with
a Check Box (1 or 0) indicating Reorder Yes or No. The Category field is
still in the database, but no longer visible. I could make it visible
and keep using it, but I'm told by others here that if IBM is removing it
we shouldn't need it. We are in the process of meeting with our storeroom
folks here, but I'm afraid that if we stop using it, somewhere down the
line we may need it again for reporting. So the big question here is for
the storeroom folks, how necessary is it to know what items are Stocked
and what items are not? What might you recommend..
Thanks
Brian Swanson
Systems Analyst-Maximo
Information Technology
HermanMiller


From: Victor (2012-01-02 18:57)

Hi Keith,
Please change the where clause condition to the following. As I don't know what field name you are using to compare. I am writing a generic clause :
((asset1.cb_rppassetnum = :fieldname) AND (asset1.cb_circuit1 Is Not Null))
:fieldname = colon field name is the column_name which you will compare with the asset1.cb_rppassetnum. Do not forget to put the colon(:) in front of the column_name.
Replace the "current record" with the field name with a colon in front of it.
Thanks & regards,
Victor.
--- In MAXIMO@yahoogroups.com, "hankinskeith@..." <keith.d.hankins@...> wrote:
>
> Hello -
> Can anyone help me with this SQL statement... It is working except that I need it to pull the data based on the record I have open in Maximo through Actuate... i.e. the WHERE statement needs to indicate using the current record in Maximo... but I know I can't say this... for example: WHERE ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit1 Is Not Null))
>
>
> Here is the SQL.... the only part that is not correct is the WHERE statement... any help is GREATLY appreciated!
>
> Keith
>
> SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> asset1.tile, longdescription.ldtext
> FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> asset2.assetnum
> LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
> longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> 'DESCRIPTION'
> WHERE ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit1 Is Not Null))
> OR ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit2 Is Not Null))
> OR ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit3 Is Not Null))
> ORDER BY asset1.cb_circuit1
>


From: wwilliams (2012-01-03 09:48)


Wes Williams
http://www.weswilliams.net
http://www.williamsconnell.com
From: "hankinskeith@ymail.com" <keith.d.hankins@aexp.com>
To: MAXIMO@yahoogroups.com
Sent: Monday, January 2, 2012 10:40 AM
Subject: [MAXIMO List] SQL Assistance Requested w/Actuate
  Try adding and 1 = 1
Hello -
Can anyone help me with this SQL statement... It is working except that I need it to pull the data based on the record I have open in Maximo through Actuate... i.e. the WHERE statement needs to indicate using the current record in Maximo... but I know I can't say this... for example: WHERE ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit1 Is Not Null))
Here is the SQL.... the only part that is not correct is the WHERE statement... any help is GREATLY appreciated!
Keith
SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
asset1.tile, longdescription.ldtext
FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
asset2.assetnum
LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
'DESCRIPTION'
WHERE ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit1 Is Not Null))
OR ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit2 Is Not Null))
OR ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit3 Is Not Null))
ORDER BY asset1.cb_circuit1


From: andrew.tess (2012-01-03 18:30)

If memory serves me correctly... IBM broke reorder to a seperate column from stock category. The stock Category field is set in the Item/Org details from select actions in Item Master. The reasoning behind this, as I understand it, is to allow for items to be stocked or not and seperatly be able to tell the reorder routine which item and which storerooms to reorder. This also allows for central warehouse to order items from vendor and the satelite storerooms to order the item from the central warehouse (as internal).
Hope this helps,
Andy
--- In MAXIMO@yahoogroups.com, Brian Swanson <brian_swanson@...> wrote:
>
> HI All,
> I'm looking for some words of experience here. In 7.5, by default they
> have removed the Category field in the Inventory app and replaced it with
> a Check Box (1 or 0) indicating Reorder Yes or No. The Category field is
> still in the database, but no longer visible. I could make it visible
> and keep using it, but I'm told by others here that if IBM is removing it
> we shouldn't need it. We are in the process of meeting with our storeroom
> folks here, but I'm afraid that if we stop using it, somewhere down the
> line we may need it again for reporting. So the big question here is for
> the storeroom folks, how necessary is it to know what items are Stocked
> and what items are not? What might you recommend..
>
> Thanks
>
>
>
> Brian Swanson
> Systems Analyst-Maximo
> Information Technology
>
> HermanMiller
>
>
>


From: hankinskeith (2012-01-03 18:38)

Victor/Wes... Thanks for your ideas but still no go...
Per Victor's suggestion, I tried the following and the report failed to compile...
SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
asset1.tile, longdescription.ldtext
FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
asset2.assetnum
LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
'DESCRIPTION'
WHERE ((asset1.cb_rppassetnum=:asset2.assetnum) AND (asset1.cb_circuit1 Is Not Null))
OR ((asset1.cb_rppassetnum=:asset2.assetnum) AND (asset1.cb_circuit2 Is Not Null))
OR ((asset1.cb_rppassetnum=:asset2.assetnum) AND (asset1.cb_circuit3 Is Not Null))
ORDER BY asset1.cb_circuit1
HOWEVER I know my SQL is good because if I put this in SQL server for a specific record I get my required data:
SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
asset1.tile, longdescription.ldtext
FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
asset2.assetnum
LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
'DESCRIPTION'
WHERE ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit1 Is Not Null))
OR ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit2 Is Not Null))
OR ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit3 Is Not Null))
ORDER BY asset1.cb_circuit1
I also tried Wes's suggestion (below) but still no go... Here's what I tried:
SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
asset1.tile, longdescription.ldtext
FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
asset2.assetnum
LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
'DESCRIPTION'
WHERE ((1 = 1) AND (asset1.cb_circuit1 Is Not Null))
OR ((1 = 1) AND (asset1.cb_circuit2 Is Not Null))
OR ((1 = 1) AND (asset1.cb_circuit3 Is Not Null))
ORDER BY asset1.cb_circuit1
Any other thoughts? Thanks in advance! Keith
--- In MAXIMO@yahoogroups.com, wwilliams@... wrote:
>
>
>
>
> Wes Williams
>
>
>
>
> http://www.weswilliams.net
> http://www.williamsconnell.com
>
> From: "hankinskeith@..." <keith.d.hankins@...>
> To: MAXIMO@yahoogroups.com
> Sent: Monday, January 2, 2012 10:40 AM
> Subject: [MAXIMO List] SQL Assistance Requested w/Actuate
>
>
>   Try adding and 1 = 1
> Hello -
> Can anyone help me with this SQL statement... It is working except that I need it to pull the data based on the record I have open in Maximo through Actuate... i.e. the WHERE statement needs to indicate using the current record in Maximo... but I know I can't say this... for example: WHERE ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit1 Is Not Null))
>
> Here is the SQL.... the only part that is not correct is the WHERE statement... any help is GREATLY appreciated!
>
> Keith
>
> SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> asset1.tile, longdescription.ldtext
> FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> asset2.assetnum
> LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
> longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> 'DESCRIPTION'
> WHERE ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit1 Is Not Null))
> OR ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit2 Is Not Null))
> OR ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit3 Is Not Null))
> ORDER BY asset1.cb_circuit1
>
>
>
>
>
>


From: Victor (2012-01-03 18:45)

Hi Keith,
Please modify the code to following :
SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
asset1.cb_secondary, asset2.manufacturer, asset2.description,
asset1.cb_rackassetnum, asset1.bay, asset1.tile, longdescription.ldtext
FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
asset2.assetnum LEFT OUTER JOIN longdescription ON asset1.assetid =
longdescription.ldkey and longdescription.ldownertable = 'ASSET' and
longdescription.ldownercol = 'DESCRIPTION' WHERE
((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit1 Is Not Null))
OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit2 Is Not
Null)) OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit3 Is
Not Null)) ORDER BY asset1.cb_circuit1
The way you modified it, maximo was looking for asset2 relationship as
when you write :asset2.assetnum then maximo treats asset2 as the
relationship which it was not able to find in the system. Hopefully
above SQL should work for you.
Let me know the results.
Thanks & regards,Victor.
--- In MAXIMO@yahoogroups.com, "hankinskeith@..." <keith.d.hankins@...>
wrote:
>
> Victor/Wes... Thanks for your ideas but still no go...
>
> Per Victor's suggestion, I tried the following and the report failed
to compile...
>
> SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
asset1.cb_secondary,
> asset2.manufacturer, asset2.description, asset1.cb_rackassetnum,
asset1.bay,
> asset1.tile, longdescription.ldtext
> FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> asset2.assetnum
> LEFT OUTER JOIN longdescription ON asset1.assetid =
longdescription.ldkey and
> longdescription.ldownertable = 'ASSET' and longdescription.ldownercol
=
> 'DESCRIPTION'
> WHERE ((asset1.cb_rppassetnum=:asset2.assetnum) AND
(asset1.cb_circuit1 Is Not Null))
> OR ((asset1.cb_rppassetnum=:asset2.assetnum) AND (asset1.cb_circuit2
Is Not Null))
> OR ((asset1.cb_rppassetnum=:asset2.assetnum) AND (asset1.cb_circuit3
Is Not Null))
> ORDER BY asset1.cb_circuit1
>
> HOWEVER I know my SQL is good because if I put this in SQL server for
a specific record I get my required data:
>
> SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
asset1.cb_secondary,
> asset2.manufacturer, asset2.description, asset1.cb_rackassetnum,
asset1.bay,
> asset1.tile, longdescription.ldtext
> FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> asset2.assetnum
> LEFT OUTER JOIN longdescription ON asset1.assetid =
longdescription.ldkey and
> longdescription.ldownertable = 'ASSET' and longdescription.ldownercol
=
> 'DESCRIPTION'
> WHERE ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit1 Is Not
Null))
> OR ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit2 Is Not
Null))
> OR ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit3 Is Not
Null))
> ORDER BY asset1.cb_circuit1
>
> I also tried Wes's suggestion (below) but still no go... Here's what I
tried:
>
> SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
asset1.cb_secondary,
> asset2.manufacturer, asset2.description, asset1.cb_rackassetnum,
asset1.bay,
> asset1.tile, longdescription.ldtext
> FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> asset2.assetnum
> LEFT OUTER JOIN longdescription ON asset1.assetid =
longdescription.ldkey and
> longdescription.ldownertable = 'ASSET' and longdescription.ldownercol
=
> 'DESCRIPTION'
> WHERE ((1 = 1) AND (asset1.cb_circuit1 Is Not Null))
> OR ((1 = 1) AND (asset1.cb_circuit2 Is Not Null))
> OR ((1 = 1) AND (asset1.cb_circuit3 Is Not Null))
> ORDER BY asset1.cb_circuit1
>
> Any other thoughts? Thanks in advance! Keith
>
> --- In MAXIMO@yahoogroups.com, wwilliams@ wrote:
> >
> >
> >
> >
> > Wes Williams
> >
> >
> >
> >
> > http://www.weswilliams.net
> > http://www.williamsconnell.com
> >
> > From: "hankinskeith@" keith.d.hankins@
> > To: MAXIMO@yahoogroups.com
> > Sent: Monday, January 2, 2012 10:40 AM
> > Subject: [MAXIMO List] SQL Assistance Requested w/Actuate
> >
> >
> > Â Try adding and 1 = 1
> > Hello -
> > Can anyone help me with this SQL statement... It is working except
that I need it to pull the data based on the record I have open in
Maximo through Actuate... i.e. the WHERE statement needs to indicate
using the current record in Maximo... but I know I can't say this... for
example: WHERE ((asset1.cb_rppassetnum = current record) AND
(asset1.cb_circuit1 Is Not Null))
> >
> > Here is the SQL.... the only part that is not correct is the WHERE
statement... any help is GREATLY appreciated!
> >
> > Keith
> >
> > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
asset1.cb_secondary,
> > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum,
asset1.bay,
> > asset1.tile, longdescription.ldtext
> > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc
=
> > asset2.assetnum
> > LEFT OUTER JOIN longdescription ON asset1.assetid =
longdescription.ldkey and
> > longdescription.ldownertable = 'ASSET' and
longdescription.ldownercol =
> > 'DESCRIPTION'
> > WHERE ((asset1.cb_rppassetnum = current record) AND
(asset1.cb_circuit1 Is Not Null))
> > OR ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit2
Is Not Null))
> > OR ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit3
Is Not Null))
> > ORDER BY asset1.cb_circuit1
> >
> >
> >
> >
> >
> >
>


From: wwilliams (2012-01-03 12:32)

What does your
Function obtainselectstatement look like?
 
Do you have a parameter where?
Wes Williams
http://www.weswilliams.net
http://www.williamsconnell.com
From: "hankinskeith@ymail.com" <keith.d.hankins@aexp.com>
To: MAXIMO@yahoogroups.com
Sent: Tuesday, January 3, 2012 12:38 PM
Subject: Re: [MAXIMO List] SQL Assistance Requested w/Actuate
 
Victor/Wes... Thanks for your ideas but still no go...
Per Victor's suggestion, I tried the following and the report failed to compile...
SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
asset1.tile, longdescription.ldtext
FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
asset2.assetnum
LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
'DESCRIPTION'
WHERE ((asset1.cb_rppassetnum=:asset2.assetnum) AND (asset1.cb_circuit1 Is Not Null))
OR ((asset1.cb_rppassetnum=:asset2.assetnum) AND (asset1.cb_circuit2 Is Not Null))
OR ((asset1.cb_rppassetnum=:asset2.assetnum) AND (asset1.cb_circuit3 Is Not Null))
ORDER BY asset1.cb_circuit1
HOWEVER I know my SQL is good because if I put this in SQL server for a specific record I get my required data:
SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
asset1.tile, longdescription.ldtext
FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
asset2.assetnum
LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
'DESCRIPTION'
WHERE ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit1 Is Not Null))
OR ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit2 Is Not Null))
OR ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit3 Is Not Null))
ORDER BY asset1.cb_circuit1
I also tried Wes's suggestion (below) but still no go... Here's what I tried:
SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
asset1.tile, longdescription.ldtext
FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
asset2.assetnum
LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
'DESCRIPTION'
WHERE ((1 = 1) AND (asset1.cb_circuit1 Is Not Null))
OR ((1 = 1) AND (asset1.cb_circuit2 Is Not Null))
OR ((1 = 1) AND (asset1.cb_circuit3 Is Not Null))
ORDER BY asset1.cb_circuit1
Any other thoughts? Thanks in advance! Keith
--- In MAXIMO@yahoogroups.com, wwilliams@... wrote:
>
>
>
>
> Wes Williams
>
>
>
>
> http://www.weswilliams.net
> http://www.williamsconnell.com
>
> From: "hankinskeith@..." <keith.d.hankins@...>
> To: MAXIMO@yahoogroups.com
> Sent: Monday, January 2, 2012 10:40 AM
> Subject: [MAXIMO List] SQL Assistance Requested w/Actuate
>
>
>   Try adding and 1 = 1
> Hello -
> Can anyone help me with this SQL statement... It is working except that I need it to pull the data based on the record I have open in Maximo through Actuate... i.e. the WHERE statement needs to indicate using the current record in Maximo... but I know I can't say this... for example: WHERE ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit1 Is Not Null))
>
> Here is the SQL.... the only part that is not correct is the WHERE statement... any help is GREATLY appreciated!
>
> Keith
>
> SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> asset1.tile, longdescription.ldtext
> FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> asset2.assetnum
> LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
> longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> 'DESCRIPTION'
> WHERE ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit1 Is Not Null))
> OR ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit2 Is Not Null))
> OR ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit3 Is Not Null))
> ORDER BY asset1.cb_circuit1
>
>
>
>
>
>


From: hankinskeith (2012-01-03 21:35)

Hi Wes - Perhaps this is my issue since I don't know where to check this... Can you direct me... where would I find the function obtainselectstatement? Thanks!
--- In MAXIMO@yahoogroups.com, wwilliams@... wrote:
>
> What does your
> Function obtainselectstatement look like?
>  
> Do you have a parameter where?
>
> Wes Williams
>
>
>
>
> http://www.weswilliams.net
> http://www.williamsconnell.com
>
> From: "hankinskeith@..." <keith.d.hankins@...>
> To: MAXIMO@yahoogroups.com
> Sent: Tuesday, January 3, 2012 12:38 PM
> Subject: Re: [MAXIMO List] SQL Assistance Requested w/Actuate
>
>
>  
> Victor/Wes... Thanks for your ideas but still no go...
>
> Per Victor's suggestion, I tried the following and the report failed to compile...
>
> SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> asset1.tile, longdescription.ldtext
> FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> asset2.assetnum
> LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
> longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> 'DESCRIPTION'
> WHERE ((asset1.cb_rppassetnum=:asset2.assetnum) AND (asset1.cb_circuit1 Is Not Null))
> OR ((asset1.cb_rppassetnum=:asset2.assetnum) AND (asset1.cb_circuit2 Is Not Null))
> OR ((asset1.cb_rppassetnum=:asset2.assetnum) AND (asset1.cb_circuit3 Is Not Null))
> ORDER BY asset1.cb_circuit1
>
> HOWEVER I know my SQL is good because if I put this in SQL server for a specific record I get my required data:
>
> SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> asset1.tile, longdescription.ldtext
> FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> asset2.assetnum
> LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
> longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> 'DESCRIPTION'
> WHERE ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit1 Is Not Null))
> OR ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit2 Is Not Null))
> OR ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit3 Is Not Null))
> ORDER BY asset1.cb_circuit1
>
> I also tried Wes's suggestion (below) but still no go... Here's what I tried:
>
> SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> asset1.tile, longdescription.ldtext
> FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> asset2.assetnum
> LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
> longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> 'DESCRIPTION'
> WHERE ((1 = 1) AND (asset1.cb_circuit1 Is Not Null))
> OR ((1 = 1) AND (asset1.cb_circuit2 Is Not Null))
> OR ((1 = 1) AND (asset1.cb_circuit3 Is Not Null))
> ORDER BY asset1.cb_circuit1
>
> Any other thoughts? Thanks in advance! Keith
>
> --- In MAXIMO@yahoogroups.com, wwilliams@ wrote:
> >
> >
> >
> >
> > Wes Williams
> >
> >
> >
> >
> > http://www.weswilliams.net
> > http://www.williamsconnell.com
> >
> > From: "hankinskeith@" <keith.d.hankins@>
> > To: MAXIMO@yahoogroups.com
> > Sent: Monday, January 2, 2012 10:40 AM
> > Subject: [MAXIMO List] SQL Assistance Requested w/Actuate
> >
> >
> >   Try adding and 1 = 1
> > Hello -
> > Can anyone help me with this SQL statement... It is working except that I need it to pull the data based on the record I have open in Maximo through Actuate... i.e. the WHERE statement needs to indicate using the current record in Maximo... but I know I can't say this... for example: WHERE ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit1 Is Not Null))
> >
> > Here is the SQL.... the only part that is not correct is the WHERE statement... any help is GREATLY appreciated!
> >
> > Keith
> >
> > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> > asset1.tile, longdescription.ldtext
> > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > asset2.assetnum
> > LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
> > longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> > 'DESCRIPTION'
> > WHERE ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit1 Is Not Null))
> > OR ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit2 Is Not Null))
> > OR ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit3 Is Not Null))
> > ORDER BY asset1.cb_circuit1
> >
> >
> >
> >
> >
> >
>
>
>
>
>
>


From: wwilliams (2012-01-03 14:22)

This is a method under your datastream (where you placed your sql) there are four tabs one being Methods.
Depending on how you created the report if you used the Maximo supplied one the following should be there.
SelectStatement = StrSubst(SelectStatement, "1=1', where)
Look at one of the out of the box reports
 
Wes Williams
http://www.weswilliams.net
http://www.williamsconnell.com
________________________________
From: "hankinskeith@ymail.com" <keith.d.hankins@aexp.com>
To: MAXIMO@yahoogroups.com
Sent: Tuesday, January 3, 2012 3:35 PM
Subject: Re: [MAXIMO List] SQL Assistance Requested w/Actuate

 
Hi Wes - Perhaps this is my issue since I don't know where to check this... Can you direct me... where would I find the function obtainselectstatement? Thanks!
--- In MAXIMO@yahoogroups.com, wwilliams@... wrote:
>
> What does your
> Function obtainselectstatement look like?
>  
> Do you have a parameter where?
>
> Wes Williams
>
>
>
>
> http://www.weswilliams.net
> http://www.williamsconnell.com
>
> From: "hankinskeith@..." <keith.d.hankins@...>
> To: MAXIMO@yahoogroups.com
> Sent: Tuesday, January 3, 2012 12:38 PM
> Subject: Re: [MAXIMO List] SQL Assistance Requested w/Actuate
>
>
>  
> Victor/Wes... Thanks for your ideas but still no go...
>
> Per Victor's suggestion, I tried the following and the report failed to compile...
>
> SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> asset1.tile, longdescription.ldtext
> FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> asset2.assetnum
> LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
> longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> 'DESCRIPTION'
> WHERE ((asset1.cb_rppassetnum=:asset2.assetnum) AND (asset1.cb_circuit1 Is Not Null))
> OR ((asset1.cb_rppassetnum=:asset2.assetnum) AND (asset1.cb_circuit2 Is Not Null))
> OR ((asset1.cb_rppassetnum=:asset2.assetnum) AND (asset1.cb_circuit3 Is Not Null))
> ORDER BY asset1.cb_circuit1
>
> HOWEVER I know my SQL is good because if I put this in SQL server for a specific record I get my required data:
>
> SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> asset1.tile, longdescription.ldtext
> FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> asset2.assetnum
> LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
> longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> 'DESCRIPTION'
> WHERE ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit1 Is Not Null))
> OR ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit2 Is Not Null))
> OR ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit3 Is Not Null))
> ORDER BY asset1.cb_circuit1
>
> I also tried Wes's suggestion (below) but still no go... Here's what I tried:
>
> SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> asset1.tile, longdescription.ldtext
> FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> asset2.assetnum
> LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
> longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> 'DESCRIPTION'
> WHERE ((1 = 1) AND (asset1.cb_circuit1 Is Not Null))
> OR ((1 = 1) AND (asset1.cb_circuit2 Is Not Null))
> OR ((1 = 1) AND (asset1.cb_circuit3 Is Not Null))
> ORDER BY asset1.cb_circuit1
>
> Any other thoughts? Thanks in advance! Keith
>
> --- In MAXIMO@yahoogroups.com, wwilliams@ wrote:
> >
> >
> >
> >
> > Wes Williams
> >
> >
> >
> >
> > http://www.weswilliams.net
> > http://www.williamsconnell.com
> >
> > From: "hankinskeith@" <keith.d.hankins@>
> > To: MAXIMO@yahoogroups.com
> > Sent: Monday, January 2, 2012 10:40 AM
> > Subject: [MAXIMO List] SQL Assistance Requested w/Actuate
> >
> >
> >   Try adding and 1 = 1
> > Hello -
> > Can anyone help me with this SQL statement... It is working except that I need it to pull the data based on the record I have open in Maximo through Actuate... i.e. the WHERE statement needs to indicate using the current record in Maximo... but I know I can't say this... for example: WHERE ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit1 Is Not Null))
> >
> > Here is the SQL.... the only part that is not correct is the WHERE statement... any help is GREATLY appreciated!
> >
> > Keith
> >
> > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> > asset1.tile, longdescription.ldtext
> > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > asset2.assetnum
> > LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
> > longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> > 'DESCRIPTION'
> > WHERE ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit1 Is Not Null))
> > OR ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit2 Is Not Null))
> > OR ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit3 Is Not Null))
> > ORDER BY asset1.cb_circuit1
> >
> >
> >
> >
> >
> >
>
>
>
>
>
>


From: hankinskeith (2012-01-04 18:50)

Wes/Victor -
Thanks for the ideas... still having problems... So the SQL Victor provided (below) works... however only in Access... when I load it to the Encyclopedia and to Maximo, the report says 'There are no pages to display'...
Here is the working SQL
SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
asset1.cb_secondary, asset2.manufacturer, asset2.description,
asset1.cb_rackassetnum, asset1.bay, asset1.tile, longdescription.ldtext
FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
asset2.assetnum LEFT OUTER JOIN longdescription ON asset1.assetid =
longdescription.ldkey and longdescription.ldownertable = 'ASSET' and
longdescription.ldownercol = 'DESCRIPTION' WHERE
((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit1 Is Not Null))
OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit2 Is Not
Null)) OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit3 Is
Not Null)) ORDER BY asset1.cb_circuit1
So then I tried Wes suggestion and added the following to my Method in Actuate...
SelectStatement = StrSubst(SelectStatement, "1=1', where)
but when I do this, the report won't even compile in Actuate...
I'm at a loss... I'm sure this is a basic Actuate new user issue but I really don't know how to solve... Wes, based on the SQL I'm using, Actuate prompts me for the assetnum referenced in the WHERE section of my SQL... I supply it and the report runs perfectly... I suspect the problem is a disconnect between my WHERE statement the the "1=1" format you are suggesting... Can either of you help me resolve this disconnect...
Your help is SO greatly appreciated... Keith
--- In MAXIMO@yahoogroups.com, wwilliams@... wrote:
>
> This is a method under your datastream (where you placed your sql) there are four tabs one being Methods.
>
> Depending on how you created the report if you used the Maximo supplied one the following should be there.
>
> SelectStatement = StrSubst(SelectStatement, "1=1', where)
>
> Look at one of the out of the box reports
>
>  
> Wes Williams
>
>
>
>
> http://www.weswilliams.net
> http://www.williamsconnell.com
>
>
> ________________________________
> From: "hankinskeith@..." <keith.d.hankins@...>
> To: MAXIMO@yahoogroups.com
> Sent: Tuesday, January 3, 2012 3:35 PM
> Subject: Re: [MAXIMO List] SQL Assistance Requested w/Actuate
>
>
>  
> Hi Wes - Perhaps this is my issue since I don't know where to check this... Can you direct me... where would I find the function obtainselectstatement? Thanks!
>
> --- In MAXIMO@yahoogroups.com, wwilliams@ wrote:
> >
> > What does your
> > Function obtainselectstatement look like?
> >  
> > Do you have a parameter where?
> >
> > Wes Williams
> >
> >
> >
> >
> > http://www.weswilliams.net
> > http://www.williamsconnell.com
> >
> > From: "hankinskeith@" <keith.d.hankins@>
> > To: MAXIMO@yahoogroups.com
> > Sent: Tuesday, January 3, 2012 12:38 PM
> > Subject: Re: [MAXIMO List] SQL Assistance Requested w/Actuate
> >
> >
> >  
> > Victor/Wes... Thanks for your ideas but still no go...
> >
> > Per Victor's suggestion, I tried the following and the report failed to compile...
> >
> > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> > asset1.tile, longdescription.ldtext
> > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > asset2.assetnum
> > LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
> > longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> > 'DESCRIPTION'
> > WHERE ((asset1.cb_rppassetnum=:asset2.assetnum) AND (asset1.cb_circuit1 Is Not Null))
> > OR ((asset1.cb_rppassetnum=:asset2.assetnum) AND (asset1.cb_circuit2 Is Not Null))
> > OR ((asset1.cb_rppassetnum=:asset2.assetnum) AND (asset1.cb_circuit3 Is Not Null))
> > ORDER BY asset1.cb_circuit1
> >
> > HOWEVER I know my SQL is good because if I put this in SQL server for a specific record I get my required data:
> >
> > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> > asset1.tile, longdescription.ldtext
> > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > asset2.assetnum
> > LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
> > longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> > 'DESCRIPTION'
> > WHERE ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit1 Is Not Null))
> > OR ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit2 Is Not Null))
> > OR ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit3 Is Not Null))
> > ORDER BY asset1.cb_circuit1
> >
> > I also tried Wes's suggestion (below) but still no go... Here's what I tried:
> >
> > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> > asset1.tile, longdescription.ldtext
> > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > asset2.assetnum
> > LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
> > longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> > 'DESCRIPTION'
> > WHERE ((1 = 1) AND (asset1.cb_circuit1 Is Not Null))
> > OR ((1 = 1) AND (asset1.cb_circuit2 Is Not Null))
> > OR ((1 = 1) AND (asset1.cb_circuit3 Is Not Null))
> > ORDER BY asset1.cb_circuit1
> >
> > Any other thoughts? Thanks in advance! Keith
> >
> > --- In MAXIMO@yahoogroups.com, wwilliams@ wrote:
> > >
> > >
> > >
> > >
> > > Wes Williams
> > >
> > >
> > >
> > >
> > > http://www.weswilliams.net
> > > http://www.williamsconnell.com
> > >
> > > From: "hankinskeith@" <keith.d.hankins@>
> > > To: MAXIMO@yahoogroups.com
> > > Sent: Monday, January 2, 2012 10:40 AM
> > > Subject: [MAXIMO List] SQL Assistance Requested w/Actuate
> > >
> > >
> > >   Try adding and 1 = 1
> > > Hello -
> > > Can anyone help me with this SQL statement... It is working except that I need it to pull the data based on the record I have open in Maximo through Actuate... i.e. the WHERE statement needs to indicate using the current record in Maximo... but I know I can't say this... for example: WHERE ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit1 Is Not Null))
> > >
> > > Here is the SQL.... the only part that is not correct is the WHERE statement... any help is GREATLY appreciated!
> > >
> > > Keith
> > >
> > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> > > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> > > asset1.tile, longdescription.ldtext
> > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > asset2.assetnum
> > > LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
> > > longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> > > 'DESCRIPTION'
> > > WHERE ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit1 Is Not Null))
> > > OR ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit2 Is Not Null))
> > > OR ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit3 Is Not Null))
> > > ORDER BY asset1.cb_circuit1
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >
> >
> >
> >
> >
>
>
>
>
>
>


From: siva ravuri (2012-01-04 11:19)

include 1=1 in your SQL. Then only it can be replaced with where caluse.
example: WHERE 1=1 and
________________________________
From: "hankinskeith@ymail.com" <keith.d.hankins@aexp.com>
To: MAXIMO@yahoogroups.com
Sent: Wednesday, January 4, 2012 12:50 PM
Subject: [MAXIMO List] Re: SQL Assistance Requested w/Actuate

 
Wes/Victor -
Thanks for the ideas... still having problems... So the SQL Victor provided (below) works... however only in Access... when I load it to the Encyclopedia and to Maximo, the report says 'There are no pages to display'...
Here is the working SQL
SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
asset1.cb_secondary, asset2.manufacturer, asset2.description,
asset1.cb_rackassetnum, asset1.bay, asset1.tile, longdescription.ldtext
FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
asset2.assetnum LEFT OUTER JOIN longdescription ON asset1.assetid =
longdescription.ldkey and longdescription.ldownertable = 'ASSET' and
longdescription.ldownercol = 'DESCRIPTION' WHERE
((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit1 Is Not Null))
OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit2 Is Not
Null)) OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit3 Is
Not Null)) ORDER BY asset1.cb_circuit1
So then I tried Wes suggestion and added the following to my Method in Actuate...
SelectStatement = StrSubst(SelectStatement, "1=1', where)
but when I do this, the report won't even compile in Actuate...
I'm at a loss... I'm sure this is a basic Actuate new user issue but I really don't know how to solve... Wes, based on the SQL I'm using, Actuate prompts me for the assetnum referenced in the WHERE section of my SQL... I supply it and the report runs perfectly... I suspect the problem is a disconnect between my WHERE statement the the "1=1" format you are suggesting... Can either of you help me resolve this disconnect...
Your help is SO greatly appreciated... Keith
--- In MAXIMO@yahoogroups.com, wwilliams@... wrote:
>
> This is a method under your datastream (where you placed your sql) there are four tabs one being Methods.
>
> Depending on how you created the report if you used the Maximo supplied one the following should be there.
>
> SelectStatement = StrSubst(SelectStatement, "1=1', where)
>
> Look at one of the out of the box reports
>
>  
> Wes Williams
>
>
>
>
> http://www.weswilliams.net
> http://www.williamsconnell.com
>
>
> ________________________________
> From: "hankinskeith@..." <keith.d.hankins@...>
> To: MAXIMO@yahoogroups.com
> Sent: Tuesday, January 3, 2012 3:35 PM
> Subject: Re: [MAXIMO List] SQL Assistance Requested w/Actuate
>
>
>  
> Hi Wes - Perhaps this is my issue since I don't know where to check this... Can you direct me... where would I find the function obtainselectstatement? Thanks!
>
> --- In MAXIMO@yahoogroups.com, wwilliams@ wrote:
> >
> > What does your
> > Function obtainselectstatement look like?
> >  
> > Do you have a parameter where?
> >
> > Wes Williams
> >
> >
> >
> >
> > http://www.weswilliams.net
> > http://www.williamsconnell.com
> >
> > From: "hankinskeith@" <keith.d.hankins@>
> > To: MAXIMO@yahoogroups.com
> > Sent: Tuesday, January 3, 2012 12:38 PM
> > Subject: Re: [MAXIMO List] SQL Assistance Requested w/Actuate
> >
> >
> >  
> > Victor/Wes... Thanks for your ideas but still no go...
> >
> > Per Victor's suggestion, I tried the following and the report failed to compile...
> >
> > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> > asset1.tile, longdescription.ldtext
> > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > asset2.assetnum
> > LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
> > longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> > 'DESCRIPTION'
> > WHERE ((asset1.cb_rppassetnum=:asset2.assetnum) AND (asset1.cb_circuit1 Is Not Null))
> > OR ((asset1.cb_rppassetnum=:asset2.assetnum) AND (asset1.cb_circuit2 Is Not Null))
> > OR ((asset1.cb_rppassetnum=:asset2.assetnum) AND (asset1.cb_circuit3 Is Not Null))
> > ORDER BY asset1.cb_circuit1
> >
> > HOWEVER I know my SQL is good because if I put this in SQL server for a specific record I get my required data:
> >
> > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> > asset1.tile, longdescription.ldtext
> > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > asset2.assetnum
> > LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
> > longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> > 'DESCRIPTION'
> > WHERE ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit1 Is Not Null))
> > OR ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit2 Is Not Null))
> > OR ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit3 Is Not Null))
> > ORDER BY asset1.cb_circuit1
> >
> > I also tried Wes's suggestion (below) but still no go... Here's what I tried:
> >
> > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> > asset1.tile, longdescription.ldtext
> > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > asset2.assetnum
> > LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
> > longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> > 'DESCRIPTION'
> > WHERE ((1 = 1) AND (asset1.cb_circuit1 Is Not Null))
> > OR ((1 = 1) AND (asset1.cb_circuit2 Is Not Null))
> > OR ((1 = 1) AND (asset1.cb_circuit3 Is Not Null))
> > ORDER BY asset1.cb_circuit1
> >
> > Any other thoughts? Thanks in advance! Keith
> >
> > --- In MAXIMO@yahoogroups.com, wwilliams@ wrote:
> > >
> > >
> > >
> > >
> > > Wes Williams
> > >
> > >
> > >
> > >
> > > http://www.weswilliams.net
> > > http://www.williamsconnell.com
> > >
> > > From: "hankinskeith@" <keith.d.hankins@>
> > > To: MAXIMO@yahoogroups.com
> > > Sent: Monday, January 2, 2012 10:40 AM
> > > Subject: [MAXIMO List] SQL Assistance Requested w/Actuate
> > >
> > >
> > >   Try adding and 1 = 1
> > > Hello -
> > > Can anyone help me with this SQL statement... It is working except that I need it to pull the data based on the record I have open in Maximo through Actuate... i.e. the WHERE statement needs to indicate using the current record in Maximo... but I know I can't say this... for example: WHERE ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit1 Is Not Null))
> > >
> > > Here is the SQL.... the only part that is not correct is the WHERE statement... any help is GREATLY appreciated!
> > >
> > > Keith
> > >
> > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> > > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> > > asset1.tile, longdescription.ldtext
> > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > asset2.assetnum
> > > LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
> > > longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> > > 'DESCRIPTION'
> > > WHERE ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit1 Is Not Null))
> > > OR ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit2 Is Not Null))
> > > OR ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit3 Is Not Null))
> > > ORDER BY asset1.cb_circuit1
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >
> >
> >
> >
> >
>
>
>
>
>
>


From: hankinskeith (2012-01-04 23:26)

So I modified the SQL... and it works in Actuate... however when I load to Maximo, I get this error: Thoughts?
Status No1: Basic error: 1011 Module:afc\db.bas Line: 193 Database Error 2: Error generated by the connected data source ... 4104: (SQL State) 37000: [Microsoft][ODBC SQL Server Driver][SQL Server] The multi-part identifier "asset.assetuid" could not be bound. [SQL State] 37000: [Microsoft][ODBC SQL Server Driver][SQL Server][Statement(s) could not be prepared.
Here is the SQL that is working in Actuate itself... just not in Maximo...
SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
asset1.cb_secondary, asset2.manufacturer, asset2.description,
asset1.cb_rackassetnum, asset1.bay, asset1.tile, longdescription.ldtext
FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
asset2.assetnum LEFT OUTER JOIN longdescription ON asset1.assetid =
longdescription.ldkey and longdescription.ldownertable = 'ASSET' and
longdescription.ldownercol = 'DESCRIPTION'
WHERE
((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit1 Is Not Null) AND (1=1))
OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit2 Is Not
Null) AND (1=1)) OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit3 Is
Not Null) AND (1=1)) ORDER BY asset1.cb_circuit1
--- In MAXIMO@yahoogroups.com, siva ravuri <srpravuri@...> wrote:
>
> include 1=1 in your SQL. Then only it can be replaced with where caluse.
> example: WHERE 1=1 and
>
>
>
> ________________________________
> From: "hankinskeith@..." <keith.d.hankins@...>
> To: MAXIMO@yahoogroups.com
> Sent: Wednesday, January 4, 2012 12:50 PM
> Subject: [MAXIMO List] Re: SQL Assistance Requested w/Actuate
>
>
>  
> Wes/Victor -
>
> Thanks for the ideas... still having problems... So the SQL Victor provided (below) works... however only in Access... when I load it to the Encyclopedia and to Maximo, the report says 'There are no pages to display'...
>
> Here is the working SQL
>
> SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
> asset1.cb_secondary, asset2.manufacturer, asset2.description,
> asset1.cb_rackassetnum, asset1.bay, asset1.tile, longdescription.ldtext
> FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> asset2.assetnum LEFT OUTER JOIN longdescription ON asset1.assetid =
> longdescription.ldkey and longdescription.ldownertable = 'ASSET' and
> longdescription.ldownercol = 'DESCRIPTION' WHERE
> ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit1 Is Not Null))
> OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit2 Is Not
> Null)) OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit3 Is
> Not Null)) ORDER BY asset1.cb_circuit1
>
> So then I tried Wes suggestion and added the following to my Method in Actuate...
>
> SelectStatement = StrSubst(SelectStatement, "1=1', where)
>
> but when I do this, the report won't even compile in Actuate...
>
> I'm at a loss... I'm sure this is a basic Actuate new user issue but I really don't know how to solve... Wes, based on the SQL I'm using, Actuate prompts me for the assetnum referenced in the WHERE section of my SQL... I supply it and the report runs perfectly... I suspect the problem is a disconnect between my WHERE statement the the "1=1" format you are suggesting... Can either of you help me resolve this disconnect...
>
> Your help is SO greatly appreciated... Keith
>
> --- In MAXIMO@yahoogroups.com, wwilliams@ wrote:
> >
> > This is a method under your datastream (where you placed your sql) there are four tabs one being Methods.
> >
> > Depending on how you created the report if you used the Maximo supplied one the following should be there.
> >
> > SelectStatement = StrSubst(SelectStatement, "1=1', where)
> >
> > Look at one of the out of the box reports
> >
> >  
> > Wes Williams
> >
> >
> >
> >
> > http://www.weswilliams.net
> > http://www.williamsconnell.com
> >
> >
> > ________________________________
> > From: "hankinskeith@" <keith.d.hankins@>
> > To: MAXIMO@yahoogroups.com
> > Sent: Tuesday, January 3, 2012 3:35 PM
> > Subject: Re: [MAXIMO List] SQL Assistance Requested w/Actuate
> >
> >
> >  
> > Hi Wes - Perhaps this is my issue since I don't know where to check this... Can you direct me... where would I find the function obtainselectstatement? Thanks!
> >
> > --- In MAXIMO@yahoogroups.com, wwilliams@ wrote:
> > >
> > > What does your
> > > Function obtainselectstatement look like?
> > >  
> > > Do you have a parameter where?
> > >
> > > Wes Williams
> > >
> > >
> > >
> > >
> > > http://www.weswilliams.net
> > > http://www.williamsconnell.com
> > >
> > > From: "hankinskeith@" <keith.d.hankins@>
> > > To: MAXIMO@yahoogroups.com
> > > Sent: Tuesday, January 3, 2012 12:38 PM
> > > Subject: Re: [MAXIMO List] SQL Assistance Requested w/Actuate
> > >
> > >
> > >  
> > > Victor/Wes... Thanks for your ideas but still no go...
> > >
> > > Per Victor's suggestion, I tried the following and the report failed to compile...
> > >
> > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> > > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> > > asset1.tile, longdescription.ldtext
> > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > asset2.assetnum
> > > LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
> > > longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> > > 'DESCRIPTION'
> > > WHERE ((asset1.cb_rppassetnum=:asset2.assetnum) AND (asset1.cb_circuit1 Is Not Null))
> > > OR ((asset1.cb_rppassetnum=:asset2.assetnum) AND (asset1.cb_circuit2 Is Not Null))
> > > OR ((asset1.cb_rppassetnum=:asset2.assetnum) AND (asset1.cb_circuit3 Is Not Null))
> > > ORDER BY asset1.cb_circuit1
> > >
> > > HOWEVER I know my SQL is good because if I put this in SQL server for a specific record I get my required data:
> > >
> > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> > > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> > > asset1.tile, longdescription.ldtext
> > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > asset2.assetnum
> > > LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
> > > longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> > > 'DESCRIPTION'
> > > WHERE ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit1 Is Not Null))
> > > OR ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit2 Is Not Null))
> > > OR ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit3 Is Not Null))
> > > ORDER BY asset1.cb_circuit1
> > >
> > > I also tried Wes's suggestion (below) but still no go... Here's what I tried:
> > >
> > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> > > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> > > asset1.tile, longdescription.ldtext
> > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > asset2.assetnum
> > > LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
> > > longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> > > 'DESCRIPTION'
> > > WHERE ((1 = 1) AND (asset1.cb_circuit1 Is Not Null))
> > > OR ((1 = 1) AND (asset1.cb_circuit2 Is Not Null))
> > > OR ((1 = 1) AND (asset1.cb_circuit3 Is Not Null))
> > > ORDER BY asset1.cb_circuit1
> > >
> > > Any other thoughts? Thanks in advance! Keith
> > >
> > > --- In MAXIMO@yahoogroups.com, wwilliams@ wrote:
> > > >
> > > >
> > > >
> > > >
> > > > Wes Williams
> > > >
> > > >
> > > >
> > > >
> > > > http://www.weswilliams.net
> > > > http://www.williamsconnell.com
> > > >
> > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > To: MAXIMO@yahoogroups.com
> > > > Sent: Monday, January 2, 2012 10:40 AM
> > > > Subject: [MAXIMO List] SQL Assistance Requested w/Actuate
> > > >
> > > >
> > > > ÃÆ'‚  Try adding and 1 = 1
> > > > Hello -
> > > > Can anyone help me with this SQL statement... It is working except that I need it to pull the data based on the record I have open in Maximo through Actuate... i.e. the WHERE statement needs to indicate using the current record in Maximo... but I know I can't say this... for example: WHERE ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit1 Is Not Null))
> > > >
> > > > Here is the SQL.... the only part that is not correct is the WHERE statement... any help is GREATLY appreciated!
> > > >
> > > > Keith
> > > >
> > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> > > > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> > > > asset1.tile, longdescription.ldtext
> > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > asset2.assetnum
> > > > LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
> > > > longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> > > > 'DESCRIPTION'
> > > > WHERE ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit1 Is Not Null))
> > > > OR ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit2 Is Not Null))
> > > > OR ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit3 Is Not Null))
> > > > ORDER BY asset1.cb_circuit1
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >
> >
> >
> >
> >
>
>
>
>
>
>


From: siva ravuri (2012-01-04 15:57)

change your SQL. change asset1 as asset.
________________________________
From: "hankinskeith@ymail.com" <keith.d.hankins@aexp.com>
To: MAXIMO@yahoogroups.com
Sent: Wednesday, January 4, 2012 5:26 PM
Subject: [MAXIMO List] Re: SQL Assistance Requested w/Actuate

 
So I modified the SQL... and it works in Actuate... however when I load to Maximo, I get this error: Thoughts?
Status No1: Basic error: 1011 Module:afc\db.bas Line: 193 Database Error 2: Error generated by the connected data source ... 4104: (SQL State) 37000: [Microsoft][ODBC SQL Server Driver][SQL Server] The multi-part identifier "asset.assetuid" could not be bound. [SQL State] 37000: [Microsoft][ODBC SQL Server Driver][SQL Server][Statement(s) could not be prepared.
Here is the SQL that is working in Actuate itself... just not in Maximo...
SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
asset1.cb_secondary, asset2.manufacturer, asset2.description,
asset1.cb_rackassetnum, asset1.bay, asset1.tile, longdescription.ldtext
FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
asset2.assetnum LEFT OUTER JOIN longdescription ON asset1.assetid =
longdescription.ldkey and longdescription.ldownertable = 'ASSET' and
longdescription.ldownercol = 'DESCRIPTION'
WHERE
((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit1 Is Not Null) AND (1=1))
OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit2 Is Not
Null) AND (1=1)) OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit3 Is
Not Null) AND (1=1)) ORDER BY asset1.cb_circuit1
--- In MAXIMO@yahoogroups.com, siva ravuri <srpravuri@...> wrote:
>
> include 1=1 in your SQL. Then only it can be replaced with where caluse.
> example: WHERE 1=1 and
>
>
>
> ________________________________
> From: "hankinskeith@..." <keith.d.hankins@...>
> To: MAXIMO@yahoogroups.com
> Sent: Wednesday, January 4, 2012 12:50 PM
> Subject: [MAXIMO List] Re: SQL Assistance Requested w/Actuate
>
>
>  
> Wes/Victor -
>
> Thanks for the ideas... still having problems... So the SQL Victor provided (below) works... however only in Access... when I load it to the Encyclopedia and to Maximo, the report says 'There are no pages to display'...
>
> Here is the working SQL
>
> SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
> asset1.cb_secondary, asset2.manufacturer, asset2.description,
> asset1.cb_rackassetnum, asset1.bay, asset1.tile, longdescription.ldtext
> FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> asset2.assetnum LEFT OUTER JOIN longdescription ON asset1.assetid =
> longdescription.ldkey and longdescription.ldownertable = 'ASSET' and
> longdescription.ldownercol = 'DESCRIPTION' WHERE
> ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit1 Is Not Null))
> OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit2 Is Not
> Null)) OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit3 Is
> Not Null)) ORDER BY asset1.cb_circuit1
>
> So then I tried Wes suggestion and added the following to my Method in Actuate...
>
> SelectStatement = StrSubst(SelectStatement, "1=1', where)
>
> but when I do this, the report won't even compile in Actuate...
>
> I'm at a loss... I'm sure this is a basic Actuate new user issue but I really don't know how to solve... Wes, based on the SQL I'm using, Actuate prompts me for the assetnum referenced in the WHERE section of my SQL... I supply it and the report runs perfectly... I suspect the problem is a disconnect between my WHERE statement the the "1=1" format you are suggesting... Can either of you help me resolve this disconnect...
>
> Your help is SO greatly appreciated... Keith
>
> --- In MAXIMO@yahoogroups.com, wwilliams@ wrote:
> >
> > This is a method under your datastream (where you placed your sql) there are four tabs one being Methods.
> >
> > Depending on how you created the report if you used the Maximo supplied one the following should be there.
> >
> > SelectStatement = StrSubst(SelectStatement, "1=1', where)
> >
> > Look at one of the out of the box reports
> >
> >  
> > Wes Williams
> >
> >
> >
> >
> > http://www.weswilliams.net
> > http://www.williamsconnell.com
> >
> >
> > ________________________________
> > From: "hankinskeith@" <keith.d.hankins@>
> > To: MAXIMO@yahoogroups.com
> > Sent: Tuesday, January 3, 2012 3:35 PM
> > Subject: Re: [MAXIMO List] SQL Assistance Requested w/Actuate
> >
> >
> >  
> > Hi Wes - Perhaps this is my issue since I don't know where to check this... Can you direct me... where would I find the function obtainselectstatement? Thanks!
> >
> > --- In MAXIMO@yahoogroups.com, wwilliams@ wrote:
> > >
> > > What does your
> > > Function obtainselectstatement look like?
> > >  
> > > Do you have a parameter where?
> > >
> > > Wes Williams
> > >
> > >
> > >
> > >
> > > http://www.weswilliams.net
> > > http://www.williamsconnell.com
> > >
> > > From: "hankinskeith@" <keith.d.hankins@>
> > > To: MAXIMO@yahoogroups.com
> > > Sent: Tuesday, January 3, 2012 12:38 PM
> > > Subject: Re: [MAXIMO List] SQL Assistance Requested w/Actuate
> > >
> > >
> > >  
> > > Victor/Wes... Thanks for your ideas but still no go...
> > >
> > > Per Victor's suggestion, I tried the following and the report failed to compile...
> > >
> > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> > > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> > > asset1.tile, longdescription.ldtext
> > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > asset2.assetnum
> > > LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
> > > longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> > > 'DESCRIPTION'
> > > WHERE ((asset1.cb_rppassetnum=:asset2.assetnum) AND (asset1.cb_circuit1 Is Not Null))
> > > OR ((asset1.cb_rppassetnum=:asset2.assetnum) AND (asset1.cb_circuit2 Is Not Null))
> > > OR ((asset1.cb_rppassetnum=:asset2.assetnum) AND (asset1.cb_circuit3 Is Not Null))
> > > ORDER BY asset1.cb_circuit1
> > >
> > > HOWEVER I know my SQL is good because if I put this in SQL server for a specific record I get my required data:
> > >
> > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> > > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> > > asset1.tile, longdescription.ldtext
> > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > asset2.assetnum
> > > LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
> > > longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> > > 'DESCRIPTION'
> > > WHERE ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit1 Is Not Null))
> > > OR ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit2 Is Not Null))
> > > OR ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit3 Is Not Null))
> > > ORDER BY asset1.cb_circuit1
> > >
> > > I also tried Wes's suggestion (below) but still no go... Here's what I tried:
> > >
> > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> > > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> > > asset1.tile, longdescription.ldtext
> > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > asset2.assetnum
> > > LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
> > > longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> > > 'DESCRIPTION'
> > > WHERE ((1 = 1) AND (asset1.cb_circuit1 Is Not Null))
> > > OR ((1 = 1) AND (asset1.cb_circuit2 Is Not Null))
> > > OR ((1 = 1) AND (asset1.cb_circuit3 Is Not Null))
> > > ORDER BY asset1.cb_circuit1
> > >
> > > Any other thoughts? Thanks in advance! Keith
> > >
> > > --- In MAXIMO@yahoogroups.com, wwilliams@ wrote:
> > > >
> > > >
> > > >
> > > >
> > > > Wes Williams
> > > >
> > > >
> > > >
> > > >
> > > > http://www.weswilliams.net
> > > > http://www.williamsconnell.com
> > > >
> > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > To: MAXIMO@yahoogroups.com
> > > > Sent: Monday, January 2, 2012 10:40 AM
> > > > Subject: [MAXIMO List] SQL Assistance Requested w/Actuate
> > > >
> > > >
> > > > ÃÆ'‚  Try adding and 1 = 1
> > > > Hello -
> > > > Can anyone help me with this SQL statement... It is working except that I need it to pull the data based on the record I have open in Maximo through Actuate... i.e. the WHERE statement needs to indicate using the current record in Maximo... but I know I can't say this... for example: WHERE ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit1 Is Not Null))
> > > >
> > > > Here is the SQL.... the only part that is not correct is the WHERE statement... any help is GREATLY appreciated!
> > > >
> > > > Keith
> > > >
> > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> > > > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> > > > asset1.tile, longdescription.ldtext
> > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > asset2.assetnum
> > > > LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
> > > > longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> > > > 'DESCRIPTION'
> > > > WHERE ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit1 Is Not Null))
> > > > OR ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit2 Is Not Null))
> > > > OR ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit3 Is Not Null))
> > > > ORDER BY asset1.cb_circuit1
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >
> >
> >
> >
> >
>
>
>
>
>
>


From: hankinskeith (2012-01-05 14:29)

Hi Siva -
Can you clarify... change asset1 as asset in what section of the SQL... As you can see it is referencing two instances of the ASSET table... Where are you recommending the change?
SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
asset1.cb_secondary, asset2.manufacturer, asset2.description,
asset1.cb_rackassetnum, asset1.bay, asset1.tile, longdescription.ldtext
FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
asset2.assetnum LEFT OUTER JOIN longdescription ON asset1.assetid =
longdescription.ldkey and longdescription.ldownertable = 'ASSET' and
longdescription.ldownercol = 'DESCRIPTION'
WHERE
((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit1 Is Not Null) AND
(1=1))
OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit2 Is Not
Null) AND (1=1)) OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit3
Is
Not Null) AND (1=1)) ORDER BY asset1.cb_circuit1
--- In MAXIMO@yahoogroups.com, siva ravuri <srpravuri@...> wrote:
>
> change your SQL. change asset1 as asset.
>
>
>
> ________________________________
> From: "hankinskeith@..." <keith.d.hankins@...>
> To: MAXIMO@yahoogroups.com
> Sent: Wednesday, January 4, 2012 5:26 PM
> Subject: [MAXIMO List] Re: SQL Assistance Requested w/Actuate
>
>
>  
> So I modified the SQL... and it works in Actuate... however when I load to Maximo, I get this error: Thoughts?
>
> Status No1: Basic error: 1011 Module:afc\db.bas Line: 193 Database Error 2: Error generated by the connected data source ... 4104: (SQL State) 37000: [Microsoft][ODBC SQL Server Driver][SQL Server] The multi-part identifier "asset.assetuid" could not be bound. [SQL State] 37000: [Microsoft][ODBC SQL Server Driver][SQL Server][Statement(s) could not be prepared.
>
> Here is the SQL that is working in Actuate itself... just not in Maximo...
>
> SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
> asset1.cb_secondary, asset2.manufacturer, asset2.description,
> asset1.cb_rackassetnum, asset1.bay, asset1.tile, longdescription.ldtext
> FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> asset2.assetnum LEFT OUTER JOIN longdescription ON asset1.assetid =
> longdescription.ldkey and longdescription.ldownertable = 'ASSET' and
> longdescription.ldownercol = 'DESCRIPTION'
> WHERE
> ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit1 Is Not Null) AND (1=1))
> OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit2 Is Not
> Null) AND (1=1)) OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit3 Is
> Not Null) AND (1=1)) ORDER BY asset1.cb_circuit1
>
> --- In MAXIMO@yahoogroups.com, siva ravuri <srpravuri@> wrote:
> >
> > include 1=1 in your SQL. Then only it can be replaced with where caluse.
> > example: WHERE 1=1 and
> >
> >
> >
> > ________________________________
> > From: "hankinskeith@" <keith.d.hankins@>
> > To: MAXIMO@yahoogroups.com
> > Sent: Wednesday, January 4, 2012 12:50 PM
> > Subject: [MAXIMO List] Re: SQL Assistance Requested w/Actuate
> >
> >
> >  
> > Wes/Victor -
> >
> > Thanks for the ideas... still having problems... So the SQL Victor provided (below) works... however only in Access... when I load it to the Encyclopedia and to Maximo, the report says 'There are no pages to display'...
> >
> > Here is the working SQL
> >
> > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
> > asset1.cb_secondary, asset2.manufacturer, asset2.description,
> > asset1.cb_rackassetnum, asset1.bay, asset1.tile, longdescription.ldtext
> > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > asset2.assetnum LEFT OUTER JOIN longdescription ON asset1.assetid =
> > longdescription.ldkey and longdescription.ldownertable = 'ASSET' and
> > longdescription.ldownercol = 'DESCRIPTION' WHERE
> > ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit1 Is Not Null))
> > OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit2 Is Not
> > Null)) OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit3 Is
> > Not Null)) ORDER BY asset1.cb_circuit1
> >
> > So then I tried Wes suggestion and added the following to my Method in Actuate...
> >
> > SelectStatement = StrSubst(SelectStatement, "1=1', where)
> >
> > but when I do this, the report won't even compile in Actuate...
> >
> > I'm at a loss... I'm sure this is a basic Actuate new user issue but I really don't know how to solve... Wes, based on the SQL I'm using, Actuate prompts me for the assetnum referenced in the WHERE section of my SQL... I supply it and the report runs perfectly... I suspect the problem is a disconnect between my WHERE statement the the "1=1" format you are suggesting... Can either of you help me resolve this disconnect...
> >
> > Your help is SO greatly appreciated... Keith
> >
> > --- In MAXIMO@yahoogroups.com, wwilliams@ wrote:
> > >
> > > This is a method under your datastream (where you placed your sql) there are four tabs one being Methods.
> > >
> > > Depending on how you created the report if you used the Maximo supplied one the following should be there.
> > >
> > > SelectStatement = StrSubst(SelectStatement, "1=1', where)
> > >
> > > Look at one of the out of the box reports
> > >
> > >  
> > > Wes Williams
> > >
> > >
> > >
> > >
> > > http://www.weswilliams.net
> > > http://www.williamsconnell.com
> > >
> > >
> > > ________________________________
> > > From: "hankinskeith@" <keith.d.hankins@>
> > > To: MAXIMO@yahoogroups.com
> > > Sent: Tuesday, January 3, 2012 3:35 PM
> > > Subject: Re: [MAXIMO List] SQL Assistance Requested w/Actuate
> > >
> > >
> > >  
> > > Hi Wes - Perhaps this is my issue since I don't know where to check this... Can you direct me... where would I find the function obtainselectstatement? Thanks!
> > >
> > > --- In MAXIMO@yahoogroups.com, wwilliams@ wrote:
> > > >
> > > > What does your
> > > > Function obtainselectstatement look like?
> > > > ÃÆ'‚ 
> > > > Do you have a parameter where?
> > > >
> > > > Wes Williams
> > > >
> > > >
> > > >
> > > >
> > > > http://www.weswilliams.net
> > > > http://www.williamsconnell.com
> > > >
> > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > To: MAXIMO@yahoogroups.com
> > > > Sent: Tuesday, January 3, 2012 12:38 PM
> > > > Subject: Re: [MAXIMO List] SQL Assistance Requested w/Actuate
> > > >
> > > >
> > > > ÃÆ'‚ 
> > > > Victor/Wes... Thanks for your ideas but still no go...
> > > >
> > > > Per Victor's suggestion, I tried the following and the report failed to compile...
> > > >
> > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> > > > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> > > > asset1.tile, longdescription.ldtext
> > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > asset2.assetnum
> > > > LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
> > > > longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> > > > 'DESCRIPTION'
> > > > WHERE ((asset1.cb_rppassetnum=:asset2.assetnum) AND (asset1.cb_circuit1 Is Not Null))
> > > > OR ((asset1.cb_rppassetnum=:asset2.assetnum) AND (asset1.cb_circuit2 Is Not Null))
> > > > OR ((asset1.cb_rppassetnum=:asset2.assetnum) AND (asset1.cb_circuit3 Is Not Null))
> > > > ORDER BY asset1.cb_circuit1
> > > >
> > > > HOWEVER I know my SQL is good because if I put this in SQL server for a specific record I get my required data:
> > > >
> > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> > > > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> > > > asset1.tile, longdescription.ldtext
> > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > asset2.assetnum
> > > > LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
> > > > longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> > > > 'DESCRIPTION'
> > > > WHERE ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit1 Is Not Null))
> > > > OR ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit2 Is Not Null))
> > > > OR ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit3 Is Not Null))
> > > > ORDER BY asset1.cb_circuit1
> > > >
> > > > I also tried Wes's suggestion (below) but still no go... Here's what I tried:
> > > >
> > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> > > > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> > > > asset1.tile, longdescription.ldtext
> > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > asset2.assetnum
> > > > LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
> > > > longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> > > > 'DESCRIPTION'
> > > > WHERE ((1 = 1) AND (asset1.cb_circuit1 Is Not Null))
> > > > OR ((1 = 1) AND (asset1.cb_circuit2 Is Not Null))
> > > > OR ((1 = 1) AND (asset1.cb_circuit3 Is Not Null))
> > > > ORDER BY asset1.cb_circuit1
> > > >
> > > > Any other thoughts? Thanks in advance! Keith
> > > >
> > > > --- In MAXIMO@yahoogroups.com, wwilliams@ wrote:
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > Wes Williams
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > http://www.weswilliams.net
> > > > > http://www.williamsconnell.com
> > > > >
> > > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > > To: MAXIMO@yahoogroups.com
> > > > > Sent: Monday, January 2, 2012 10:40 AM
> > > > > Subject: [MAXIMO List] SQL Assistance Requested w/Actuate
> > > > >
> > > > >
> > > > > ÃÆ'Æ'‚ÃÆ'‚  Try adding and 1 = 1
> > > > > Hello -
> > > > > Can anyone help me with this SQL statement... It is working except that I need it to pull the data based on the record I have open in Maximo through Actuate... i.e. the WHERE statement needs to indicate using the current record in Maximo... but I know I can't say this... for example: WHERE ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit1 Is Not Null))
> > > > >
> > > > > Here is the SQL.... the only part that is not correct is the WHERE statement... any help is GREATLY appreciated!
> > > > >
> > > > > Keith
> > > > >
> > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> > > > > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> > > > > asset1.tile, longdescription.ldtext
> > > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > > asset2.assetnum
> > > > > LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
> > > > > longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> > > > > 'DESCRIPTION'
> > > > > WHERE ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit1 Is Not Null))
> > > > > OR ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit2 Is Not Null))
> > > > > OR ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit3 Is Not Null))
> > > > > ORDER BY asset1.cb_circuit1
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >
> >
> >
> >
> >
>
>
>
>
>
>


From: Siva (2012-01-05 10:20)

Whereevrer asset1 is there. That means all places
Sent from my iPhone
On Jan 5, 2012, at 8:29 AM, "hankinskeith@ymail.com" <keith.d.hankins@aexp.com> wrote:
> Hi Siva -
>
> Can you clarify... change asset1 as asset in what section of the SQL... As you can see it is referencing two instances of the ASSET table... Where are you recommending the change?
>
> SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
> asset1.cb_secondary, asset2.manufacturer, asset2.description,
> asset1.cb_rackassetnum, asset1.bay, asset1.tile, longdescription.ldtext
> FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> asset2.assetnum LEFT OUTER JOIN longdescription ON asset1.assetid =
> longdescription.ldkey and longdescription.ldownertable = 'ASSET' and
> longdescription.ldownercol = 'DESCRIPTION'
> WHERE
> ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit1 Is Not Null) AND
> (1=1))
> OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit2 Is Not
> Null) AND (1=1)) OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit3
> Is
> Not Null) AND (1=1)) ORDER BY asset1.cb_circuit1
>
> --- In MAXIMO@yahoogroups.com, siva ravuri <srpravuri@...> wrote:
> >
> > change your SQL. change asset1 as asset.
> >
> >
> >
> > ________________________________
> > From: "hankinskeith@..." <keith.d.hankins@...>
> > To: MAXIMO@yahoogroups.com
> > Sent: Wednesday, January 4, 2012 5:26 PM
> > Subject: [MAXIMO List] Re: SQL Assistance Requested w/Actuate
> >
> >
> > Â
> > So I modified the SQL... and it works in Actuate... however when I load to Maximo, I get this error: Thoughts?
> >
> > Status No1: Basic error: 1011 Module:afc\db.bas Line: 193 Database Error 2: Error generated by the connected data source ... 4104: (SQL State) 37000: [Microsoft][ODBC SQL Server Driver][SQL Server] The multi-part identifier "asset.assetuid" could not be bound. [SQL State] 37000: [Microsoft][ODBC SQL Server Driver][SQL Server][Statement(s) could not be prepared.
> >
> > Here is the SQL that is working in Actuate itself... just not in Maximo...
> >
> > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
> > asset1.cb_secondary, asset2.manufacturer, asset2.description,
> > asset1.cb_rackassetnum, asset1.bay, asset1.tile, longdescription.ldtext
> > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > asset2.assetnum LEFT OUTER JOIN longdescription ON asset1.assetid =
> > longdescription.ldkey and longdescription.ldownertable = 'ASSET' and
> > longdescription.ldownercol = 'DESCRIPTION'
> > WHERE
> > ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit1 Is Not Null) AND (1=1))
> > OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit2 Is Not
> > Null) AND (1=1)) OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit3 Is
> > Not Null) AND (1=1)) ORDER BY asset1.cb_circuit1
> >
> > --- In MAXIMO@yahoogroups.com, siva ravuri <srpravuri@> wrote:
> > >
> > > include 1=1 in your SQL. Then only it can be replaced with where caluse.
> > > example: WHERE 1=1 and
> > >
> > >
> > >
> > > ________________________________
> > > From: "hankinskeith@" <keith.d.hankins@>
> > > To: MAXIMO@yahoogroups.com
> > > Sent: Wednesday, January 4, 2012 12:50 PM
> > > Subject: [MAXIMO List] Re: SQL Assistance Requested w/Actuate
> > >
> > >
> > > ÂÂ
> > > Wes/Victor -
> > >
> > > Thanks for the ideas... still having problems... So the SQL Victor provided (below) works... however only in Access... when I load it to the Encyclopedia and to Maximo, the report says 'There are no pages to display'...
> > >
> > > Here is the working SQL
> > >
> > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
> > > asset1.cb_secondary, asset2.manufacturer, asset2.description,
> > > asset1.cb_rackassetnum, asset1.bay, asset1.tile, longdescription.ldtext
> > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > asset2.assetnum LEFT OUTER JOIN longdescription ON asset1.assetid =
> > > longdescription.ldkey and longdescription.ldownertable = 'ASSET' and
> > > longdescription.ldownercol = 'DESCRIPTION' WHERE
> > > ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit1 Is Not Null))
> > > OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit2 Is Not
> > > Null)) OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit3 Is
> > > Not Null)) ORDER BY asset1.cb_circuit1
> > >
> > > So then I tried Wes suggestion and added the following to my Method in Actuate...
> > >
> > > SelectStatement = StrSubst(SelectStatement, "1=1', where)
> > >
> > > but when I do this, the report won't even compile in Actuate...
> > >
> > > I'm at a loss... I'm sure this is a basic Actuate new user issue but I really don't know how to solve... Wes, based on the SQL I'm using, Actuate prompts me for the assetnum referenced in the WHERE section of my SQL... I supply it and the report runs perfectly... I suspect the problem is a disconnect between my WHERE statement the the "1=1" format you are suggesting... Can either of you help me resolve this disconnect...
> > >
> > > Your help is SO greatly appreciated... Keith
> > >
> > > --- In MAXIMO@yahoogroups.com, wwilliams@ wrote:
> > > >
> > > > This is a method under your datastream (where you placed your sql) there are four tabs one being Methods.
> > > >
> > > > Depending on how you created the report if you used the Maximo supplied one the following should be there.
> > > >
> > > > SelectStatement = StrSubst(SelectStatement, "1=1', where)
> > > >
> > > > Look at one of the out of the box reports
> > > >
> > > > ÂÂÂ
> > > > Wes Williams
> > > >
> > > >
> > > >
> > > >
> > > > http://www.weswilliams.net
> > > > http://www.williamsconnell.com
> > > >
> > > >
> > > > ________________________________
> > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > To: MAXIMO@yahoogroups.com
> > > > Sent: Tuesday, January 3, 2012 3:35 PM
> > > > Subject: Re: [MAXIMO List] SQL Assistance Requested w/Actuate
> > > >
> > > >
> > > > ÂÂÂ
> > > > Hi Wes - Perhaps this is my issue since I don't know where to check this... Can you direct me... where would I find the function obtainselectstatement? Thanks!
> > > >
> > > > --- In MAXIMO@yahoogroups.com, wwilliams@ wrote:
> > > > >
> > > > > What does your
> > > > > Function obtainselectstatement look like?
> > > > > ÃÆ'‚ÂÂÂ
> > > > > Do you have a parameter where?
> > > > >
> > > > > Wes Williams
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > http://www.weswilliams.net
> > > > > http://www.williamsconnell.com
> > > > >
> > > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > > To: MAXIMO@yahoogroups.com
> > > > > Sent: Tuesday, January 3, 2012 12:38 PM
> > > > > Subject: Re: [MAXIMO List] SQL Assistance Requested w/Actuate
> > > > >
> > > > >
> > > > > ÃÆ'‚ÂÂÂ
> > > > > Victor/Wes... Thanks for your ideas but still no go...
> > > > >
> > > > > Per Victor's suggestion, I tried the following and the report failed to compile...
> > > > >
> > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> > > > > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> > > > > asset1.tile, longdescription.ldtext
> > > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > > asset2.assetnum
> > > > > LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
> > > > > longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> > > > > 'DESCRIPTION'
> > > > > WHERE ((asset1.cb_rppassetnum=:asset2.assetnum) AND (asset1.cb_circuit1 Is Not Null))
> > > > > OR ((asset1.cb_rppassetnum=:asset2.assetnum) AND (asset1.cb_circuit2 Is Not Null))
> > > > > OR ((asset1.cb_rppassetnum=:asset2.assetnum) AND (asset1.cb_circuit3 Is Not Null))
> > > > > ORDER BY asset1.cb_circuit1
> > > > >
> > > > > HOWEVER I know my SQL is good because if I put this in SQL server for a specific record I get my required data:
> > > > >
> > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> > > > > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> > > > > asset1.tile, longdescription.ldtext
> > > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > > asset2.assetnum
> > > > > LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
> > > > > longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> > > > > 'DESCRIPTION'
> > > > > WHERE ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit1 Is Not Null))
> > > > > OR ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit2 Is Not Null))
> > > > > OR ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit3 Is Not Null))
> > > > > ORDER BY asset1.cb_circuit1
> > > > >
> > > > > I also tried Wes's suggestion (below) but still no go... Here's what I tried:
> > > > >
> > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> > > > > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> > > > > asset1.tile, longdescription.ldtext
> > > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > > asset2.assetnum
> > > > > LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
> > > > > longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> > > > > 'DESCRIPTION'
> > > > > WHERE ((1 = 1) AND (asset1.cb_circuit1 Is Not Null))
> > > > > OR ((1 = 1) AND (asset1.cb_circuit2 Is Not Null))
> > > > > OR ((1 = 1) AND (asset1.cb_circuit3 Is Not Null))
> > > > > ORDER BY asset1.cb_circuit1
> > > > >
> > > > > Any other thoughts? Thanks in advance! Keith
> > > > >
> > > > > --- In MAXIMO@yahoogroups.com, wwilliams@ wrote:
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > Wes Williams
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > http://www.weswilliams.net
> > > > > > http://www.williamsconnell.com
> > > > > >
> > > > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > > > To: MAXIMO@yahoogroups.com
> > > > > > Sent: Monday, January 2, 2012 10:40 AM
> > > > > > Subject: [MAXIMO List] SQL Assistance Requested w/Actuate
> > > > > >
> > > > > >
> > > > > > ÃÆ'Æ'‚ÃÆ'‚ Try adding and 1 = 1
> > > > > > Hello -
> > > > > > Can anyone help me with this SQL statement... It is working except that I need it to pull the data based on the record I have open in Maximo through Actuate... i.e. the WHERE statement needs to indicate using the current record in Maximo... but I know I can't say this... for example: WHERE ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit1 Is Not Null))
> > > > > >
> > > > > > Here is the SQL.... the only part that is not correct is the WHERE statement... any help is GREATLY appreciated!
> > > > > >
> > > > > > Keith
> > > > > >
> > > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> > > > > > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> > > > > > asset1.tile, longdescription.ldtext
> > > > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > > > a


From: hankinskeith (2012-01-05 19:06)

Still not working... I made the change. The report builds nicely in Actuate but when I run it in Maximo it says there are no pages to display... Do you have any other ideas? Thanks! Keith
--- In MAXIMO@yahoogroups.com, Siva <srpravuri@...> wrote:
>
> Whereevrer asset1 is there. That means all places
>
> Sent from my iPhone
>
> On Jan 5, 2012, at 8:29 AM, "hankinskeith@..." <keith.d.hankins@...> wrote:
>
> > Hi Siva -
> >
> > Can you clarify... change asset1 as asset in what section of the SQL... As you can see it is referencing two instances of the ASSET table... Where are you recommending the change?
> >
> > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
> > asset1.cb_secondary, asset2.manufacturer, asset2.description,
> > asset1.cb_rackassetnum, asset1.bay, asset1.tile, longdescription.ldtext
> > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > asset2.assetnum LEFT OUTER JOIN longdescription ON asset1.assetid =
> > longdescription.ldkey and longdescription.ldownertable = 'ASSET' and
> > longdescription.ldownercol = 'DESCRIPTION'
> > WHERE
> > ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit1 Is Not Null) AND
> > (1=1))
> > OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit2 Is Not
> > Null) AND (1=1)) OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit3
> > Is
> > Not Null) AND (1=1)) ORDER BY asset1.cb_circuit1
> >
> > --- In MAXIMO@yahoogroups.com, siva ravuri <srpravuri@> wrote:
> > >
> > > change your SQL. change asset1 as asset.
> > >
> > >
> > >
> > > ________________________________
> > > From: "hankinskeith@" <keith.d.hankins@>
> > > To: MAXIMO@yahoogroups.com
> > > Sent: Wednesday, January 4, 2012 5:26 PM
> > > Subject: [MAXIMO List] Re: SQL Assistance Requested w/Actuate
> > >
> > >
> > > Â
> > > So I modified the SQL... and it works in Actuate... however when I load to Maximo, I get this error: Thoughts?
> > >
> > > Status No1: Basic error: 1011 Module:afc\db.bas Line: 193 Database Error 2: Error generated by the connected data source ... 4104: (SQL State) 37000: [Microsoft][ODBC SQL Server Driver][SQL Server] The multi-part identifier "asset.assetuid" could not be bound. [SQL State] 37000: [Microsoft][ODBC SQL Server Driver][SQL Server][Statement(s) could not be prepared.
> > >
> > > Here is the SQL that is working in Actuate itself... just not in Maximo...
> > >
> > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
> > > asset1.cb_secondary, asset2.manufacturer, asset2.description,
> > > asset1.cb_rackassetnum, asset1.bay, asset1.tile, longdescription.ldtext
> > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > asset2.assetnum LEFT OUTER JOIN longdescription ON asset1.assetid =
> > > longdescription.ldkey and longdescription.ldownertable = 'ASSET' and
> > > longdescription.ldownercol = 'DESCRIPTION'
> > > WHERE
> > > ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit1 Is Not Null) AND (1=1))
> > > OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit2 Is Not
> > > Null) AND (1=1)) OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit3 Is
> > > Not Null) AND (1=1)) ORDER BY asset1.cb_circuit1
> > >
> > > --- In MAXIMO@yahoogroups.com, siva ravuri <srpravuri@> wrote:
> > > >
> > > > include 1=1 in your SQL. Then only it can be replaced with where caluse.
> > > > example: WHERE 1=1 and
> > > >
> > > >
> > > >
> > > > ________________________________
> > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > To: MAXIMO@yahoogroups.com
> > > > Sent: Wednesday, January 4, 2012 12:50 PM
> > > > Subject: [MAXIMO List] Re: SQL Assistance Requested w/Actuate
> > > >
> > > >
> > > > ÂÂ
> > > > Wes/Victor -
> > > >
> > > > Thanks for the ideas... still having problems... So the SQL Victor provided (below) works... however only in Access... when I load it to the Encyclopedia and to Maximo, the report says 'There are no pages to display'...
> > > >
> > > > Here is the working SQL
> > > >
> > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
> > > > asset1.cb_secondary, asset2.manufacturer, asset2.description,
> > > > asset1.cb_rackassetnum, asset1.bay, asset1.tile, longdescription.ldtext
> > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > asset2.assetnum LEFT OUTER JOIN longdescription ON asset1.assetid =
> > > > longdescription.ldkey and longdescription.ldownertable = 'ASSET' and
> > > > longdescription.ldownercol = 'DESCRIPTION' WHERE
> > > > ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit1 Is Not Null))
> > > > OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit2 Is Not
> > > > Null)) OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit3 Is
> > > > Not Null)) ORDER BY asset1.cb_circuit1
> > > >
> > > > So then I tried Wes suggestion and added the following to my Method in Actuate...
> > > >
> > > > SelectStatement = StrSubst(SelectStatement, "1=1', where)
> > > >
> > > > but when I do this, the report won't even compile in Actuate...
> > > >
> > > > I'm at a loss... I'm sure this is a basic Actuate new user issue but I really don't know how to solve... Wes, based on the SQL I'm using, Actuate prompts me for the assetnum referenced in the WHERE section of my SQL... I supply it and the report runs perfectly... I suspect the problem is a disconnect between my WHERE statement the the "1=1" format you are suggesting... Can either of you help me resolve this disconnect...
> > > >
> > > > Your help is SO greatly appreciated... Keith
> > > >
> > > > --- In MAXIMO@yahoogroups.com, wwilliams@ wrote:
> > > > >
> > > > > This is a method under your datastream (where you placed your sql) there are four tabs one being Methods.
> > > > >
> > > > > Depending on how you created the report if you used the Maximo supplied one the followingÃÆ'‚ÂÂ should be there.
> > > > >
> > > > > SelectStatement = StrSubst(SelectStatement, "1=1', where)
> > > > >
> > > > > Look at one of the out of the box reports
> > > > >
> > > > > ÃÆ'‚ÂÂ
> > > > > Wes Williams
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > http://www.weswilliams.net
> > > > > http://www.williamsconnell.com
> > > > >
> > > > >
> > > > > ________________________________
> > > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > > To: MAXIMO@yahoogroups.com
> > > > > Sent: Tuesday, January 3, 2012 3:35 PM
> > > > > Subject: Re: [MAXIMO List] SQL Assistance Requested w/Actuate
> > > > >
> > > > >
> > > > > ÃÆ'‚ÂÂ
> > > > > Hi Wes - Perhaps this is my issue since I don't know where to check this... Can you direct me... where would I find the function obtainselectstatement? Thanks!
> > > > >
> > > > > --- In MAXIMO@yahoogroups.com, wwilliams@ wrote:
> > > > > >
> > > > > > What does your
> > > > > > Function obtainselectstatement look like?
> > > > > > ÃÆ'Æ'‚ÃÆ'‚ÂÂ
> > > > > > Do you have a parameter where?
> > > > > >
> > > > > > Wes Williams
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > http://www.weswilliams.net
> > > > > > http://www.williamsconnell.com
> > > > > >
> > > > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > > > To: MAXIMO@yahoogroups.com
> > > > > > Sent: Tuesday, January 3, 2012 12:38 PM
> > > > > > Subject: Re: [MAXIMO List] SQL Assistance Requested w/Actuate
> > > > > >
> > > > > >
> > > > > > ÃÆ'Æ'‚ÃÆ'‚ÂÂ
> > > > > > Victor/Wes... Thanks for your ideas but still no go...
> > > > > >
> > > > > > Per Victor's suggestion, I tried the following and the report failed to compile...
> > > > > >
> > > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> > > > > > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> > > > > > asset1.tile, longdescription.ldtext
> > > > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > > > asset2.assetnum
> > > > > > LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
> > > > > > longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> > > > > > 'DESCRIPTION'
> > > > > > WHERE ((asset1.cb_rppassetnum=:asset2.assetnum) AND (asset1.cb_circuit1 Is Not Null))
> > > > > > OR ((asset1.cb_rppassetnum=:asset2.assetnum) AND (asset1.cb_circuit2 Is Not Null))
> > > > > > OR ((asset1.cb_rppassetnum=:asset2.assetnum) AND (asset1.cb_circuit3 Is Not Null))
> > > > > > ORDER BY asset1.cb_circuit1
> > > > > >
> > > > > > HOWEVER I know my SQL is good because if I put this in SQL server for a specific record I get my required data:
> > > > > >
> > > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> > > > > > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> > > > > > asset1.tile, longdescription.ldtext
> > > > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > > > asset2.assetnum
> > > > > > LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
> > > > > > longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> > > > > > 'DESCRIPTION'
> > > > > > WHERE ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit1 Is Not Null))
> > > > > > OR ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit2 Is Not Null))
> > > > > > OR ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit3 Is Not Null))
> > > > > > ORDER BY asset1.cb_circuit1
> > > > > >
> > > > > > I also tried Wes's suggestion (below) but still no go... Here's what I tried:
> > > > > >
> > > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> > > > > > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> > > > > > asset1.tile, longdescription.ldtext
> > > > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > > > asset2.assetnum
> > > > > > LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
> > > > > > longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> > > > > > 'DESCRIPTION'
> > > > > > WHERE ((1 = 1) AND (asset1.cb_circuit1 Is Not Null))
> > > > > > OR ((1 = 1) AND (asset1.cb_circuit2 Is Not Null))
> > > > > > OR ((1 = 1) AND (asset1.cb_circuit3 Is Not Null))
> > > > > > ORDER BY asset1.cb_circuit1
> > > > > >
> > > > > > Any other thoughts? Thanks in advance! Keith
> > > > > >
> > > > > > --- In MAXIMO@yahoogroups.com, wwilliams@ wrote:
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > Wes Williams
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > http://www.weswilliams.net
> > > > > > > http://www.williamsconnell.com
> > > > > > >
> > > > > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > > > > To: MAXIMO@yahoogroups.com
> > > > > > > Sent: Monday, January 2, 2012 10:40 AM
> > > > > > > Subject: [MAXIMO List] SQL Assistance Requested w/Actuate
> > > > > > >
> > > > > > >
> > > > > > > ÃÆ'Æ'Æ'ÃÆ'¢â‚¬Å¡ÃÆ'Æ'‚ÃÆ'‚ Try adding and 1 = 1
> > > > > > > Hello -
> > > > > > > Can anyone help me with this SQL statement... It is working except that I need it to pull the data based on the record I have open in Maximo through Actuate... i.e. the WHERE statement needs to indicate using the current record in Maximo... but I know I can't say this... for example: WHERE ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit1 Is Not Null))
> > > > > > >
> > > > > > > Here is the SQL.... the only part that is not correct is the WHERE statement... any help is GREATLY appreciated!
> > > > > > >
> > > > > > > Keith
> > > > > > >
> > > > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> > > > > > > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> > > > > > > asset1.tile, longdescription.ldtext
> > > > > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > > > > a
>
>
>
>


From: Chris Lawless (2012-01-05 11:13)

I haven't done reports for a while but as has been said I think you need
WHERE 1=1, this is because when Maximo passes the where clause it looks for
this specific string and replaces it with the passed where clause. I'm not
an expert on the intricate details but it has to be right if Maximo/BIRT is
going to replace the appropriate part of the query.
Chris.
On Thu, Jan 5, 2012 at 11:06 AM, hankinskeith@ymail.com <
keith.d.hankins@aexp.com> wrote:
> **
>
>
> Still not working... I made the change. The report builds nicely in
> Actuate but when I run it in Maximo it says there are no pages to
> display... Do you have any other ideas? Thanks! Keith
>
> --- In MAXIMO@yahoogroups.com, Siva <srpravuri@...> wrote:
> >
> > Whereevrer asset1 is there. That means all places
> >
> > Sent from my iPhone
> >
> > On Jan 5, 2012, at 8:29 AM, "hankinskeith@..." <keith.d.hankins@...>
> wrote:
> >
> > > Hi Siva -
> > >
> > > Can you clarify... change asset1 as asset in what section of the
> SQL... As you can see it is referencing two instances of the ASSET table...
> Where are you recommending the change?
> > >
> > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
> > > asset1.cb_secondary, asset2.manufacturer, asset2.description,
> > > asset1.cb_rackassetnum, asset1.bay, asset1.tile, longdescription.ldtext
> > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > asset2.assetnum LEFT OUTER JOIN longdescription ON asset1.assetid =
> > > longdescription.ldkey and longdescription.ldownertable = 'ASSET' and
> > > longdescription.ldownercol = 'DESCRIPTION'
> > > WHERE
> > > ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit1 Is Not
> Null) AND
> > > (1=1))
> > > OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit2 Is Not
> > > Null) AND (1=1)) OR ((asset1.cb_rppassetnum=:assetnum) AND
> (asset1.cb_circuit3
> > > Is
> > > Not Null) AND (1=1)) ORDER BY asset1.cb_circuit1
> > >
> > > --- In MAXIMO@yahoogroups.com, siva ravuri <srpravuri@> wrote:
> > > >
> > > > change your SQL. change asset1 as asset.
> > > >
> > > >
> > > >
> > > > ________________________________
> > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > To: MAXIMO@yahoogroups.com
> > > > Sent: Wednesday, January 4, 2012 5:26 PM
> > > > Subject: [MAXIMO List] Re: SQL Assistance Requested w/Actuate
> > > >
> > > >
> > > > Â
> > > > So I modified the SQL... and it works in Actuate... however when I
> load to Maximo, I get this error: Thoughts?
> > > >
> > > > Status No1: Basic error: 1011 Module:afc\db.bas Line: 193 Database
> Error 2: Error generated by the connected data source ... 4104: (SQL State)
> 37000: [Microsoft][ODBC SQL Server Driver][SQL Server] The multi-part
> identifier "asset.assetuid" could not be bound. [SQL State] 37000:
> [Microsoft][ODBC SQL Server Driver][SQL Server][Statement(s) could not be
> prepared.
> > > >
> > > > Here is the SQL that is working in Actuate itself... just not in
> Maximo...
> > > >
> > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
> > > > asset1.cb_secondary, asset2.manufacturer, asset2.description,
> > > > asset1.cb_rackassetnum, asset1.bay, asset1.tile,
> longdescription.ldtext
> > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc
> =
> > > > asset2.assetnum LEFT OUTER JOIN longdescription ON asset1.assetid =
> > > > longdescription.ldkey and longdescription.ldownertable = 'ASSET' and
> > > > longdescription.ldownercol = 'DESCRIPTION'
> > > > WHERE
> > > > ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit1 Is Not
> Null) AND (1=1))
> > > > OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit2 Is Not
> > > > Null) AND (1=1)) OR ((asset1.cb_rppassetnum=:assetnum) AND
> (asset1.cb_circuit3 Is
> > > > Not Null) AND (1=1)) ORDER BY asset1.cb_circuit1
> > > >
> > > > --- In MAXIMO@yahoogroups.com, siva ravuri <srpravuri@> wrote:
> > > > >
> > > > > include 1=1 in your SQL. Then only it can be replaced with where
> caluse.
> > > > > example: WHERE 1=1 and
> > > > >
> > > > >
> > > > >
> > > > > ________________________________
> > > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > > To: MAXIMO@yahoogroups.com
> > > > > Sent: Wednesday, January 4, 2012 12:50 PM
> > > > > Subject: [MAXIMO List] Re: SQL Assistance Requested w/Actuate
> > > > >
> > > > >
> > > > > ÂÂ
> > > > > Wes/Victor -
> > > > >
> > > > > Thanks for the ideas... still having problems... So the SQL Victor
> provided (below) works... however only in Access... when I load it to the
> Encyclopedia and to Maximo, the report says 'There are no pages to
> display'...
> > > > >
> > > > > Here is the working SQL
> > > > >
> > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
> > > > > asset1.cb_secondary, asset2.manufacturer, asset2.description,
> > > > > asset1.cb_rackassetnum, asset1.bay, asset1.tile,
> longdescription.ldtext
> > > > > FROM asset asset1 left outer join asset asset2 on
> asset1.cb_loaddesc =
> > > > > asset2.assetnum LEFT OUTER JOIN longdescription ON asset1.assetid =
> > > > > longdescription.ldkey and longdescription.ldownertable = 'ASSET'
> and
> > > > > longdescription.ldownercol = 'DESCRIPTION' WHERE
> > > > > ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit1 Is Not
> Null))
> > > > > OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit2 Is
> Not
> > > > > Null)) OR ((asset1.cb_rppassetnum=:assetnum) AND
> (asset1.cb_circuit3 Is
> > > > > Not Null)) ORDER BY asset1.cb_circuit1
> > > > >
> > > > > So then I tried Wes suggestion and added the following to my
> Method in Actuate...
> > > > >
> > > > > SelectStatement = StrSubst(SelectStatement, "1=1', where)
> > > > >
> > > > > but when I do this, the report won't even compile in Actuate...
> > > > >
> > > > > I'm at a loss... I'm sure this is a basic Actuate new user issue
> but I really don't know how to solve... Wes, based on the SQL I'm using,
> Actuate prompts me for the assetnum referenced in the WHERE section of my
> SQL... I supply it and the report runs perfectly... I suspect the problem
> is a disconnect between my WHERE statement the the "1=1" format you are
> suggesting... Can either of you help me resolve this disconnect...
> > > > >
> > > > > Your help is SO greatly appreciated... Keith
> > > > >
> > > > > --- In MAXIMO@yahoogroups.com, wwilliams@ wrote:
> > > > > >
> > > > > > This is a method under your datastream (where you placed your
> sql) there are four tabs one being Methods.
> > > > > >
> > > > > > Depending on how you created the report if you used the Maximo
> supplied one the followingÃÆ'‚ÂÂ should be there.
> > > > > >
> > > > > > SelectStatement = StrSubst(SelectStatement, "1=1', where)
> > > > > >
> > > > > > Look at one of the out of the box reports
> > > > > >
> > > > > > ÃÆ'‚ÂÂ
> > > > > > Wes Williams
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > http://www.weswilliams.net
> > > > > > http://www.williamsconnell.com
> > > > > >
> > > > > >
> > > > > > ________________________________
> > > > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > > > To: MAXIMO@yahoogroups.com
> > > > > > Sent: Tuesday, January 3, 2012 3:35 PM
> > > > > > Subject: Re: [MAXIMO List] SQL Assistance Requested w/Actuate
> > > > > >
> > > > > >
> > > > > > ÃÆ'‚ÂÂ
> > > > > > Hi Wes - Perhaps this is my issue since I don't know where to
> check this... Can you direct me... where would I find the function
> obtainselectstatement? Thanks!
> > > > > >
> > > > > > --- In MAXIMO@yahoogroups.com, wwilliams@ wrote:
> > > > > > >
> > > > > > > What does your
> > > > > > > Function obtainselectstatement look like?
> > > > > > > ÃÆ'Æ'‚ÃÆ'‚ÂÂ
> > > > > > > Do you have a parameter where?
> > > > > > >
> > > > > > > Wes Williams
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > http://www.weswilliams.net
> > > > > > > http://www.williamsconnell.com
> > > > > > >
> > > > > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > > > > To: MAXIMO@yahoogroups.com
> > > > > > > Sent: Tuesday, January 3, 2012 12:38 PM
> > > > > > > Subject: Re: [MAXIMO List] SQL Assistance Requested w/Actuate
> > > > > > >
> > > > > > >
> > > > > > > ÃÆ'Æ'‚ÃÆ'‚ÂÂ
> > > > > > > Victor/Wes... Thanks for your ideas but still no go...
> > > > > > >
> > > > > > > Per Victor's suggestion, I tried the following and the report
> failed to compile...
> > > > > > >
> > > > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1,
> asset1.cb_amps,
> > > > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
> asset1.cb_secondary,
> > > > > > > asset2.manufacturer, asset2.description,
> asset1.cb_rackassetnum, asset1.bay,
> > > > > > > asset1.tile, longdescription.ldtext
> > > > > > > FROM asset asset1 left outer join asset asset2 on
> asset1.cb_loaddesc =
> > > > > > > asset2.assetnum
> > > > > > > LEFT OUTER JOIN longdescription ON asset1.assetid =
> longdescription.ldkey and
> > > > > > > longdescription.ldownertable = 'ASSET' and
> longdescription.ldownercol =
> > > > > > > 'DESCRIPTION'
> > > > > > > WHERE ((asset1.cb_rppassetnum=:asset2.assetnum) AND
> (asset1.cb_circuit1 Is Not Null))
> > > > > > > OR ((asset1.cb_rppassetnum=:asset2.assetnum) AND
> (asset1.cb_circuit2 Is Not Null))
> > > > > > > OR ((asset1.cb_rppassetnum=:asset2.assetnum) AND
> (asset1.cb_circuit3 Is Not Null))
> > > > > > > ORDER BY asset1.cb_circuit1
> > > > > > >
> > > > > > > HOWEVER I know my SQL is good because if I put this in SQL
> server for a specific record I get my required data:
> > > > > > >
> > > > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1,
> asset1.cb_amps,
> > > > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
> asset1.cb_secondary,
> > > > > > > asset2.manufacturer, asset2.description,
> asset1.cb_rackassetnum, asset1.bay,
> > > > > > > asset1.tile, longdescription.ldtext
> > > > > > > FROM asset asset1 left outer join asset asset2 on
> asset1.cb_loaddesc =
> > > > > > > asset2.assetnum
> > > > > > > LEFT OUTER JOIN longdescription ON asset1.assetid =
> longdescription.ldkey and
> > > > > > > longdescription.ldownertable = 'ASSET' and
> longdescription.ldownercol =
> > > > > > > 'DESCRIPTION'
> > > > > > > WHERE ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit1
> Is Not Null))
> > > > > > > OR ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit2 Is
> Not Null))
> > > > > > > OR ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit3 Is
> Not Null))
> > > > > > > ORDER BY asset1.cb_circuit1
> > > > > > >
> > > > > > > I also tried Wes's suggestion (below) but still no go...
> Here's what I tried:
> > > > > > >
> > > > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1,
> asset1.cb_amps,
> > > > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
> asset1.cb_secondary,
> > > > > > > asset2.manufacturer, asset2.description,
> asset1.cb_rackassetnum, asset1.bay,
> > > > > > > asset1.tile, longdescription.ldtext
> > > > > > > FROM asset asset1 left outer join asset asset2 on
> asset1.cb_loaddesc =
> > > > > > > asset2.assetnum
> > > > > > > LEFT OUTER JOIN longdescription ON asset1.assetid =
> longdescription.ldkey and
> > > > > > > longdescription.ldownertable = 'ASSET' and
> longdescription.ldownercol =
> > > > > > > 'DESCRIPTION'
> > > > > > > WHERE ((1 = 1) AND (asset1.cb_circuit1 Is Not Null))
> > > > > > > OR ((1 = 1) AND (asset1.cb_circuit2 Is Not Null))
> > > > > > > OR ((1 = 1) AND (asset1.cb_circuit3 Is Not Null))
> > > > > > > ORDER BY asset1.cb_circuit1
> > > > > > >
> > > > > > > Any other thoughts? Thanks in advance! Keith
> > > > > > >
> > > > > > > --- In MAXIMO@yahoogroups.com, wwilliams@ wrote:
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > Wes Williams
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > http://www.weswilliams.net
> > > > > > > > http://www.williamsconnell.com
> > > > > > > >
> > > > > > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > > > > > To: MAXIMO@yahoogroups.com
> > > > > > > > Sent: Monday, January 2, 2012 10:40 AM
> > > > > > > > Subject: [MAXIMO List] SQL Assistance Requested w/Actuate
> > > > > > > >
> > > > > > > >
> > > > > > > >
> ÃÆ'Æ'Æ'ÃÆ'¢â‚¬Å¡ÃÆ'Æ'‚ÃÆ'‚ÂÂ
> Try adding and 1 = 1
> > > > > > > > Hello -
> > > > > > > > Can anyone help me with this SQL statement... It is working
> except that I need it to pull the data based on the record I have open in
> Maximo through Actuate... i.e. the WHERE statement needs to indicate using
> the current record in Maximo... but I know I can't say this... for example:
> WHERE ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit1 Is
> Not Null))
> > > > > > > >
> > > > > > > > Here is the SQL.... the only part that is not correct is the
> WHERE statement... any help is GREATLY appreciated!
> > > > > > > >
> > > > > > > > Keith
> > > > > > > >
> > > > > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1,
> asset1.cb_amps,
> > > > > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
> asset1.cb_secondary,
> > > > > > > > asset2.manufacturer, asset2.description,
> asset1.cb_rackassetnum, asset1.bay,
> > > > > > > > asset1.tile, longdescription.ldtext
> > > > > > > > FROM asset asset1 left outer join asset asset2 on
> asset1.cb_loaddesc =
> > > > > > > > a
> >
> >
> >
> >
>
>
>


From: siva ravuri (2012-01-05 12:47)

So it is working. Says no data means, soomething wrong with your where clause sent by maximo.
Capture the where clause and run the sql using that where clause.

________________________________
From: "hankinskeith@ymail.com" <keith.d.hankins@aexp.com>
To: MAXIMO@yahoogroups.com
Sent: Thursday, January 5, 2012 1:06 PM
Subject: [MAXIMO List] Re: SQL Assistance Requested w/Actuate


 

Still not working... I made the change. The report builds nicely in Actuate but when I run it in Maximo it says there are no pages to display... Do you have any other ideas? Thanks! Keith
--- In MAXIMO@yahoogroups.com, Siva <srpravuri@...> wrote:
>
> Whereevrer asset1 is there. That means all places
>
> Sent from my iPhone
>
> On Jan 5, 2012, at 8:29 AM, "hankinskeith@..." <keith.d.hankins@...> wrote:
>
> > Hi Siva -
> >
> > Can you clarify... change asset1 as asset in what section of the SQL... As you can see it is referencing two instances of the ASSET table... Where are you recommending the change?
> >
> > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
> > asset1.cb_secondary, asset2.manufacturer, asset2.description,
> > asset1.cb_rackassetnum, asset1.bay, asset1.tile, longdescription.ldtext
> > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > asset2.assetnum LEFT OUTER JOIN longdescription ON asset1.assetid =
> > longdescription.ldkey and longdescription.ldownertable = 'ASSET' and
> > longdescription.ldownercol = 'DESCRIPTION'
> > WHERE
> > ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit1 Is Not Null) AND
> > (1=1))
> > OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit2 Is Not
> > Null) AND (1=1)) OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit3
> > Is
> > Not Null) AND (1=1)) ORDER BY asset1.cb_circuit1
> >
> > --- In MAXIMO@yahoogroups.com, siva ravuri <srpravuri@> wrote:
> > >
> > > change your SQL. change asset1 as asset.
> > >
> > >
> > >
> > > ________________________________
> > > From: "hankinskeith@" <keith.d.hankins@>
> > > To: MAXIMO@yahoogroups.com
> > > Sent: Wednesday, January 4, 2012 5:26 PM
> > > Subject: [MAXIMO List] Re: SQL Assistance Requested w/Actuate
> > >
> > >
> > > Â
> > > So I modified the SQL... and it works in Actuate... however when I load to Maximo, I get this error: Thoughts?
> > >
> > > Status No1: Basic error: 1011 Module:afc\db.bas Line: 193 Database Error 2: Error generated by the connected data source ... 4104: (SQL State) 37000: [Microsoft][ODBC SQL Server Driver][SQL Server] The multi-part identifier "asset.assetuid" could not be bound. [SQL State] 37000: [Microsoft][ODBC SQL Server Driver][SQL Server][Statement(s) could not be prepared.
> > >
> > > Here is the SQL that is working in Actuate itself... just not in Maximo...
> > >
> > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
> > > asset1.cb_secondary, asset2.manufacturer, asset2.description,
> > > asset1.cb_rackassetnum, asset1.bay, asset1.tile, longdescription.ldtext
> > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > asset2.assetnum LEFT OUTER JOIN longdescription ON asset1.assetid =
> > > longdescription.ldkey and longdescription.ldownertable = 'ASSET' and
> > > longdescription.ldownercol = 'DESCRIPTION'
> > > WHERE
> > > ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit1 Is Not Null) AND (1=1))
> > > OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit2 Is Not
> > > Null) AND (1=1)) OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit3 Is
> > > Not Null) AND (1=1)) ORDER BY asset1.cb_circuit1
> > >
> > > --- In MAXIMO@yahoogroups.com, siva ravuri <srpravuri@> wrote:
> > > >
> > > > include 1=1 in your SQL. Then only it can be replaced with where caluse.
> > > > example: WHERE 1=1 and
> > > >
> > > >
> > > >
> > > > ________________________________
> > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > To: MAXIMO@yahoogroups.com
> > > > Sent: Wednesday, January 4, 2012 12:50 PM
> > > > Subject: [MAXIMO List] Re: SQL Assistance Requested w/Actuate
> > > >
> > > >
> > > > ÂÂ
> > > > Wes/Victor -
> > > >
> > > > Thanks for the ideas... still having problems... So the SQL Victor provided (below) works... however only in Access... when I load it to the Encyclopedia and to Maximo, the report says 'There are no pages to display'...
> > > >
> > > > Here is the working SQL
> > > >
> > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
> > > > asset1.cb_secondary, asset2.manufacturer, asset2.description,
> > > > asset1.cb_rackassetnum, asset1.bay, asset1.tile, longdescription.ldtext
> > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > asset2.assetnum LEFT OUTER JOIN longdescription ON asset1.assetid =
> > > > longdescription.ldkey and longdescription.ldownertable = 'ASSET' and
> > > > longdescription.ldownercol = 'DESCRIPTION' WHERE
> > > > ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit1 Is Not Null))
> > > > OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit2 Is Not
> > > > Null)) OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit3 Is
> > > > Not Null)) ORDER BY asset1.cb_circuit1
> > > >
> > > > So then I tried Wes suggestion and added the following to my Method in Actuate...
> > > >
> > > > SelectStatement = StrSubst(SelectStatement, "1=1', where)
> > > >
> > > > but when I do this, the report won't even compile in Actuate...
> > > >
> > > > I'm at a loss... I'm sure this is a basic Actuate new user issue but I really don't know how to solve... Wes, based on the SQL I'm using, Actuate prompts me for the assetnum referenced in the WHERE section of my SQL... I supply it and the report runs perfectly... I suspect the problem is a disconnect between my WHERE statement the the "1=1" format you are suggesting... Can either of you help me resolve this disconnect...
> > > >
> > > > Your help is SO greatly appreciated... Keith
> > > >
> > > > --- In MAXIMO@yahoogroups.com, wwilliams@ wrote:
> > > > >
> > > > > This is a method under your datastream (where you placed your sql) there are four tabs one being Methods.
> > > > >
> > > > > Depending on how you created the report if you used the Maximo supplied one the followingÃÆ'‚ÂÂ should be there.
> > > > >
> > > > > SelectStatement = StrSubst(SelectStatement, "1=1', where)
> > > > >
> > > > > Look at one of the out of the box reports
> > > > >
> > > > > ÃÆ'‚ÂÂ
> > > > > Wes Williams
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > http://www.weswilliams.net
> > > > > http://www.williamsconnell.com
> > > > >
> > > > >
> > > > > ________________________________
> > > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > > To: MAXIMO@yahoogroups.com
> > > > > Sent: Tuesday, January 3, 2012 3:35 PM
> > > > > Subject: Re: [MAXIMO List] SQL Assistance Requested w/Actuate
> > > > >
> > > > >
> > > > > ÃÆ'‚ÂÂ
> > > > > Hi Wes - Perhaps this is my issue since I don't know where to check this... Can you direct me... where would I find the function obtainselectstatement? Thanks!
> > > > >
> > > > > --- In MAXIMO@yahoogroups.com, wwilliams@ wrote:
> > > > > >
> > > > > > What does your
> > > > > > Function obtainselectstatement look like?
> > > > > > ÃÆ'Æ'‚ÃÆ'‚ÂÂ
> > > > > > Do you have a parameter where?
> > > > > >
> > > > > > Wes Williams
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > http://www.weswilliams.net
> > > > > > http://www.williamsconnell.com
> > > > > >
> > > > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > > > To: MAXIMO@yahoogroups.com
> > > > > > Sent: Tuesday, January 3, 2012 12:38 PM
> > > > > > Subject: Re: [MAXIMO List] SQL Assistance Requested w/Actuate
> > > > > >
> > > > > >
> > > > > > ÃÆ'Æ'‚ÃÆ'‚ÂÂ
> > > > > > Victor/Wes... Thanks for your ideas but still no go...
> > > > > >
> > > > > > Per Victor's suggestion, I tried the following and the report failed to compile...
> > > > > >
> > > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> > > > > > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> > > > > > asset1.tile, longdescription.ldtext
> > > > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > > > asset2.assetnum
> > > > > > LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
> > > > > > longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> > > > > > 'DESCRIPTION'
> > > > > > WHERE ((asset1.cb_rppassetnum=:asset2.assetnum) AND (asset1.cb_circuit1 Is Not Null))
> > > > > > OR ((asset1.cb_rppassetnum=:asset2.assetnum) AND (asset1.cb_circuit2 Is Not Null))
> > > > > > OR ((asset1.cb_rppassetnum=:asset2.assetnum) AND (asset1.cb_circuit3 Is Not Null))
> > > > > > ORDER BY asset1.cb_circuit1
> > > > > >
> > > > > > HOWEVER I know my SQL is good because if I put this in SQL server for a specific record I get my required data:
> > > > > >
> > > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> > > > > > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> > > > > > asset1.tile, longdescription.ldtext
> > > > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > > > asset2.assetnum
> > > > > > LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
> > > > > > longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> > > > > > 'DESCRIPTION'
> > > > > > WHERE ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit1 Is Not Null))
> > > > > > OR ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit2 Is Not Null))
> > > > > > OR ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit3 Is Not Null))
> > > > > > ORDER BY asset1.cb_circuit1
> > > > > >
> > > > > > I also tried Wes's suggestion (below) but still no go... Here's what I tried:
> > > > > >
> > > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> > > > > > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> > > > > > asset1.tile, longdescription.ldtext
> > > > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > > > asset2.assetnum
> > > > > > LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
> > > > > > longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> > > > > > 'DESCRIPTION'
> > > > > > WHERE ((1 = 1) AND (asset1.cb_circuit1 Is Not Null))
> > > > > > OR ((1 = 1) AND (asset1.cb_circuit2 Is Not Null))
> > > > > > OR ((1 = 1) AND (asset1.cb_circuit3 Is Not Null))
> > > > > > ORDER BY asset1.cb_circuit1
> > > > > >
> > > > > > Any other thoughts? Thanks in advance! Keith
> > > > > >
> > > > > > --- In MAXIMO@yahoogroups.com, wwilliams@ wrote:
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > Wes Williams
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > http://www.weswilliams.net
> > > > > > > http://www.williamsconnell.com
> > > > > > >
> > > > > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > > > > To: MAXIMO@yahoogroups.com
> > > > > > > Sent: Monday, January 2, 2012 10:40 AM
> > > > > > > Subject: [MAXIMO List] SQL Assistance Requested w/Actuate
> > > > > > >
> > > > > > >
> > > > > > > ÃÆ'Æ'Æ'ÃÆ'¢â‚¬Å¡ÃÆ'Æ'‚ÃÆ'‚ Try adding and 1 = 1
> > > > > > > Hello -
> > > > > > > Can anyone help me with this SQL statement... It is working except that I need it to pull the data based on the record I have open in Maximo through Actuate... i.e. the WHERE statement needs to indicate using the current record in Maximo... but I know I can't say this... for example: WHERE ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit1 Is Not Null))
> > > > > > >
> > > > > > > Here is the SQL.... the only part that is not correct is the WHERE statement... any help is GREATLY appreciated!
> > > > > > >
> > > > > > > Keith
> > > > > > >
> > > > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> > > > > > > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> > > > > > > asset1.tile, longdescription.ldtext
> > > > > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > > > > a
>
>
>
>



From: hankinskeith (2012-01-05 21:14)

Hi Chris - I'm pretty sure you are correct... that there is something wrong w/my WHERE clause but I don't know what I need to change... Thoughts?
WHERE
(asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit1 Is Not Null) AND 1=1))
OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit2 Is Not
Null) AND (1=1)) OR ((asset1.cb_rppassetnum=:assetnum) AND
asset1.cb_circuit3 Is Not Null) AND (1=1)) ORDER BY asset1.cb_circuit1
--- In MAXIMO@yahoogroups.com, Chris Lawless <lawlessc@...> wrote:
>
> I haven't done reports for a while but as has been said I think you need
> WHERE 1=1, this is because when Maximo passes the where clause it looks for
> this specific string and replaces it with the passed where clause. I'm not
> an expert on the intricate details but it has to be right if Maximo/BIRT is
> going to replace the appropriate part of the query.
>
> Chris.
>
> On Thu, Jan 5, 2012 at 11:06 AM, hankinskeith@... <
> keith.d.hankins@...> wrote:
>
> > **
> >
> >
> > Still not working... I made the change. The report builds nicely in
> > Actuate but when I run it in Maximo it says there are no pages to
> > display... Do you have any other ideas? Thanks! Keith
> >
> > --- In MAXIMO@yahoogroups.com, Siva <srpravuri@> wrote:
> > >
> > > Whereevrer asset1 is there. That means all places
> > >
> > > Sent from my iPhone
> > >
> > > On Jan 5, 2012, at 8:29 AM, "hankinskeith@" <keith.d.hankins@>
> > wrote:
> > >
> > > > Hi Siva -
> > > >
> > > > Can you clarify... change asset1 as asset in what section of the
> > SQL... As you can see it is referencing two instances of the ASSET table...
> > Where are you recommending the change?
> > > >
> > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
> > > > asset1.cb_secondary, asset2.manufacturer, asset2.description,
> > > > asset1.cb_rackassetnum, asset1.bay, asset1.tile, longdescription.ldtext
> > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > asset2.assetnum LEFT OUTER JOIN longdescription ON asset1.assetid =
> > > > longdescription.ldkey and longdescription.ldownertable = 'ASSET' and
> > > > longdescription.ldownercol = 'DESCRIPTION'
> > > > WHERE
> > > > ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit1 Is Not
> > Null) AND
> > > > (1=1))
> > > > OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit2 Is Not
> > > > Null) AND (1=1)) OR ((asset1.cb_rppassetnum=:assetnum) AND
> > (asset1.cb_circuit3
> > > > Is
> > > > Not Null) AND (1=1)) ORDER BY asset1.cb_circuit1
> > > >
> > > > --- In MAXIMO@yahoogroups.com, siva ravuri <srpravuri@> wrote:
> > > > >
> > > > > change your SQL. change asset1 as asset.
> > > > >
> > > > >
> > > > >
> > > > > ________________________________
> > > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > > To: MAXIMO@yahoogroups.com
> > > > > Sent: Wednesday, January 4, 2012 5:26 PM
> > > > > Subject: [MAXIMO List] Re: SQL Assistance Requested w/Actuate
> > > > >
> > > > >
> > > > > Â
> > > > > So I modified the SQL... and it works in Actuate... however when I
> > load to Maximo, I get this error: Thoughts?
> > > > >
> > > > > Status No1: Basic error: 1011 Module:afc\db.bas Line: 193 Database
> > Error 2: Error generated by the connected data source ... 4104: (SQL State)
> > 37000: [Microsoft][ODBC SQL Server Driver][SQL Server] The multi-part
> > identifier "asset.assetuid" could not be bound. [SQL State] 37000:
> > [Microsoft][ODBC SQL Server Driver][SQL Server][Statement(s) could not be
> > prepared.
> > > > >
> > > > > Here is the SQL that is working in Actuate itself... just not in
> > Maximo...
> > > > >
> > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
> > > > > asset1.cb_secondary, asset2.manufacturer, asset2.description,
> > > > > asset1.cb_rackassetnum, asset1.bay, asset1.tile,
> > longdescription.ldtext
> > > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc
> > =
> > > > > asset2.assetnum LEFT OUTER JOIN longdescription ON asset1.assetid =
> > > > > longdescription.ldkey and longdescription.ldownertable = 'ASSET' and
> > > > > longdescription.ldownercol = 'DESCRIPTION'
> > > > > WHERE
> > > > > ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit1 Is Not
> > Null) AND (1=1))
> > > > > OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit2 Is Not
> > > > > Null) AND (1=1)) OR ((asset1.cb_rppassetnum=:assetnum) AND
> > (asset1.cb_circuit3 Is
> > > > > Not Null) AND (1=1)) ORDER BY asset1.cb_circuit1
> > > > >
> > > > > --- In MAXIMO@yahoogroups.com, siva ravuri <srpravuri@> wrote:
> > > > > >
> > > > > > include 1=1 in your SQL. Then only it can be replaced with where
> > caluse.
> > > > > > example: WHERE 1=1 and
> > > > > >
> > > > > >
> > > > > >
> > > > > > ________________________________
> > > > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > > > To: MAXIMO@yahoogroups.com
> > > > > > Sent: Wednesday, January 4, 2012 12:50 PM
> > > > > > Subject: [MAXIMO List] Re: SQL Assistance Requested w/Actuate
> > > > > >
> > > > > >
> > > > > > ÃÆ'‚Â
> > > > > > Wes/Victor -
> > > > > >
> > > > > > Thanks for the ideas... still having problems... So the SQL Victor
> > provided (below) works... however only in Access... when I load it to the
> > Encyclopedia and to Maximo, the report says 'There are no pages to
> > display'...
> > > > > >
> > > > > > Here is the working SQL
> > > > > >
> > > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
> > > > > > asset1.cb_secondary, asset2.manufacturer, asset2.description,
> > > > > > asset1.cb_rackassetnum, asset1.bay, asset1.tile,
> > longdescription.ldtext
> > > > > > FROM asset asset1 left outer join asset asset2 on
> > asset1.cb_loaddesc =
> > > > > > asset2.assetnum LEFT OUTER JOIN longdescription ON asset1.assetid =
> > > > > > longdescription.ldkey and longdescription.ldownertable = 'ASSET'
> > and
> > > > > > longdescription.ldownercol = 'DESCRIPTION' WHERE
> > > > > > ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit1 Is Not
> > Null))
> > > > > > OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit2 Is
> > Not
> > > > > > Null)) OR ((asset1.cb_rppassetnum=:assetnum) AND
> > (asset1.cb_circuit3 Is
> > > > > > Not Null)) ORDER BY asset1.cb_circuit1
> > > > > >
> > > > > > So then I tried Wes suggestion and added the following to my
> > Method in Actuate...
> > > > > >
> > > > > > SelectStatement = StrSubst(SelectStatement, "1=1', where)
> > > > > >
> > > > > > but when I do this, the report won't even compile in Actuate...
> > > > > >
> > > > > > I'm at a loss... I'm sure this is a basic Actuate new user issue
> > but I really don't know how to solve... Wes, based on the SQL I'm using,
> > Actuate prompts me for the assetnum referenced in the WHERE section of my
> > SQL... I supply it and the report runs perfectly... I suspect the problem
> > is a disconnect between my WHERE statement the the "1=1" format you are
> > suggesting... Can either of you help me resolve this disconnect...
> > > > > >
> > > > > > Your help is SO greatly appreciated... Keith
> > > > > >
> > > > > > --- In MAXIMO@yahoogroups.com, wwilliams@ wrote:
> > > > > > >
> > > > > > > This is a method under your datastream (where you placed your
> > sql) there are four tabs one being Methods.
> > > > > > >
> > > > > > > Depending on how you created the report if you used the Maximo
> > supplied one the followingÃÆ'Æ'‚ÃÆ'‚Â should be there.
> > > > > > >
> > > > > > > SelectStatement = StrSubst(SelectStatement, "1=1', where)
> > > > > > >
> > > > > > > Look at one of the out of the box reports
> > > > > > >
> > > > > > > ÃÆ'Æ'‚ÃÆ'‚Â
> > > > > > > Wes Williams
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > http://www.weswilliams.net
> > > > > > > http://www.williamsconnell.com
> > > > > > >
> > > > > > >
> > > > > > > ________________________________
> > > > > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > > > > To: MAXIMO@yahoogroups.com
> > > > > > > Sent: Tuesday, January 3, 2012 3:35 PM
> > > > > > > Subject: Re: [MAXIMO List] SQL Assistance Requested w/Actuate
> > > > > > >
> > > > > > >
> > > > > > > ÃÆ'Æ'‚ÃÆ'‚Â
> > > > > > > Hi Wes - Perhaps this is my issue since I don't know where to
> > check this... Can you direct me... where would I find the function
> > obtainselectstatement? Thanks!
> > > > > > >
> > > > > > > --- In MAXIMO@yahoogroups.com, wwilliams@ wrote:
> > > > > > > >
> > > > > > > > What does your
> > > > > > > > Function obtainselectstatement look like?
> > > > > > > > ÃÆ'Æ'Æ'ÃÆ'¢â‚¬Å¡ÃÆ'Æ'‚ÃÆ'‚Â
> > > > > > > > Do you have a parameter where?
> > > > > > > >
> > > > > > > > Wes Williams
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > http://www.weswilliams.net
> > > > > > > > http://www.williamsconnell.com
> > > > > > > >
> > > > > > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > > > > > To: MAXIMO@yahoogroups.com
> > > > > > > > Sent: Tuesday, January 3, 2012 12:38 PM
> > > > > > > > Subject: Re: [MAXIMO List] SQL Assistance Requested w/Actuate
> > > > > > > >
> > > > > > > >
> > > > > > > > ÃÆ'Æ'Æ'ÃÆ'¢â‚¬Å¡ÃÆ'Æ'‚ÃÆ'‚Â
> > > > > > > > Victor/Wes... Thanks for your ideas but still no go...
> > > > > > > >
> > > > > > > > Per Victor's suggestion, I tried the following and the report
> > failed to compile...
> > > > > > > >
> > > > > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1,
> > asset1.cb_amps,
> > > > > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
> > asset1.cb_secondary,
> > > > > > > > asset2.manufacturer, asset2.description,
> > asset1.cb_rackassetnum, asset1.bay,
> > > > > > > > asset1.tile, longdescription.ldtext
> > > > > > > > FROM asset asset1 left outer join asset asset2 on
> > asset1.cb_loaddesc =
> > > > > > > > asset2.assetnum
> > > > > > > > LEFT OUTER JOIN longdescription ON asset1.assetid =
> > longdescription.ldkey and
> > > > > > > > longdescription.ldownertable = 'ASSET' and
> > longdescription.ldownercol =
> > > > > > > > 'DESCRIPTION'
> > > > > > > > WHERE ((asset1.cb_rppassetnum=:asset2.assetnum) AND
> > (asset1.cb_circuit1 Is Not Null))
> > > > > > > > OR ((asset1.cb_rppassetnum=:asset2.assetnum) AND
> > (asset1.cb_circuit2 Is Not Null))
> > > > > > > > OR ((asset1.cb_rppassetnum=:asset2.assetnum) AND
> > (asset1.cb_circuit3 Is Not Null))
> > > > > > > > ORDER BY asset1.cb_circuit1
> > > > > > > >
> > > > > > > > HOWEVER I know my SQL is good because if I put this in SQL
> > server for a specific record I get my required data:
> > > > > > > >
> > > > > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1,
> > asset1.cb_amps,
> > > > > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
> > asset1.cb_secondary,
> > > > > > > > asset2.manufacturer, asset2.description,
> > asset1.cb_rackassetnum, asset1.bay,
> > > > > > > > asset1.tile, longdescription.ldtext
> > > > > > > > FROM asset asset1 left outer join asset asset2 on
> > asset1.cb_loaddesc =
> > > > > > > > asset2.assetnum
> > > > > > > > LEFT OUTER JOIN longdescription ON asset1.assetid =
> > longdescription.ldkey and
> > > > > > > > longdescription.ldownertable = 'ASSET' and
> > longdescription.ldownercol =
> > > > > > > > 'DESCRIPTION'
> > > > > > > > WHERE ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit1
> > Is Not Null))
> > > > > > > > OR ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit2 Is
> > Not Null))
> > > > > > > > OR ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit3 Is
> > Not Null))
> > > > > > > > ORDER BY asset1.cb_circuit1
> > > > > > > >
> > > > > > > > I also tried Wes's suggestion (below) but still no go...
> > Here's what I tried:
> > > > > > > >
> > > > > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1,
> > asset1.cb_amps,
> > > > > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
> > asset1.cb_secondary,
> > > > > > > > asset2.manufacturer, asset2.description,
> > asset1.cb_rackassetnum, asset1.bay,
> > > > > > > > asset1.tile, longdescription.ldtext
> > > > > > > > FROM asset asset1 left outer join asset asset2 on
> > asset1.cb_loaddesc =
> > > > > > > > asset2.assetnum
> > > > > > > > LEFT OUTER JOIN longdescription ON asset1.assetid =
> > longdescription.ldkey and
> > > > > > > > longdescription.ldownertable = 'ASSET' and
> > longdescription.ldownercol =
> > > > > > > > 'DESCRIPTION'
> > > > > > > > WHERE ((1 = 1) AND (asset1.cb_circuit1 Is Not Null))
> > > > > > > > OR ((1 = 1) AND (asset1.cb_circuit2 Is Not Null))
> > > > > > > > OR ((1 = 1) AND (asset1.cb_circuit3 Is Not Null))
> > > > > > > > ORDER BY asset1.cb_circuit1
> > > > > > > >
> > > > > > > > Any other thoughts? Thanks in advance! Keith
> > > > > > > >
> > > > > > > > --- In MAXIMO@yahoogroups.com, wwilliams@ wrote:
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > Wes Williams
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > http://www.weswilliams.net
> > > > > > > > > http://www.williamsconnell.com
> > > > > > > > >
> > > > > > > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > > > > > > To: MAXIMO@yahoogroups.com
> > > > > > > > > Sent: Monday, January 2, 2012 10:40 AM
> > > > > > > > > Subject: [MAXIMO List] SQL Assistance Requested w/Actuate
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > ÃÆ'Æ'Æ'ÃÆ'†'ÃÆ'Æ'¢ÃÆ'¢â€šÂ¬ÃÆ'…¡ÃÆ'Æ'Æ'ÃÆ'¢â‚¬Å¡ÃÆ'Æ'‚ÃÆ'‚Â
> > Try adding and 1 = 1
> > > > > > > > > Hello -
> > > > > > > > > Can anyone help me with this SQL statement... It is working
> > except that I need it to pull the data based on the record I have open in
> > Maximo through Actuate... i.e. the WHERE statement needs to indicate using
> > the current record in Maximo... but I know I can't say this... for example:
> > WHERE ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit1 Is
> > Not Null))
> > > > > > > > >
> > > > > > > > > Here is the SQL.... the only part that is not correct is the
> > WHERE statement... any help is GREATLY appreciated!
> > > > > > > > >
> > > > > > > > > Keith
> > > > > > > > >
> > > > > > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1,
> > asset1.cb_amps,
> > > > > > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
> > asset1.cb_secondary,
> > > > > > > > > asset2.manufacturer, asset2.description,
> > asset1.cb_rackassetnum, asset1.bay,
> > > > > > > > > asset1.tile, longdescription.ldtext
> > > > > > > > > FROM asset asset1 left outer join asset asset2 on
> > asset1.cb_loaddesc =
> > > > > > > > > a
> > >
> > >
> > >
> > >
> >
> >
> >
>
>
>
>


From: hankinskeith (2012-01-05 21:16)

I don't understand what you mean... so here is my current WHERE clause in my SQL... what is wrong wtih it? What needs to change?
WHERE
(asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit1 Is Not Null) AND 1=1))
OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit2 Is Not
Null) AND (1=1)) OR ((asset1.cb_rppassetnum=:assetnum) AND
asset1.cb_circuit3 Is Not Null) AND (1=1)) ORDER BY asset1.cb_circuit1
When you say... 'capture the where clause sent by Maximo'... what do you mean?
--- In MAXIMO@yahoogroups.com, siva ravuri <srpravuri@...> wrote:
>
> So it is working. Says no data means, soomething wrong with your where clause sent by maximo.
> Capture the where clause and run the sql using that where clause.
>
>
> ________________________________
> From: "hankinskeith@..." <keith.d.hankins@...>
> To: MAXIMO@yahoogroups.com
> Sent: Thursday, January 5, 2012 1:06 PM
> Subject: [MAXIMO List] Re: SQL Assistance Requested w/Actuate
>
>
>
>  
>
> Still not working... I made the change. The report builds nicely in Actuate but when I run it in Maximo it says there are no pages to display... Do you have any other ideas? Thanks! Keith
>
> --- In MAXIMO@yahoogroups.com, Siva <srpravuri@> wrote:
> >
> > Whereevrer asset1 is there. That means all places
> >
> > Sent from my iPhone
> >
> > On Jan 5, 2012, at 8:29 AM, "hankinskeith@" <keith.d.hankins@> wrote:
> >
> > > Hi Siva -
> > >
> > > Can you clarify... change asset1 as asset in what section of the SQL... As you can see it is referencing two instances of the ASSET table... Where are you recommending the change?
> > >
> > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
> > > asset1.cb_secondary, asset2.manufacturer, asset2.description,
> > > asset1.cb_rackassetnum, asset1.bay, asset1.tile, longdescription.ldtext
> > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > asset2.assetnum LEFT OUTER JOIN longdescription ON asset1.assetid =
> > > longdescription.ldkey and longdescription.ldownertable = 'ASSET' and
> > > longdescription.ldownercol = 'DESCRIPTION'
> > > WHERE
> > > ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit1 Is Not Null) AND
> > > (1=1))
> > > OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit2 Is Not
> > > Null) AND (1=1)) OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit3
> > > Is
> > > Not Null) AND (1=1)) ORDER BY asset1.cb_circuit1
> > >
> > > --- In MAXIMO@yahoogroups.com, siva ravuri <srpravuri@> wrote:
> > > >
> > > > change your SQL. change asset1 as asset.
> > > >
> > > >
> > > >
> > > > ________________________________
> > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > To: MAXIMO@yahoogroups.com
> > > > Sent: Wednesday, January 4, 2012 5:26 PM
> > > > Subject: [MAXIMO List] Re: SQL Assistance Requested w/Actuate
> > > >
> > > >
> > > > Â
> > > > So I modified the SQL... and it works in Actuate... however when I load to Maximo, I get this error: Thoughts?
> > > >
> > > > Status No1: Basic error: 1011 Module:afc\db.bas Line: 193 Database Error 2: Error generated by the connected data source ... 4104: (SQL State) 37000: [Microsoft][ODBC SQL Server Driver][SQL Server] The multi-part identifier "asset.assetuid" could not be bound. [SQL State] 37000: [Microsoft][ODBC SQL Server Driver][SQL Server][Statement(s) could not be prepared.
> > > >
> > > > Here is the SQL that is working in Actuate itself... just not in Maximo...
> > > >
> > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
> > > > asset1.cb_secondary, asset2.manufacturer, asset2.description,
> > > > asset1.cb_rackassetnum, asset1.bay, asset1.tile, longdescription.ldtext
> > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > asset2.assetnum LEFT OUTER JOIN longdescription ON asset1.assetid =
> > > > longdescription.ldkey and longdescription.ldownertable = 'ASSET' and
> > > > longdescription.ldownercol = 'DESCRIPTION'
> > > > WHERE
> > > > ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit1 Is Not Null) AND (1=1))
> > > > OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit2 Is Not
> > > > Null) AND (1=1)) OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit3 Is
> > > > Not Null) AND (1=1)) ORDER BY asset1.cb_circuit1
> > > >
> > > > --- In MAXIMO@yahoogroups.com, siva ravuri <srpravuri@> wrote:
> > > > >
> > > > > include 1=1 in your SQL. Then only it can be replaced with where caluse.
> > > > > example: WHERE 1=1 and
> > > > >
> > > > >
> > > > >
> > > > > ________________________________
> > > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > > To: MAXIMO@yahoogroups.com
> > > > > Sent: Wednesday, January 4, 2012 12:50 PM
> > > > > Subject: [MAXIMO List] Re: SQL Assistance Requested w/Actuate
> > > > >
> > > > >
> > > > > ÃÆ'‚Â
> > > > > Wes/Victor -
> > > > >
> > > > > Thanks for the ideas... still having problems... So the SQL Victor provided (below) works... however only in Access... when I load it to the Encyclopedia and to Maximo, the report says 'There are no pages to display'...
> > > > >
> > > > > Here is the working SQL
> > > > >
> > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
> > > > > asset1.cb_secondary, asset2.manufacturer, asset2.description,
> > > > > asset1.cb_rackassetnum, asset1.bay, asset1.tile, longdescription.ldtext
> > > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > > asset2.assetnum LEFT OUTER JOIN longdescription ON asset1.assetid =
> > > > > longdescription.ldkey and longdescription.ldownertable = 'ASSET' and
> > > > > longdescription.ldownercol = 'DESCRIPTION' WHERE
> > > > > ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit1 Is Not Null))
> > > > > OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit2 Is Not
> > > > > Null)) OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit3 Is
> > > > > Not Null)) ORDER BY asset1.cb_circuit1
> > > > >
> > > > > So then I tried Wes suggestion and added the following to my Method in Actuate...
> > > > >
> > > > > SelectStatement = StrSubst(SelectStatement, "1=1', where)
> > > > >
> > > > > but when I do this, the report won't even compile in Actuate...
> > > > >
> > > > > I'm at a loss... I'm sure this is a basic Actuate new user issue but I really don't know how to solve... Wes, based on the SQL I'm using, Actuate prompts me for the assetnum referenced in the WHERE section of my SQL... I supply it and the report runs perfectly... I suspect the problem is a disconnect between my WHERE statement the the "1=1" format you are suggesting... Can either of you help me resolve this disconnect...
> > > > >
> > > > > Your help is SO greatly appreciated... Keith
> > > > >
> > > > > --- In MAXIMO@yahoogroups.com, wwilliams@ wrote:
> > > > > >
> > > > > > This is a method under your datastream (where you placed your sql) there are four tabs one being Methods.
> > > > > >
> > > > > > Depending on how you created the report if you used the Maximo supplied one the followingÃÆ'Æ'‚ÃÆ'‚Â should be there.
> > > > > >
> > > > > > SelectStatement = StrSubst(SelectStatement, "1=1', where)
> > > > > >
> > > > > > Look at one of the out of the box reports
> > > > > >
> > > > > > ÃÆ'Æ'‚ÃÆ'‚Â
> > > > > > Wes Williams
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > http://www.weswilliams.net
> > > > > > http://www.williamsconnell.com
> > > > > >
> > > > > >
> > > > > > ________________________________
> > > > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > > > To: MAXIMO@yahoogroups.com
> > > > > > Sent: Tuesday, January 3, 2012 3:35 PM
> > > > > > Subject: Re: [MAXIMO List] SQL Assistance Requested w/Actuate
> > > > > >
> > > > > >
> > > > > > ÃÆ'Æ'‚ÃÆ'‚Â
> > > > > > Hi Wes - Perhaps this is my issue since I don't know where to check this... Can you direct me... where would I find the function obtainselectstatement? Thanks!
> > > > > >
> > > > > > --- In MAXIMO@yahoogroups.com, wwilliams@ wrote:
> > > > > > >
> > > > > > > What does your
> > > > > > > Function obtainselectstatement look like?
> > > > > > > ÃÆ'Æ'Æ'ÃÆ'¢â‚¬Å¡ÃÆ'Æ'‚ÃÆ'‚Â
> > > > > > > Do you have a parameter where?
> > > > > > >
> > > > > > > Wes Williams
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > http://www.weswilliams.net
> > > > > > > http://www.williamsconnell.com
> > > > > > >
> > > > > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > > > > To: MAXIMO@yahoogroups.com
> > > > > > > Sent: Tuesday, January 3, 2012 12:38 PM
> > > > > > > Subject: Re: [MAXIMO List] SQL Assistance Requested w/Actuate
> > > > > > >
> > > > > > >
> > > > > > > ÃÆ'Æ'Æ'ÃÆ'¢â‚¬Å¡ÃÆ'Æ'‚ÃÆ'‚Â
> > > > > > > Victor/Wes... Thanks for your ideas but still no go...
> > > > > > >
> > > > > > > Per Victor's suggestion, I tried the following and the report failed to compile...
> > > > > > >
> > > > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> > > > > > > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> > > > > > > asset1.tile, longdescription.ldtext
> > > > > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > > > > asset2.assetnum
> > > > > > > LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
> > > > > > > longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> > > > > > > 'DESCRIPTION'
> > > > > > > WHERE ((asset1.cb_rppassetnum=:asset2.assetnum) AND (asset1.cb_circuit1 Is Not Null))
> > > > > > > OR ((asset1.cb_rppassetnum=:asset2.assetnum) AND (asset1.cb_circuit2 Is Not Null))
> > > > > > > OR ((asset1.cb_rppassetnum=:asset2.assetnum) AND (asset1.cb_circuit3 Is Not Null))
> > > > > > > ORDER BY asset1.cb_circuit1
> > > > > > >
> > > > > > > HOWEVER I know my SQL is good because if I put this in SQL server for a specific record I get my required data:
> > > > > > >
> > > > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> > > > > > > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> > > > > > > asset1.tile, longdescription.ldtext
> > > > > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > > > > asset2.assetnum
> > > > > > > LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
> > > > > > > longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> > > > > > > 'DESCRIPTION'
> > > > > > > WHERE ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit1 Is Not Null))
> > > > > > > OR ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit2 Is Not Null))
> > > > > > > OR ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit3 Is Not Null))
> > > > > > > ORDER BY asset1.cb_circuit1
> > > > > > >
> > > > > > > I also tried Wes's suggestion (below) but still no go... Here's what I tried:
> > > > > > >
> > > > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> > > > > > > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> > > > > > > asset1.tile, longdescription.ldtext
> > > > > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > > > > asset2.assetnum
> > > > > > > LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
> > > > > > > longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> > > > > > > 'DESCRIPTION'
> > > > > > > WHERE ((1 = 1) AND (asset1.cb_circuit1 Is Not Null))
> > > > > > > OR ((1 = 1) AND (asset1.cb_circuit2 Is Not Null))
> > > > > > > OR ((1 = 1) AND (asset1.cb_circuit3 Is Not Null))
> > > > > > > ORDER BY asset1.cb_circuit1
> > > > > > >
> > > > > > > Any other thoughts? Thanks in advance! Keith
> > > > > > >
> > > > > > > --- In MAXIMO@yahoogroups.com, wwilliams@ wrote:
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > Wes Williams
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > http://www.weswilliams.net
> > > > > > > > http://www.williamsconnell.com
> > > > > > > >
> > > > > > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > > > > > To: MAXIMO@yahoogroups.com
> > > > > > > > Sent: Monday, January 2, 2012 10:40 AM
> > > > > > > > Subject: [MAXIMO List] SQL Assistance Requested w/Actuate
> > > > > > > >
> > > > > > > >
> > > > > > > > ÃÆ'Æ'Æ'ÃÆ'†'ÃÆ'Æ'¢ÃÆ'¢â€šÂ¬ÃÆ'…¡ÃÆ'Æ'Æ'ÃÆ'¢â‚¬Å¡ÃÆ'Æ'‚ÃÆ'‚ Try adding and 1 = 1
> > > > > > > > Hello -
> > > > > > > > Can anyone help me with this SQL statement... It is working except that I need it to pull the data based on the record I have open in Maximo through Actuate... i.e. the WHERE statement needs to indicate using the current record in Maximo... but I know I can't say this... for example: WHERE ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit1 Is Not Null))
> > > > > > > >
> > > > > > > > Here is the SQL.... the only part that is not correct is the WHERE statement... any help is GREATLY appreciated!
> > > > > > > >
> > > > > > > > Keith
> > > > > > > >
> > > > > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> > > > > > > > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> > > > > > > > asset1.tile, longdescription.ldtext
> > > > > > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > > > > > a
> >
> >
> >
> >
>
>
>
>
>
>


From: Chris Lawless (2012-01-05 13:33)

Can you try this... exactly as it is....
WHERE 1=1
AND (asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit1 Is Not Null)
AND 1=1))
OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit2 Is Not
Null) AND (1=1)) OR ((asset1.cb_rppassetnum=:assetnum) AND
asset1.cb_circuit3 Is Not Null) AND (1=1)) ORDER BY asset1.cb_circuit1
On Thu, Jan 5, 2012 at 1:14 PM, hankinskeith@ymail.com <
keith.d.hankins@aexp.com> wrote:
> **
>
>
> Hi Chris - I'm pretty sure you are correct... that there is something
> wrong w/my WHERE clause but I don't know what I need to change... Thoughts?
>
> WHERE
> (asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit1 Is Not Null) AND
> 1=1))
>
> OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit2 Is Not
> Null) AND (1=1)) OR ((asset1.cb_rppassetnum=:assetnum) AND
> asset1.cb_circuit3 Is Not Null) AND (1=1)) ORDER BY asset1.cb_circuit1
>
> --- In MAXIMO@yahoogroups.com, Chris Lawless <lawlessc@...> wrote:
> >
> > I haven't done reports for a while but as has been said I think you need
> > WHERE 1=1, this is because when Maximo passes the where clause it looks
> for
> > this specific string and replaces it with the passed where clause. I'm
> not
> > an expert on the intricate details but it has to be right if Maximo/BIRT
> is
> > going to replace the appropriate part of the query.
> >
> > Chris.
> >
> > On Thu, Jan 5, 2012 at 11:06 AM, hankinskeith@... <
> > keith.d.hankins@...> wrote:
> >
> > > **
>
> > >
> > >
> > > Still not working... I made the change. The report builds nicely in
> > > Actuate but when I run it in Maximo it says there are no pages to
> > > display... Do you have any other ideas? Thanks! Keith
> > >
> > > --- In MAXIMO@yahoogroups.com, Siva <srpravuri@> wrote:
> > > >
> > > > Whereevrer asset1 is there. That means all places
> > > >
> > > > Sent from my iPhone
> > > >
> > > > On Jan 5, 2012, at 8:29 AM, "hankinskeith@" <keith.d.hankins@>
>
> > > wrote:
> > > >
> > > > > Hi Siva -
> > > > >
> > > > > Can you clarify... change asset1 as asset in what section of the
> > > SQL... As you can see it is referencing two instances of the ASSET
> table...
> > > Where are you recommending the change?
> > > > >
> > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
> > > > > asset1.cb_secondary, asset2.manufacturer, asset2.description,
> > > > > asset1.cb_rackassetnum, asset1.bay, asset1.tile,
> longdescription.ldtext
> > > > > FROM asset asset1 left outer join asset asset2 on
> asset1.cb_loaddesc =
> > > > > asset2.assetnum LEFT OUTER JOIN longdescription ON asset1.assetid =
> > > > > longdescription.ldkey and longdescription.ldownertable = 'ASSET'
> and
> > > > > longdescription.ldownercol = 'DESCRIPTION'
> > > > > WHERE
> > > > > ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit1 Is Not
> > > Null) AND
> > > > > (1=1))
> > > > > OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit2 Is
> Not
> > > > > Null) AND (1=1)) OR ((asset1.cb_rppassetnum=:assetnum) AND
> > > (asset1.cb_circuit3
> > > > > Is
> > > > > Not Null) AND (1=1)) ORDER BY asset1.cb_circuit1
> > > > >
> > > > > --- In MAXIMO@yahoogroups.com, siva ravuri <srpravuri@> wrote:
> > > > > >
> > > > > > change your SQL. change asset1 as asset.
> > > > > >
> > > > > >
> > > > > >
> > > > > > ________________________________
> > > > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > > > To: MAXIMO@yahoogroups.com
> > > > > > Sent: Wednesday, January 4, 2012 5:26 PM
> > > > > > Subject: [MAXIMO List] Re: SQL Assistance Requested w/Actuate
> > > > > >
> > > > > >
> > > > > > Â
>
> > > > > > So I modified the SQL... and it works in Actuate... however when
> I
> > > load to Maximo, I get this error: Thoughts?
> > > > > >
> > > > > > Status No1: Basic error: 1011 Module:afc\db.bas Line: 193
> Database
> > > Error 2: Error generated by the connected data source ... 4104: (SQL
> State)
> > > 37000: [Microsoft][ODBC SQL Server Driver][SQL Server] The multi-part
> > > identifier "asset.assetuid" could not be bound. [SQL State] 37000:
> > > [Microsoft][ODBC SQL Server Driver][SQL Server][Statement(s) could not
> be
> > > prepared.
> > > > > >
> > > > > > Here is the SQL that is working in Actuate itself... just not in
> > > Maximo...
> > > > > >
> > > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1,
> asset1.cb_amps,
> > > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
> > > > > > asset1.cb_secondary, asset2.manufacturer, asset2.description,
> > > > > > asset1.cb_rackassetnum, asset1.bay, asset1.tile,
> > > longdescription.ldtext
> > > > > > FROM asset asset1 left outer join asset asset2 on
> asset1.cb_loaddesc
> > > =
> > > > > > asset2.assetnum LEFT OUTER JOIN longdescription ON
> asset1.assetid =
> > > > > > longdescription.ldkey and longdescription.ldownertable = 'ASSET'
> and
> > > > > > longdescription.ldownercol = 'DESCRIPTION'
> > > > > > WHERE
> > > > > > ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit1 Is Not
> > > Null) AND (1=1))
> > > > > > OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit2 Is
> Not
> > > > > > Null) AND (1=1)) OR ((asset1.cb_rppassetnum=:assetnum) AND
> > > (asset1.cb_circuit3 Is
> > > > > > Not Null) AND (1=1)) ORDER BY asset1.cb_circuit1
> > > > > >
> > > > > > --- In MAXIMO@yahoogroups.com, siva ravuri <srpravuri@> wrote:
> > > > > > >
> > > > > > > include 1=1 in your SQL. Then only it can be replaced with
> where
> > > caluse.
> > > > > > > example: WHERE 1=1 and
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > ________________________________
> > > > > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > > > > To: MAXIMO@yahoogroups.com
> > > > > > > Sent: Wednesday, January 4, 2012 12:50 PM
> > > > > > > Subject: [MAXIMO List] Re: SQL Assistance Requested w/Actuate
> > > > > > >
> > > > > > >
> > > > > > > ÃÆ'‚Â
> > > > > > > Wes/Victor -
> > > > > > >
> > > > > > > Thanks for the ideas... still having problems... So the SQL
> Victor
> > > provided (below) works... however only in Access... when I load it to
> the
> > > Encyclopedia and to Maximo, the report says 'There are no pages to
> > > display'...
> > > > > > >
> > > > > > > Here is the working SQL
> > > > > > >
> > > > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1,
> asset1.cb_amps,
> > > > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
> > > > > > > asset1.cb_secondary, asset2.manufacturer, asset2.description,
> > > > > > > asset1.cb_rackassetnum, asset1.bay, asset1.tile,
> > > longdescription.ldtext
> > > > > > > FROM asset asset1 left outer join asset asset2 on
> > > asset1.cb_loaddesc =
> > > > > > > asset2.assetnum LEFT OUTER JOIN longdescription ON
> asset1.assetid =
> > > > > > > longdescription.ldkey and longdescription.ldownertable =
> 'ASSET'
> > > and
> > > > > > > longdescription.ldownercol = 'DESCRIPTION' WHERE
> > > > > > > ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit1 Is
> Not
> > > Null))
> > > > > > > OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit2
> Is
> > > Not
> > > > > > > Null)) OR ((asset1.cb_rppassetnum=:assetnum) AND
> > > (asset1.cb_circuit3 Is
> > > > > > > Not Null)) ORDER BY asset1.cb_circuit1
> > > > > > >
> > > > > > > So then I tried Wes suggestion and added the following to my
> > > Method in Actuate...
> > > > > > >
> > > > > > > SelectStatement = StrSubst(SelectStatement, "1=1', where)
> > > > > > >
> > > > > > > but when I do this, the report won't even compile in Actuate...
> > > > > > >
> > > > > > > I'm at a loss... I'm sure this is a basic Actuate new user
> issue
> > > but I really don't know how to solve... Wes, based on the SQL I'm
> using,
> > > Actuate prompts me for the assetnum referenced in the WHERE section of
> my
> > > SQL... I supply it and the report runs perfectly... I suspect the
> problem
> > > is a disconnect between my WHERE statement the the "1=1" format you are
> > > suggesting... Can either of you help me resolve this disconnect...
> > > > > > >
> > > > > > > Your help is SO greatly appreciated... Keith
> > > > > > >
> > > > > > > --- In MAXIMO@yahoogroups.com, wwilliams@ wrote:
> > > > > > > >
> > > > > > > > This is a method under your datastream (where you placed your
> > > sql) there are four tabs one being Methods.
> > > > > > > >
> > > > > > > > Depending on how you created the report if you used the
> Maximo
> > > supplied one the followingÃÆ'Æ'‚ÃÆ'‚Â
> should be there.
>
> > > > > > > >
> > > > > > > > SelectStatement = StrSubst(SelectStatement, "1=1', where)
> > > > > > > >
> > > > > > > > Look at one of the out of the box reports
> > > > > > > >
> > > > > > > > ÃÆ'Æ'‚ÃÆ'‚Â
> > > > > > > > Wes Williams
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > http://www.weswilliams.net
> > > > > > > > http://www.williamsconnell.com
> > > > > > > >
> > > > > > > >
> > > > > > > > ________________________________
> > > > > > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > > > > > To: MAXIMO@yahoogroups.com
> > > > > > > > Sent: Tuesday, January 3, 2012 3:35 PM
> > > > > > > > Subject: Re: [MAXIMO List] SQL Assistance Requested w/Actuate
> > > > > > > >
> > > > > > > >
> > > > > > > > ÃÆ'Æ'‚ÃÆ'‚Â
> > > > > > > > Hi Wes - Perhaps this is my issue since I don't know where to
> > > check this... Can you direct me... where would I find the function
> > > obtainselectstatement? Thanks!
> > > > > > > >
> > > > > > > > --- In MAXIMO@yahoogroups.com, wwilliams@ wrote:
> > > > > > > > >
> > > > > > > > > What does your
> > > > > > > > > Function obtainselectstatement look like?
> > > > > > > > >
> ÃÆ'Æ'Æ'ÃÆ'¢â‚¬Å¡ÃÆ'Æ'‚ÃÆ'‚Â
> > > > > > > > > Do you have a parameter where?
> > > > > > > > >
> > > > > > > > > Wes Williams
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > http://www.weswilliams.net
> > > > > > > > > http://www.williamsconnell.com
> > > > > > > > >
> > > > > > > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > > > > > > To: MAXIMO@yahoogroups.com
> > > > > > > > > Sent: Tuesday, January 3, 2012 12:38 PM
> > > > > > > > > Subject: Re: [MAXIMO List] SQL Assistance Requested
> w/Actuate
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> ÃÆ'Æ'Æ'ÃÆ'¢â‚¬Å¡ÃÆ'Æ'‚ÃÆ'‚Â
> > > > > > > > > Victor/Wes... Thanks for your ideas but still no go...
> > > > > > > > >
> > > > > > > > > Per Victor's suggestion, I tried the following and the
> report
> > > failed to compile...
> > > > > > > > >
> > > > > > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1,
> > > asset1.cb_amps,
> > > > > > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
> > > asset1.cb_secondary,
> > > > > > > > > asset2.manufacturer, asset2.description,
> > > asset1.cb_rackassetnum, asset1.bay,
> > > > > > > > > asset1.tile, longdescription.ldtext
> > > > > > > > > FROM asset asset1 left outer join asset asset2 on
> > > asset1.cb_loaddesc =
> > > > > > > > > asset2.assetnum
> > > > > > > > > LEFT OUTER JOIN longdescription ON asset1.assetid =
> > > longdescription.ldkey and
> > > > > > > > > longdescription.ldownertable = 'ASSET' and
> > > longdescription.ldownercol =
> > > > > > > > > 'DESCRIPTION'
> > > > > > > > > WHERE ((asset1.cb_rppassetnum=:asset2.assetnum) AND
> > > (asset1.cb_circuit1 Is Not Null))
> > > > > > > > > OR ((asset1.cb_rppassetnum=:asset2.assetnum) AND
> > > (asset1.cb_circuit2 Is Not Null))
> > > > > > > > > OR ((asset1.cb_rppassetnum=:asset2.assetnum) AND
> > > (asset1.cb_circuit3 Is Not Null))
> > > > > > > > > ORDER BY asset1.cb_circuit1
> > > > > > > > >
> > > > > > > > > HOWEVER I know my SQL is good because if I put this in SQL
> > > server for a specific record I get my required data:
> > > > > > > > >
> > > > > > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1,
> > > asset1.cb_amps,
> > > > > > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
> > > asset1.cb_secondary,
> > > > > > > > > asset2.manufacturer, asset2.description,
> > > asset1.cb_rackassetnum, asset1.bay,
> > > > > > > > > asset1.tile, longdescription.ldtext
> > > > > > > > > FROM asset asset1 left outer join asset asset2 on
> > > asset1.cb_loaddesc =
> > > > > > > > > asset2.assetnum
> > > > > > > > > LEFT OUTER JOIN longdescription ON asset1.assetid =
> > > longdescription.ldkey and
> > > > > > > > > longdescription.ldownertable = 'ASSET' and
> > > longdescription.ldownercol =
> > > > > > > > > 'DESCRIPTION'
> > > > > > > > > WHERE ((asset1.cb_rppassetnum='2089') AND
> (asset1.cb_circuit1
> > > Is Not Null))
> > > > > > > > > OR ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit2
> Is
> > > Not Null))
> > > > > > > > > OR ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit3
> Is
> > > Not Null))
> > > > > > > > > ORDER BY asset1.cb_circuit1
> > > > > > > > >
> > > > > > > > > I also tried Wes's suggestion (below) but still no go...
> > > Here's what I tried:
> > > > > > > > >
> > > > > > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1,
> > > asset1.cb_amps,
> > > > > > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
> > > asset1.cb_secondary,
> > > > > > > > > asset2.manufacturer, asset2.description,
> > > asset1.cb_rackassetnum, asset1.bay,
> > > > > > > > > asset1.tile, longdescription.ldtext
> > > > > > > > > FROM asset asset1 left outer join asset asset2 on
> > > asset1.cb_loaddesc =
> > > > > > > > > asset2.assetnum
> > > > > > > > > LEFT OUTER JOIN longdescription ON asset1.assetid =
> > > longdescription.ldkey and
> > > > > > > > > longdescription.ldownertable = 'ASSET' and
> > > longdescription.ldownercol =
> > > > > > > > > 'DESCRIPTION'
> > > > > > > > > WHERE ((1 = 1) AND (asset1.cb_circuit1 Is Not Null))
> > > > > > > > > OR ((1 = 1) AND (asset1.cb_circuit2 Is Not Null))
> > > > > > > > > OR ((1 = 1) AND (asset1.cb_circuit3 Is Not Null))
> > > > > > > > > ORDER BY asset1.cb_circuit1
> > > > > > > > >
> > > > > > > > > Any other thoughts? Thanks in advance! Keith
> > > > > > > > >
> > > > > > > > > --- In MAXIMO@yahoogroups.com, wwilliams@ wrote:
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > Wes Williams
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > http://www.weswilliams.net
> > > > > > > > > > http://www.williamsconnell.com
> > > > > > > > > >
> > > > > > > > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > > > > > > > To: MAXIMO@yahoogroups.com
> > > > > > > > > > Sent: Monday, January 2, 2012 10:40 AM
> > > > > > > > > > Subject: [MAXIMO List] SQL Assistance Requested w/Actuate
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > ÃÆ'Æ'Æ'ÃÆ'â€
> 'ÃÆ'Æ'¢ÃÆ'¢â€šÂ¬ÃÆ'…¡ÃÆ'Æ'Æ'ÃÆ'¢â‚¬Å¡ÃÆ'Æ'‚ÃÆ'‚Â
>
>
> > > Try adding and 1 = 1
> > > > > > > > > > Hello -
> > > > > > > > > > Can anyone help me with this SQL statement... It is
> working
> > > except that I need it to pull the data based on the record I have open
> in
> > > Maximo through Actuate... i.e. the WHERE statement needs to indicate
> using
> > > the current record in Maximo... but I know I can't say this... for
> example:
> > > WHERE ((asset1.cb_rppassetnum = current record) AND
> (asset1.cb_circuit1 Is
> > > Not Null))
> > > > > > > > > >
> > > > > > > > > > Here is the SQL.... the only part that is not correct is
> the
> > > WHERE statement... any help is GREATLY appreciated!
> > > > > > > > > >
> > > > > > > > > > Keith
> > > > > > > > > >
> > > > > > > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1,
> > > asset1.cb_amps,
> > > > > > > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
> > > asset1.cb_secondary,
> > > > > > > > > > asset2.manufacturer, asset2.description,
> > > asset1.cb_rackassetnum, asset1.bay,
> > > > > > > > > > asset1.tile, longdescription.ldtext
> > > > > > > > > > FROM asset asset1 left outer join asset asset2 on
> > > asset1.cb_loaddesc =
> > > > > > > > > > a
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> >
> >
> >
> >
>
>
>


From: siva ravuri (2012-01-05 13:40)

not your where clause. Read like this.... " your where clause sent by maximo."
 
you are substituting 1=1 with a string called "where" which is provided by the Maximo application.

________________________________
From: "hankinskeith@ymail.com" <keith.d.hankins@aexp.com>
To: MAXIMO@yahoogroups.com
Sent: Thursday, January 5, 2012 3:16 PM
Subject: [MAXIMO List] Re: SQL Assistance Requested w/Actuate


 

I don't understand what you mean... so here is my current WHERE clause in my SQL... what is wrong wtih it? What needs to change?
WHERE
(asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit1 Is Not Null) AND 1=1))
OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit2 Is Not
Null) AND (1=1)) OR ((asset1.cb_rppassetnum=:assetnum) AND
asset1.cb_circuit3 Is Not Null) AND (1=1)) ORDER BY asset1.cb_circuit1
When you say... 'capture the where clause sent by Maximo'... what do you mean?
--- In MAXIMO@yahoogroups.com, siva ravuri <srpravuri@...> wrote:
>
> So it is working. Says no data means, soomething wrong with your where clause sent by maximo.
> Capture the where clause and run the sql using that where clause.
>
>
> ________________________________
> From: "hankinskeith@..." <keith.d.hankins@...>
> To: MAXIMO@yahoogroups.com
> Sent: Thursday, January 5, 2012 1:06 PM
> Subject: [MAXIMO List] Re: SQL Assistance Requested w/Actuate
>
>
>
>  
>
> Still not working... I made the change. The report builds nicely in Actuate but when I run it in Maximo it says there are no pages to display... Do you have any other ideas? Thanks! Keith
>
> --- In MAXIMO@yahoogroups.com, Siva <srpravuri@> wrote:
> >
> > Whereevrer asset1 is there. That means all places
> >
> > Sent from my iPhone
> >
> > On Jan 5, 2012, at 8:29 AM, "hankinskeith@" <keith.d.hankins@> wrote:
> >
> > > Hi Siva -
> > >
> > > Can you clarify... change asset1 as asset in what section of the SQL... As you can see it is referencing two instances of the ASSET table... Where are you recommending the change?
> > >
> > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
> > > asset1.cb_secondary, asset2.manufacturer, asset2.description,
> > > asset1.cb_rackassetnum, asset1.bay, asset1.tile, longdescription.ldtext
> > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > asset2.assetnum LEFT OUTER JOIN longdescription ON asset1.assetid =
> > > longdescription.ldkey and longdescription.ldownertable = 'ASSET' and
> > > longdescription.ldownercol = 'DESCRIPTION'
> > > WHERE
> > > ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit1 Is Not Null) AND
> > > (1=1))
> > > OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit2 Is Not
> > > Null) AND (1=1)) OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit3
> > > Is
> > > Not Null) AND (1=1)) ORDER BY asset1.cb_circuit1
> > >
> > > --- In MAXIMO@yahoogroups.com, siva ravuri <srpravuri@> wrote:
> > > >
> > > > change your SQL. change asset1 as asset.
> > > >
> > > >
> > > >
> > > > ________________________________
> > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > To: MAXIMO@yahoogroups.com
> > > > Sent: Wednesday, January 4, 2012 5:26 PM
> > > > Subject: [MAXIMO List] Re: SQL Assistance Requested w/Actuate
> > > >
> > > >
> > > > Â
> > > > So I modified the SQL... and it works in Actuate... however when I load to Maximo, I get this error: Thoughts?
> > > >
> > > > Status No1: Basic error: 1011 Module:afc\db.bas Line: 193 Database Error 2: Error generated by the connected data source ... 4104: (SQL State) 37000: [Microsoft][ODBC SQL Server Driver][SQL Server] The multi-part identifier "asset.assetuid" could not be bound. [SQL State] 37000: [Microsoft][ODBC SQL Server Driver][SQL Server][Statement(s) could not be prepared.
> > > >
> > > > Here is the SQL that is working in Actuate itself... just not in Maximo...
> > > >
> > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
> > > > asset1.cb_secondary, asset2.manufacturer, asset2.description,
> > > > asset1.cb_rackassetnum, asset1.bay, asset1.tile, longdescription.ldtext
> > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > asset2.assetnum LEFT OUTER JOIN longdescription ON asset1.assetid =
> > > > longdescription.ldkey and longdescription.ldownertable = 'ASSET' and
> > > > longdescription.ldownercol = 'DESCRIPTION'
> > > > WHERE
> > > > ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit1 Is Not Null) AND (1=1))
> > > > OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit2 Is Not
> > > > Null) AND (1=1)) OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit3 Is
> > > > Not Null) AND (1=1)) ORDER BY asset1.cb_circuit1
> > > >
> > > > --- In MAXIMO@yahoogroups.com, siva ravuri <srpravuri@> wrote:
> > > > >
> > > > > include 1=1 in your SQL. Then only it can be replaced with where caluse.
> > > > > example: WHERE 1=1 and
> > > > >
> > > > >
> > > > >
> > > > > ________________________________
> > > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > > To: MAXIMO@yahoogroups.com
> > > > > Sent: Wednesday, January 4, 2012 12:50 PM
> > > > > Subject: [MAXIMO List] Re: SQL Assistance Requested w/Actuate
> > > > >
> > > > >
> > > > > ÃÆ'‚Â
> > > > > Wes/Victor -
> > > > >
> > > > > Thanks for the ideas... still having problems... So the SQL Victor provided (below) works... however only in Access... when I load it to the Encyclopedia and to Maximo, the report says 'There are no pages to display'...
> > > > >
> > > > > Here is the working SQL
> > > > >
> > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
> > > > > asset1.cb_secondary, asset2.manufacturer, asset2.description,
> > > > > asset1.cb_rackassetnum, asset1.bay, asset1.tile, longdescription.ldtext
> > > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > > asset2.assetnum LEFT OUTER JOIN longdescription ON asset1.assetid =
> > > > > longdescription.ldkey and longdescription.ldownertable = 'ASSET' and
> > > > > longdescription.ldownercol = 'DESCRIPTION' WHERE
> > > > > ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit1 Is Not Null))
> > > > > OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit2 Is Not
> > > > > Null)) OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit3 Is
> > > > > Not Null)) ORDER BY asset1.cb_circuit1
> > > > >
> > > > > So then I tried Wes suggestion and added the following to my Method in Actuate...
> > > > >
> > > > > SelectStatement = StrSubst(SelectStatement, "1=1', where)
> > > > >
> > > > > but when I do this, the report won't even compile in Actuate...
> > > > >
> > > > > I'm at a loss... I'm sure this is a basic Actuate new user issue but I really don't know how to solve... Wes, based on the SQL I'm using, Actuate prompts me for the assetnum referenced in the WHERE section of my SQL... I supply it and the report runs perfectly... I suspect the problem is a disconnect between my WHERE statement the the "1=1" format you are suggesting... Can either of you help me resolve this disconnect...
> > > > >
> > > > > Your help is SO greatly appreciated... Keith
> > > > >
> > > > > --- In MAXIMO@yahoogroups.com, wwilliams@ wrote:
> > > > > >
> > > > > > This is a method under your datastream (where you placed your sql) there are four tabs one being Methods.
> > > > > >
> > > > > > Depending on how you created the report if you used the Maximo supplied one the followingÃÆ'Æ'‚ÃÆ'‚Â should be there.
> > > > > >
> > > > > > SelectStatement = StrSubst(SelectStatement, "1=1', where)
> > > > > >
> > > > > > Look at one of the out of the box reports
> > > > > >
> > > > > > ÃÆ'Æ'‚ÃÆ'‚Â
> > > > > > Wes Williams
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > http://www.weswilliams.net
> > > > > > http://www.williamsconnell.com
> > > > > >
> > > > > >
> > > > > > ________________________________
> > > > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > > > To: MAXIMO@yahoogroups.com
> > > > > > Sent: Tuesday, January 3, 2012 3:35 PM
> > > > > > Subject: Re: [MAXIMO List] SQL Assistance Requested w/Actuate
> > > > > >
> > > > > >
> > > > > > ÃÆ'Æ'‚ÃÆ'‚Â
> > > > > > Hi Wes - Perhaps this is my issue since I don't know where to check this... Can you direct me... where would I find the function obtainselectstatement? Thanks!
> > > > > >
> > > > > > --- In MAXIMO@yahoogroups.com, wwilliams@ wrote:
> > > > > > >
> > > > > > > What does your
> > > > > > > Function obtainselectstatement look like?
> > > > > > > ÃÆ'Æ'Æ'ÃÆ'¢â‚¬Å¡ÃÆ'Æ'‚ÃÆ'‚Â
> > > > > > > Do you have a parameter where?
> > > > > > >
> > > > > > > Wes Williams
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > http://www.weswilliams.net
> > > > > > > http://www.williamsconnell.com
> > > > > > >
> > > > > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > > > > To: MAXIMO@yahoogroups.com
> > > > > > > Sent: Tuesday, January 3, 2012 12:38 PM
> > > > > > > Subject: Re: [MAXIMO List] SQL Assistance Requested w/Actuate
> > > > > > >
> > > > > > >
> > > > > > > ÃÆ'Æ'Æ'ÃÆ'¢â‚¬Å¡ÃÆ'Æ'‚ÃÆ'‚Â
> > > > > > > Victor/Wes... Thanks for your ideas but still no go...
> > > > > > >
> > > > > > > Per Victor's suggestion, I tried the following and the report failed to compile...
> > > > > > >
> > > > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> > > > > > > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> > > > > > > asset1.tile, longdescription.ldtext
> > > > > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > > > > asset2.assetnum
> > > > > > > LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
> > > > > > > longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> > > > > > > 'DESCRIPTION'
> > > > > > > WHERE ((asset1.cb_rppassetnum=:asset2.assetnum) AND (asset1.cb_circuit1 Is Not Null))
> > > > > > > OR ((asset1.cb_rppassetnum=:asset2.assetnum) AND (asset1.cb_circuit2 Is Not Null))
> > > > > > > OR ((asset1.cb_rppassetnum=:asset2.assetnum) AND (asset1.cb_circuit3 Is Not Null))
> > > > > > > ORDER BY asset1.cb_circuit1
> > > > > > >
> > > > > > > HOWEVER I know my SQL is good because if I put this in SQL server for a specific record I get my required data:
> > > > > > >
> > > > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> > > > > > > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> > > > > > > asset1.tile, longdescription.ldtext
> > > > > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > > > > asset2.assetnum
> > > > > > > LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
> > > > > > > longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> > > > > > > 'DESCRIPTION'
> > > > > > > WHERE ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit1 Is Not Null))
> > > > > > > OR ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit2 Is Not Null))
> > > > > > > OR ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit3 Is Not Null))
> > > > > > > ORDER BY asset1.cb_circuit1
> > > > > > >
> > > > > > > I also tried Wes's suggestion (below) but still no go... Here's what I tried:
> > > > > > >
> > > > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> > > > > > > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> > > > > > > asset1.tile, longdescription.ldtext
> > > > > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > > > > asset2.assetnum
> > > > > > > LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
> > > > > > > longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> > > > > > > 'DESCRIPTION'
> > > > > > > WHERE ((1 = 1) AND (asset1.cb_circuit1 Is Not Null))
> > > > > > > OR ((1 = 1) AND (asset1.cb_circuit2 Is Not Null))
> > > > > > > OR ((1 = 1) AND (asset1.cb_circuit3 Is Not Null))
> > > > > > > ORDER BY asset1.cb_circuit1
> > > > > > >
> > > > > > > Any other thoughts? Thanks in advance! Keith
> > > > > > >
> > > > > > > --- In MAXIMO@yahoogroups.com, wwilliams@ wrote:
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > Wes Williams
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > http://www.weswilliams.net
> > > > > > > > http://www.williamsconnell.com
> > > > > > > >
> > > > > > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > > > > > To: MAXIMO@yahoogroups.com
> > > > > > > > Sent: Monday, January 2, 2012 10:40 AM
> > > > > > > > Subject: [MAXIMO List] SQL Assistance Requested w/Actuate
> > > > > > > >
> > > > > > > >
> > > > > > > > ÃÆ'Æ'Æ'ÃÆ'†'ÃÆ'Æ'¢ÃÆ'¢â€šÂ¬ÃÆ'…¡ÃÆ'Æ'Æ'ÃÆ'¢â‚¬Å¡ÃÆ'Æ'‚ÃÆ'‚ Try adding and 1 = 1
> > > > > > > > Hello -
> > > > > > > > Can anyone help me with this SQL statement... It is working except that I need it to pull the data based on the record I have open in Maximo through Actuate... i.e. the WHERE statement needs to indicate using the current record in Maximo... but I know I can't say this... for example: WHERE ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit1 Is Not Null))
> > > > > > > >
> > > > > > > > Here is the SQL.... the only part that is not correct is the WHERE statement... any help is GREATLY appreciated!
> > > > > > > >
> > > > > > > > Keith
> > > > > > > >
> > > > > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> > > > > > > > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> > > > > > > > asset1.tile, longdescription.ldtext
> > > > > > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > > > > > a
> >
> >
> >
> >
>
>
>
>
>
>



From: Travis Herron (2012-01-06 15:11)

Keith,
Let's back up a bit. I had this same kind of problem (my report ran in Actuate correctly but once in Maximo it said no pages to display) last month. Wes Williams here showed my a neat trick to help troubleshoot it.
1. Create a folder on your hard drive c:\temp
2. Open your report design in eRDPro.
3. In the Report Structure toolbox, navigate to your DataStream component (where you have your SQL defined).
4. With that selected, look at your Properties for the DataStream. Click on the Methods tab in Properties.
5. There should be a method titled "Function ObtainSelectStatement() as String" -- double-click on it.
6. At the end of the statement, you should see this:
ObtainSelectStatement = Super::ObtainSelectStatement( )
End Function
Change it to this:
ObtainSelectStatement = Super::ObtainSelectStatement( )

Open "C:\Temp\MySqlStatement.txt" For Output As #2
Print #2, "Sql Statement" & ObtainSelectStatement
Close #2

End Function
7. Run your report again in eRDPro.
8. Go to c:\temp and open the file MySqlStatement.txt that it made. Read through the SQL and see if you see something that stands out as incorrect. Hopefully something will leap off the page at you.
Other than that, did you build this completely from scratch, or did you use a template, or did you copy-and-modify an existing report?
After you test it in eRDPro and put it in Maximo, are you testing it against the same record(s) in Maximo? Are you using the same login credentials?
Also you could clean up the WHERE clause a little; you should only have to say 1=1 once:
WHERE 1=1 AND
((asset1.cb_rppassetnum=:assetnum) AND asset1.cb_circuit1 Is Not Null) OR
((asset1.cb_rppassetnum=:assetnum) AND asset1.cb_circuit2 Is Not Null) OR
((asset1.cb_rppassetnum=:assetnum) AND asset1.cb_circuit3 Is Not Null) ORDER BY asset1.cb_circuit1
Finally, I didn't see in your SQL anything of a siteid or orgid? Are you in a single-site/single-org setup? Even if you are, it's still good practice to put these into your SQL as well.
Keep us posted!
Travis Herron


From: cy_babe (2012-01-06 15:51)

Not sure if you have this solved, if not, try removing the alias (asset1) from your main asset reference ---just use asset. I know Maximo's default where clause fully qualifies the main object.
--- In MAXIMO@yahoogroups.com, "hankinskeith@..." <keith.d.hankins@...> wrote:
>
> Still not working... I made the change. The report builds nicely in Actuate but when I run it in Maximo it says there are no pages to display... Do you have any other ideas? Thanks! Keith
>
> --- In MAXIMO@yahoogroups.com, Siva <srpravuri@> wrote:
> >
> > Whereevrer asset1 is there. That means all places
> >
> > Sent from my iPhone
> >
> > On Jan 5, 2012, at 8:29 AM, "hankinskeith@" <keith.d.hankins@> wrote:
> >
> > > Hi Siva -
> > >
> > > Can you clarify... change asset1 as asset in what section of the SQL... As you can see it is referencing two instances of the ASSET table... Where are you recommending the change?
> > >
> > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
> > > asset1.cb_secondary, asset2.manufacturer, asset2.description,
> > > asset1.cb_rackassetnum, asset1.bay, asset1.tile, longdescription.ldtext
> > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > asset2.assetnum LEFT OUTER JOIN longdescription ON asset1.assetid =
> > > longdescription.ldkey and longdescription.ldownertable = 'ASSET' and
> > > longdescription.ldownercol = 'DESCRIPTION'
> > > WHERE
> > > ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit1 Is Not Null) AND
> > > (1=1))
> > > OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit2 Is Not
> > > Null) AND (1=1)) OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit3
> > > Is
> > > Not Null) AND (1=1)) ORDER BY asset1.cb_circuit1
> > >
> > > --- In MAXIMO@yahoogroups.com, siva ravuri <srpravuri@> wrote:
> > > >
> > > > change your SQL. change asset1 as asset.
> > > >
> > > >
> > > >
> > > > ________________________________
> > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > To: MAXIMO@yahoogroups.com
> > > > Sent: Wednesday, January 4, 2012 5:26 PM
> > > > Subject: [MAXIMO List] Re: SQL Assistance Requested w/Actuate
> > > >
> > > >
> > > > Â
> > > > So I modified the SQL... and it works in Actuate... however when I load to Maximo, I get this error: Thoughts?
> > > >
> > > > Status No1: Basic error: 1011 Module:afc\db.bas Line: 193 Database Error 2: Error generated by the connected data source ... 4104: (SQL State) 37000: [Microsoft][ODBC SQL Server Driver][SQL Server] The multi-part identifier "asset.assetuid" could not be bound. [SQL State] 37000: [Microsoft][ODBC SQL Server Driver][SQL Server][Statement(s) could not be prepared.
> > > >
> > > > Here is the SQL that is working in Actuate itself... just not in Maximo...
> > > >
> > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
> > > > asset1.cb_secondary, asset2.manufacturer, asset2.description,
> > > > asset1.cb_rackassetnum, asset1.bay, asset1.tile, longdescription.ldtext
> > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > asset2.assetnum LEFT OUTER JOIN longdescription ON asset1.assetid =
> > > > longdescription.ldkey and longdescription.ldownertable = 'ASSET' and
> > > > longdescription.ldownercol = 'DESCRIPTION'
> > > > WHERE
> > > > ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit1 Is Not Null) AND (1=1))
> > > > OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit2 Is Not
> > > > Null) AND (1=1)) OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit3 Is
> > > > Not Null) AND (1=1)) ORDER BY asset1.cb_circuit1
> > > >
> > > > --- In MAXIMO@yahoogroups.com, siva ravuri <srpravuri@> wrote:
> > > > >
> > > > > include 1=1 in your SQL. Then only it can be replaced with where caluse.
> > > > > example: WHERE 1=1 and
> > > > >
> > > > >
> > > > >
> > > > > ________________________________
> > > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > > To: MAXIMO@yahoogroups.com
> > > > > Sent: Wednesday, January 4, 2012 12:50 PM
> > > > > Subject: [MAXIMO List] Re: SQL Assistance Requested w/Actuate
> > > > >
> > > > >
> > > > > ÂÂ
> > > > > Wes/Victor -
> > > > >
> > > > > Thanks for the ideas... still having problems... So the SQL Victor provided (below) works... however only in Access... when I load it to the Encyclopedia and to Maximo, the report says 'There are no pages to display'...
> > > > >
> > > > > Here is the working SQL
> > > > >
> > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
> > > > > asset1.cb_secondary, asset2.manufacturer, asset2.description,
> > > > > asset1.cb_rackassetnum, asset1.bay, asset1.tile, longdescription.ldtext
> > > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > > asset2.assetnum LEFT OUTER JOIN longdescription ON asset1.assetid =
> > > > > longdescription.ldkey and longdescription.ldownertable = 'ASSET' and
> > > > > longdescription.ldownercol = 'DESCRIPTION' WHERE
> > > > > ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit1 Is Not Null))
> > > > > OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit2 Is Not
> > > > > Null)) OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit3 Is
> > > > > Not Null)) ORDER BY asset1.cb_circuit1
> > > > >
> > > > > So then I tried Wes suggestion and added the following to my Method in Actuate...
> > > > >
> > > > > SelectStatement = StrSubst(SelectStatement, "1=1', where)
> > > > >
> > > > > but when I do this, the report won't even compile in Actuate...
> > > > >
> > > > > I'm at a loss... I'm sure this is a basic Actuate new user issue but I really don't know how to solve... Wes, based on the SQL I'm using, Actuate prompts me for the assetnum referenced in the WHERE section of my SQL... I supply it and the report runs perfectly... I suspect the problem is a disconnect between my WHERE statement the the "1=1" format you are suggesting... Can either of you help me resolve this disconnect...
> > > > >
> > > > > Your help is SO greatly appreciated... Keith
> > > > >
> > > > > --- In MAXIMO@yahoogroups.com, wwilliams@ wrote:
> > > > > >
> > > > > > This is a method under your datastream (where you placed your sql) there are four tabs one being Methods.
> > > > > >
> > > > > > Depending on how you created the report if you used the Maximo supplied one the followingÃÆ'‚ÂÂ should be there.
> > > > > >
> > > > > > SelectStatement = StrSubst(SelectStatement, "1=1', where)
> > > > > >
> > > > > > Look at one of the out of the box reports
> > > > > >
> > > > > > ÃÆ'‚ÂÂ
> > > > > > Wes Williams
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > http://www.weswilliams.net
> > > > > > http://www.williamsconnell.com
> > > > > >
> > > > > >
> > > > > > ________________________________
> > > > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > > > To: MAXIMO@yahoogroups.com
> > > > > > Sent: Tuesday, January 3, 2012 3:35 PM
> > > > > > Subject: Re: [MAXIMO List] SQL Assistance Requested w/Actuate
> > > > > >
> > > > > >
> > > > > > ÃÆ'‚ÂÂ
> > > > > > Hi Wes - Perhaps this is my issue since I don't know where to check this... Can you direct me... where would I find the function obtainselectstatement? Thanks!
> > > > > >
> > > > > > --- In MAXIMO@yahoogroups.com, wwilliams@ wrote:
> > > > > > >
> > > > > > > What does your
> > > > > > > Function obtainselectstatement look like?
> > > > > > > ÃÆ'Æ'‚ÃÆ'‚ÂÂ
> > > > > > > Do you have a parameter where?
> > > > > > >
> > > > > > > Wes Williams
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > http://www.weswilliams.net
> > > > > > > http://www.williamsconnell.com
> > > > > > >
> > > > > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > > > > To: MAXIMO@yahoogroups.com
> > > > > > > Sent: Tuesday, January 3, 2012 12:38 PM
> > > > > > > Subject: Re: [MAXIMO List] SQL Assistance Requested w/Actuate
> > > > > > >
> > > > > > >
> > > > > > > ÃÆ'Æ'‚ÃÆ'‚ÂÂ
> > > > > > > Victor/Wes... Thanks for your ideas but still no go...
> > > > > > >
> > > > > > > Per Victor's suggestion, I tried the following and the report failed to compile...
> > > > > > >
> > > > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> > > > > > > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> > > > > > > asset1.tile, longdescription.ldtext
> > > > > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > > > > asset2.assetnum
> > > > > > > LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
> > > > > > > longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> > > > > > > 'DESCRIPTION'
> > > > > > > WHERE ((asset1.cb_rppassetnum=:asset2.assetnum) AND (asset1.cb_circuit1 Is Not Null))
> > > > > > > OR ((asset1.cb_rppassetnum=:asset2.assetnum) AND (asset1.cb_circuit2 Is Not Null))
> > > > > > > OR ((asset1.cb_rppassetnum=:asset2.assetnum) AND (asset1.cb_circuit3 Is Not Null))
> > > > > > > ORDER BY asset1.cb_circuit1
> > > > > > >
> > > > > > > HOWEVER I know my SQL is good because if I put this in SQL server for a specific record I get my required data:
> > > > > > >
> > > > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> > > > > > > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> > > > > > > asset1.tile, longdescription.ldtext
> > > > > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > > > > asset2.assetnum
> > > > > > > LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
> > > > > > > longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> > > > > > > 'DESCRIPTION'
> > > > > > > WHERE ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit1 Is Not Null))
> > > > > > > OR ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit2 Is Not Null))
> > > > > > > OR ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit3 Is Not Null))
> > > > > > > ORDER BY asset1.cb_circuit1
> > > > > > >
> > > > > > > I also tried Wes's suggestion (below) but still no go... Here's what I tried:
> > > > > > >
> > > > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> > > > > > > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> > > > > > > asset1.tile, longdescription.ldtext
> > > > > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > > > > asset2.assetnum
> > > > > > > LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
> > > > > > > longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> > > > > > > 'DESCRIPTION'
> > > > > > > WHERE ((1 = 1) AND (asset1.cb_circuit1 Is Not Null))
> > > > > > > OR ((1 = 1) AND (asset1.cb_circuit2 Is Not Null))
> > > > > > > OR ((1 = 1) AND (asset1.cb_circuit3 Is Not Null))
> > > > > > > ORDER BY asset1.cb_circuit1
> > > > > > >
> > > > > > > Any other thoughts? Thanks in advance! Keith
> > > > > > >
> > > > > > > --- In MAXIMO@yahoogroups.com, wwilliams@ wrote:
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > Wes Williams
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > http://www.weswilliams.net
> > > > > > > > http://www.williamsconnell.com
> > > > > > > >
> > > > > > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > > > > > To: MAXIMO@yahoogroups.com
> > > > > > > > Sent: Monday, January 2, 2012 10:40 AM
> > > > > > > > Subject: [MAXIMO List] SQL Assistance Requested w/Actuate
> > > > > > > >
> > > > > > > >
> > > > > > > > ÃÆ'Æ'Æ'ÃÆ'¢â‚¬Å¡ÃÆ'Æ'‚ÃÆ'‚ Try adding and 1 = 1
> > > > > > > > Hello -
> > > > > > > > Can anyone help me with this SQL statement... It is working except that I need it to pull the data based on the record I have open in Maximo through Actuate... i.e. the WHERE statement needs to indicate using the current record in Maximo... but I know I can't say this... for example: WHERE ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit1 Is Not Null))
> > > > > > > >
> > > > > > > > Here is the SQL.... the only part that is not correct is the WHERE statement... any help is GREATLY appreciated!
> > > > > > > >
> > > > > > > > Keith
> > > > > > > >
> > > > > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> > > > > > > > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> > > > > > > > asset1.tile, longdescription.ldtext
> > > > > > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > > > > > a
> >
> >
> >
> >
>


From: hankinskeith (2012-01-10 14:09)

Travis - Tried all of the suggestions... BTW, you are right, that is a nifty trick to dump the SQL to a temp file... but nothing worked... still getting the same error... report runs fine in Actuate... runs fine in any SQL building tool... but when I load to Maximo ... no go... Any other thoughts? Thanks again!
Keith
--- In MAXIMO@yahoogroups.com, "Travis Herron" <therron@...> wrote:
>
> Keith,
>
> Let's back up a bit. I had this same kind of problem (my report ran in Actuate correctly but once in Maximo it said no pages to display) last month. Wes Williams here showed my a neat trick to help troubleshoot it.
>
> 1. Create a folder on your hard drive c:\temp
> 2. Open your report design in eRDPro.
> 3. In the Report Structure toolbox, navigate to your DataStream component (where you have your SQL defined).
> 4. With that selected, look at your Properties for the DataStream. Click on the Methods tab in Properties.
> 5. There should be a method titled "Function ObtainSelectStatement() as String" -- double-click on it.
> 6. At the end of the statement, you should see this:
>
> ObtainSelectStatement = Super::ObtainSelectStatement( )
> End Function
>
> Change it to this:
>
> ObtainSelectStatement = Super::ObtainSelectStatement( )
>
> Open "C:\Temp\MySqlStatement.txt" For Output As #2
> Print #2, "Sql Statement" & ObtainSelectStatement
> Close #2
>
> End Function
>
>
> 7. Run your report again in eRDPro.
> 8. Go to c:\temp and open the file MySqlStatement.txt that it made. Read through the SQL and see if you see something that stands out as incorrect. Hopefully something will leap off the page at you.
>
>
>
> Other than that, did you build this completely from scratch, or did you use a template, or did you copy-and-modify an existing report?
>
> After you test it in eRDPro and put it in Maximo, are you testing it against the same record(s) in Maximo? Are you using the same login credentials?
>
> Also you could clean up the WHERE clause a little; you should only have to say 1=1 once:
>
> WHERE 1=1 AND
> ((asset1.cb_rppassetnum=:assetnum) AND asset1.cb_circuit1 Is Not Null) OR
> ((asset1.cb_rppassetnum=:assetnum) AND asset1.cb_circuit2 Is Not Null) OR
> ((asset1.cb_rppassetnum=:assetnum) AND asset1.cb_circuit3 Is Not Null) ORDER BY asset1.cb_circuit1
>
>
>
> Finally, I didn't see in your SQL anything of a siteid or orgid? Are you in a single-site/single-org setup? Even if you are, it's still good practice to put these into your SQL as well.
>
> Keep us posted!
>
> Travis Herron
>


From: hankinskeith (2012-01-10 14:10)

Have tried... no go... but thanks for the idea. Keith
--- In MAXIMO@yahoogroups.com, "cy_babe" <gjohnson@...> wrote:
>
> Not sure if you have this solved, if not, try removing the alias (asset1) from your main asset reference ---just use asset. I know Maximo's default where clause fully qualifies the main object.
>
> --- In MAXIMO@yahoogroups.com, "hankinskeith@" <keith.d.hankins@> wrote:
> >
> > Still not working... I made the change. The report builds nicely in Actuate but when I run it in Maximo it says there are no pages to display... Do you have any other ideas? Thanks! Keith
> >
> > --- In MAXIMO@yahoogroups.com, Siva <srpravuri@> wrote:
> > >
> > > Whereevrer asset1 is there. That means all places
> > >
> > > Sent from my iPhone
> > >
> > > On Jan 5, 2012, at 8:29 AM, "hankinskeith@" <keith.d.hankins@> wrote:
> > >
> > > > Hi Siva -
> > > >
> > > > Can you clarify... change asset1 as asset in what section of the SQL... As you can see it is referencing two instances of the ASSET table... Where are you recommending the change?
> > > >
> > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
> > > > asset1.cb_secondary, asset2.manufacturer, asset2.description,
> > > > asset1.cb_rackassetnum, asset1.bay, asset1.tile, longdescription.ldtext
> > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > asset2.assetnum LEFT OUTER JOIN longdescription ON asset1.assetid =
> > > > longdescription.ldkey and longdescription.ldownertable = 'ASSET' and
> > > > longdescription.ldownercol = 'DESCRIPTION'
> > > > WHERE
> > > > ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit1 Is Not Null) AND
> > > > (1=1))
> > > > OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit2 Is Not
> > > > Null) AND (1=1)) OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit3
> > > > Is
> > > > Not Null) AND (1=1)) ORDER BY asset1.cb_circuit1
> > > >
> > > > --- In MAXIMO@yahoogroups.com, siva ravuri <srpravuri@> wrote:
> > > > >
> > > > > change your SQL. change asset1 as asset.
> > > > >
> > > > >
> > > > >
> > > > > ________________________________
> > > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > > To: MAXIMO@yahoogroups.com
> > > > > Sent: Wednesday, January 4, 2012 5:26 PM
> > > > > Subject: [MAXIMO List] Re: SQL Assistance Requested w/Actuate
> > > > >
> > > > >
> > > > > Â
> > > > > So I modified the SQL... and it works in Actuate... however when I load to Maximo, I get this error: Thoughts?
> > > > >
> > > > > Status No1: Basic error: 1011 Module:afc\db.bas Line: 193 Database Error 2: Error generated by the connected data source ... 4104: (SQL State) 37000: [Microsoft][ODBC SQL Server Driver][SQL Server] The multi-part identifier "asset.assetuid" could not be bound. [SQL State] 37000: [Microsoft][ODBC SQL Server Driver][SQL Server][Statement(s) could not be prepared.
> > > > >
> > > > > Here is the SQL that is working in Actuate itself... just not in Maximo...
> > > > >
> > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
> > > > > asset1.cb_secondary, asset2.manufacturer, asset2.description,
> > > > > asset1.cb_rackassetnum, asset1.bay, asset1.tile, longdescription.ldtext
> > > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > > asset2.assetnum LEFT OUTER JOIN longdescription ON asset1.assetid =
> > > > > longdescription.ldkey and longdescription.ldownertable = 'ASSET' and
> > > > > longdescription.ldownercol = 'DESCRIPTION'
> > > > > WHERE
> > > > > ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit1 Is Not Null) AND (1=1))
> > > > > OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit2 Is Not
> > > > > Null) AND (1=1)) OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit3 Is
> > > > > Not Null) AND (1=1)) ORDER BY asset1.cb_circuit1
> > > > >
> > > > > --- In MAXIMO@yahoogroups.com, siva ravuri <srpravuri@> wrote:
> > > > > >
> > > > > > include 1=1 in your SQL. Then only it can be replaced with where caluse.
> > > > > > example: WHERE 1=1 and
> > > > > >
> > > > > >
> > > > > >
> > > > > > ________________________________
> > > > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > > > To: MAXIMO@yahoogroups.com
> > > > > > Sent: Wednesday, January 4, 2012 12:50 PM
> > > > > > Subject: [MAXIMO List] Re: SQL Assistance Requested w/Actuate
> > > > > >
> > > > > >
> > > > > > ÂÂ
> > > > > > Wes/Victor -
> > > > > >
> > > > > > Thanks for the ideas... still having problems... So the SQL Victor provided (below) works... however only in Access... when I load it to the Encyclopedia and to Maximo, the report says 'There are no pages to display'...
> > > > > >
> > > > > > Here is the working SQL
> > > > > >
> > > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
> > > > > > asset1.cb_secondary, asset2.manufacturer, asset2.description,
> > > > > > asset1.cb_rackassetnum, asset1.bay, asset1.tile, longdescription.ldtext
> > > > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > > > asset2.assetnum LEFT OUTER JOIN longdescription ON asset1.assetid =
> > > > > > longdescription.ldkey and longdescription.ldownertable = 'ASSET' and
> > > > > > longdescription.ldownercol = 'DESCRIPTION' WHERE
> > > > > > ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit1 Is Not Null))
> > > > > > OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit2 Is Not
> > > > > > Null)) OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit3 Is
> > > > > > Not Null)) ORDER BY asset1.cb_circuit1
> > > > > >
> > > > > > So then I tried Wes suggestion and added the following to my Method in Actuate...
> > > > > >
> > > > > > SelectStatement = StrSubst(SelectStatement, "1=1', where)
> > > > > >
> > > > > > but when I do this, the report won't even compile in Actuate...
> > > > > >
> > > > > > I'm at a loss... I'm sure this is a basic Actuate new user issue but I really don't know how to solve... Wes, based on the SQL I'm using, Actuate prompts me for the assetnum referenced in the WHERE section of my SQL... I supply it and the report runs perfectly... I suspect the problem is a disconnect between my WHERE statement the the "1=1" format you are suggesting... Can either of you help me resolve this disconnect...
> > > > > >
> > > > > > Your help is SO greatly appreciated... Keith
> > > > > >
> > > > > > --- In MAXIMO@yahoogroups.com, wwilliams@ wrote:
> > > > > > >
> > > > > > > This is a method under your datastream (where you placed your sql) there are four tabs one being Methods.
> > > > > > >
> > > > > > > Depending on how you created the report if you used the Maximo supplied one the followingÃÆ'‚ÂÂ should be there.
> > > > > > >
> > > > > > > SelectStatement = StrSubst(SelectStatement, "1=1', where)
> > > > > > >
> > > > > > > Look at one of the out of the box reports
> > > > > > >
> > > > > > > ÃÆ'‚ÂÂ
> > > > > > > Wes Williams
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > http://www.weswilliams.net
> > > > > > > http://www.williamsconnell.com
> > > > > > >
> > > > > > >
> > > > > > > ________________________________
> > > > > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > > > > To: MAXIMO@yahoogroups.com
> > > > > > > Sent: Tuesday, January 3, 2012 3:35 PM
> > > > > > > Subject: Re: [MAXIMO List] SQL Assistance Requested w/Actuate
> > > > > > >
> > > > > > >
> > > > > > > ÃÆ'‚ÂÂ
> > > > > > > Hi Wes - Perhaps this is my issue since I don't know where to check this... Can you direct me... where would I find the function obtainselectstatement? Thanks!
> > > > > > >
> > > > > > > --- In MAXIMO@yahoogroups.com, wwilliams@ wrote:
> > > > > > > >
> > > > > > > > What does your
> > > > > > > > Function obtainselectstatement look like?
> > > > > > > > ÃÆ'Æ'‚ÃÆ'‚ÂÂ
> > > > > > > > Do you have a parameter where?
> > > > > > > >
> > > > > > > > Wes Williams
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > http://www.weswilliams.net
> > > > > > > > http://www.williamsconnell.com
> > > > > > > >
> > > > > > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > > > > > To: MAXIMO@yahoogroups.com
> > > > > > > > Sent: Tuesday, January 3, 2012 12:38 PM
> > > > > > > > Subject: Re: [MAXIMO List] SQL Assistance Requested w/Actuate
> > > > > > > >
> > > > > > > >
> > > > > > > > ÃÆ'Æ'‚ÃÆ'‚ÂÂ
> > > > > > > > Victor/Wes... Thanks for your ideas but still no go...
> > > > > > > >
> > > > > > > > Per Victor's suggestion, I tried the following and the report failed to compile...
> > > > > > > >
> > > > > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> > > > > > > > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> > > > > > > > asset1.tile, longdescription.ldtext
> > > > > > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > > > > > asset2.assetnum
> > > > > > > > LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
> > > > > > > > longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> > > > > > > > 'DESCRIPTION'
> > > > > > > > WHERE ((asset1.cb_rppassetnum=:asset2.assetnum) AND (asset1.cb_circuit1 Is Not Null))
> > > > > > > > OR ((asset1.cb_rppassetnum=:asset2.assetnum) AND (asset1.cb_circuit2 Is Not Null))
> > > > > > > > OR ((asset1.cb_rppassetnum=:asset2.assetnum) AND (asset1.cb_circuit3 Is Not Null))
> > > > > > > > ORDER BY asset1.cb_circuit1
> > > > > > > >
> > > > > > > > HOWEVER I know my SQL is good because if I put this in SQL server for a specific record I get my required data:
> > > > > > > >
> > > > > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> > > > > > > > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> > > > > > > > asset1.tile, longdescription.ldtext
> > > > > > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > > > > > asset2.assetnum
> > > > > > > > LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
> > > > > > > > longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> > > > > > > > 'DESCRIPTION'
> > > > > > > > WHERE ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit1 Is Not Null))
> > > > > > > > OR ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit2 Is Not Null))
> > > > > > > > OR ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit3 Is Not Null))
> > > > > > > > ORDER BY asset1.cb_circuit1
> > > > > > > >
> > > > > > > > I also tried Wes's suggestion (below) but still no go... Here's what I tried:
> > > > > > > >
> > > > > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> > > > > > > > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> > > > > > > > asset1.tile, longdescription.ldtext
> > > > > > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > > > > > asset2.assetnum
> > > > > > > > LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
> > > > > > > > longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> > > > > > > > 'DESCRIPTION'
> > > > > > > > WHERE ((1 = 1) AND (asset1.cb_circuit1 Is Not Null))
> > > > > > > > OR ((1 = 1) AND (asset1.cb_circuit2 Is Not Null))
> > > > > > > > OR ((1 = 1) AND (asset1.cb_circuit3 Is Not Null))
> > > > > > > > ORDER BY asset1.cb_circuit1
> > > > > > > >
> > > > > > > > Any other thoughts? Thanks in advance! Keith
> > > > > > > >
> > > > > > > > --- In MAXIMO@yahoogroups.com, wwilliams@ wrote:
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > Wes Williams
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > http://www.weswilliams.net
> > > > > > > > > http://www.williamsconnell.com
> > > > > > > > >
> > > > > > > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > > > > > > To: MAXIMO@yahoogroups.com
> > > > > > > > > Sent: Monday, January 2, 2012 10:40 AM
> > > > > > > > > Subject: [MAXIMO List] SQL Assistance Requested w/Actuate
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > ÃÆ'Æ'Æ'ÃÆ'¢â‚¬Å¡ÃÆ'Æ'‚ÃÆ'‚ Try adding and 1 = 1
> > > > > > > > > Hello -
> > > > > > > > > Can anyone help me with this SQL statement... It is working except that I need it to pull the data based on the record I have open in Maximo through Actuate... i.e. the WHERE statement needs to indicate using the current record in Maximo... but I know I can't say this... for example: WHERE ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit1 Is Not Null))
> > > > > > > > >
> > > > > > > > > Here is the SQL.... the only part that is not correct is the WHERE statement... any help is GREATLY appreciated!
> > > > > > > > >
> > > > > > > > > Keith
> > > > > > > > >
> > > > > > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > > > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> > > > > > > > > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> > > > > > > > > asset1.tile, longdescription.ldtext
> > > > > > > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > > > > > > a
> > >
> > >
> > >
> > >
> >
>


From: wwilliams (2012-01-10 07:41)

So what did you see in the file?
Did you cut and paste it into your query tool?
 
Why don't you share it with the group.
Wes Williams
http://www.weswilliams.net
http://www.williamsconnell.com
From: "hankinskeith@ymail.com" <keith.d.hankins@aexp.com>
To: MAXIMO@yahoogroups.com
Sent: Tuesday, January 10, 2012 8:09 AM
Subject: [MAXIMO List] Re: SQL Assistance Requested w/Actuate
 
Travis - Tried all of the suggestions... BTW, you are right, that is a nifty trick to dump the SQL to a temp file... but nothing worked... still getting the same error... report runs fine in Actuate... runs fine in any SQL building tool... but when I load to Maximo ... no go... Any other thoughts? Thanks again!
Keith
--- In MAXIMO@yahoogroups.com, "Travis Herron" <therron@...> wrote:
>
> Keith,
>
> Let's back up a bit. I had this same kind of problem (my report ran in Actuate correctly but once in Maximo it said no pages to display) last month. Wes Williams here showed my a neat trick to help troubleshoot it.
>
> 1. Create a folder on your hard drive c:\temp
> 2. Open your report design in eRDPro.
> 3. In the Report Structure toolbox, navigate to your DataStream component (where you have your SQL defined).
> 4. With that selected, look at your Properties for the DataStream. Click on the Methods tab in Properties.
> 5. There should be a method titled "Function ObtainSelectStatement() as String" -- double-click on it.
> 6. At the end of the statement, you should see this:
>
> ObtainSelectStatement = Super::ObtainSelectStatement( )
> End Function
>
> Change it to this:
>
> ObtainSelectStatement = Super::ObtainSelectStatement( )
>
> Open "C:\Temp\MySqlStatement.txt" For Output As #2
> Print #2, "Sql Statement" & ObtainSelectStatement
> Close #2
>
> End Function
>
>
> 7. Run your report again in eRDPro.
> 8. Go to c:\temp and open the file MySqlStatement.txt that it made. Read through the SQL and see if you see something that stands out as incorrect. Hopefully something will leap off the page at you.
>
>
>
> Other than that, did you build this completely from scratch, or did you use a template, or did you copy-and-modify an existing report?
>
> After you test it in eRDPro and put it in Maximo, are you testing it against the same record(s) in Maximo? Are you using the same login credentials?
>
> Also you could clean up the WHERE clause a little; you should only have to say 1=1 once:
>
> WHERE 1=1 AND
> ((asset1.cb_rppassetnum=:assetnum) AND asset1.cb_circuit1 Is Not Null) OR
> ((asset1.cb_rppassetnum=:assetnum) AND asset1.cb_circuit2 Is Not Null) OR
> ((asset1.cb_rppassetnum=:assetnum) AND asset1.cb_circuit3 Is Not Null) ORDER BY asset1.cb_circuit1
>
>
>
> Finally, I didn't see in your SQL anything of a siteid or orgid? Are you in a single-site/single-org setup? Even if you are, it's still good practice to put these into your SQL as well.
>
> Keep us posted!
>
> Travis Herron
>


From: kimprisk (2012-01-11 09:12)

Hi Keith,
Do you wish to report on a number of assets such as those available from the list tab in assets, or just one asset?
If you want only one asset then you will have to make sure :assetnum is defined in the report admin setup in Maximo as a parameter. In this case you do not need the 1=1 part in the where clause.
However if you want to report on more than one assetnum the 1=1 will be needed to pass this list of assetnums to the report. Now you have a problem as I do not believe each of the assetnums that get passed will be set to a new :assetnum for each in the list. I could be wrong on this though as I have only used parameters for things like start date and end date which are fixed for all records.
What I would do initially is to change the three instances of :assetnum to an actual asset number e.g. '1001' (including the single quote marks) in erdpro but picking the assetnum of an asset that you are interested in. Then upload it to Maximo. You probably chose such an asset when you ran the report in erdpro. If you want to leave the [1=1 AND ] in at this stage you could do so, but make sure you have that asset displayed in Maximo so you are using the same assetnum in each case. If this works you will know that basically the report is OK, and it is the parameters that are causing grief.
Hope this helps.
Kim Prisk
The University of Auckland
New Zealand
--- In MAXIMO@yahoogroups.com, "Travis Herron" <therron@...> wrote:
>
> Keith,
>
> Let's back up a bit. I had this same kind of problem (my report ran in Actuate correctly but once in Maximo it said no pages to display) last month. Wes Williams here showed my a neat trick to help troubleshoot it.
>
> 1. Create a folder on your hard drive c:\temp
> 2. Open your report design in eRDPro.
> 3. In the Report Structure toolbox, navigate to your DataStream component (where you have your SQL defined).
> 4. With that selected, look at your Properties for the DataStream. Click on the Methods tab in Properties.
> 5. There should be a method titled "Function ObtainSelectStatement() as String" -- double-click on it.
> 6. At the end of the statement, you should see this:
>
> ObtainSelectStatement = Super::ObtainSelectStatement( )
> End Function
>
> Change it to this:
>
> ObtainSelectStatement = Super::ObtainSelectStatement( )
>
> Open "C:\Temp\MySqlStatement.txt" For Output As #2
> Print #2, "Sql Statement" & ObtainSelectStatement
> Close #2
>
> End Function
>
>
> 7. Run your report again in eRDPro.
> 8. Go to c:\temp and open the file MySqlStatement.txt that it made. Read through the SQL and see if you see something that stands out as incorrect. Hopefully something will leap off the page at you.
>
>
>
> Other than that, did you build this completely from scratch, or did you use a template, or did you copy-and-modify an existing report?
>
> After you test it in eRDPro and put it in Maximo, are you testing it against the same record(s) in Maximo? Are you using the same login credentials?
>
> Also you could clean up the WHERE clause a little; you should only have to say 1=1 once:
>
> WHERE 1=1 AND
> ((asset1.cb_rppassetnum=:assetnum) AND asset1.cb_circuit1 Is Not Null) OR
> ((asset1.cb_rppassetnum=:assetnum) AND asset1.cb_circuit2 Is Not Null) OR
> ((asset1.cb_rppassetnum=:assetnum) AND asset1.cb_circuit3 Is Not Null) ORDER BY asset1.cb_circuit1
>
>
>
> Finally, I didn't see in your SQL anything of a siteid or orgid? Are you in a single-site/single-org setup? Even if you are, it's still good practice to put these into your SQL as well.
>
> Keep us posted!
>
> Travis Herron
>


From: hankinskeith (2012-01-19 18:53)

All -
For anyone watching this thread I feel like I am so close and that there is just a disconnect between my data stream query and my FunctionObtainSelect Statement... but I can't figure it out... So the report runs great in Actuate... perfect... but when loaded to Maximo it pulls information up for every record in the ASSET table that meets the criteria in the WHERE clause of the data query instead of just the record selected on the screen in Maxmio...
Here is my Query from the Data: Texitual Query Editor...
SELECT asset.cb_rppassetdesc, asset.cb_circuit1, asset.cb_amps,
asset.cb_poles, asset.cb_cabletype, asset.cb_cbllngth, asset.cb_secondary,
asset2.manufacturer, asset2.description, asset.cb_rackassetnum, asset.bay,
asset.tile, longdescription.ldtext
FROM asset asset left outer join asset asset2 on asset.cb_loaddesc =
asset2.assetnum
LEFT OUTER JOIN longdescription ON asset.assetid = longdescription.ldkey and
longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
'DESCRIPTION'
WHERE 1=1 AND
((asset.cb_rppassetnum=:assetnum) AND asset.cb_circuit1 Is Not Null) OR
((asset.cb_rppassetnum=:assetnum) AND asset.cb_circuit2 Is Not Null) OR
((asset.cb_rppassetnum=:assetnum) AND asset.cb_circuit3 Is Not Null) ORDER
BY asset.cb_circuit1
and here is my Textual Query Source Function ObtainSelectStatement
Function ObtainSelectStatement( ) As String
If MROIncludeWhere Then
If Not (assetnum = "") and Not (IsNull(assetnum)) Then
where = where & " and asset.siteid = '" & mroSite & "' "
where = where & " and asset.assetnum = '" & assetnum & "' "
End If
SelectStatement = StrSubst(SelectStatement, "1=1", where)
End If
If MROParseSchema Then
If UCase(schema) <> "MAXIMO" then
Do While InStr(SelectStatement, "MAXIMO.")
SelectStatement = StrSubst(SelectStatement, "MAXIMO.", schema & ".")
Loop
End If
End If
ObtainSelectStatement = Super::ObtainSelectStatement( )
End Function
Any other ideas?
Keith
--- In MAXIMO@yahoogroups.com, "hankinskeith@..." <keith.d.hankins@...> wrote:
>
> Have tried... no go... but thanks for the idea. Keith
>
> --- In MAXIMO@yahoogroups.com, "cy_babe" <gjohnson@> wrote:
> >
> > Not sure if you have this solved, if not, try removing the alias (asset1) from your main asset reference ---just use asset. I know Maximo's default where clause fully qualifies the main object.
> >
> > --- In MAXIMO@yahoogroups.com, "hankinskeith@" <keith.d.hankins@> wrote:
> > >
> > > Still not working... I made the change. The report builds nicely in Actuate but when I run it in Maximo it says there are no pages to display... Do you have any other ideas? Thanks! Keith
> > >
> > > --- In MAXIMO@yahoogroups.com, Siva <srpravuri@> wrote:
> > > >
> > > > Whereevrer asset1 is there. That means all places
> > > >
> > > > Sent from my iPhone
> > > >
> > > > On Jan 5, 2012, at 8:29 AM, "hankinskeith@" <keith.d.hankins@> wrote:
> > > >
> > > > > Hi Siva -
> > > > >
> > > > > Can you clarify... change asset1 as asset in what section of the SQL... As you can see it is referencing two instances of the ASSET table... Where are you recommending the change?
> > > > >
> > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
> > > > > asset1.cb_secondary, asset2.manufacturer, asset2.description,
> > > > > asset1.cb_rackassetnum, asset1.bay, asset1.tile, longdescription.ldtext
> > > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > > asset2.assetnum LEFT OUTER JOIN longdescription ON asset1.assetid =
> > > > > longdescription.ldkey and longdescription.ldownertable = 'ASSET' and
> > > > > longdescription.ldownercol = 'DESCRIPTION'
> > > > > WHERE
> > > > > ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit1 Is Not Null) AND
> > > > > (1=1))
> > > > > OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit2 Is Not
> > > > > Null) AND (1=1)) OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit3
> > > > > Is
> > > > > Not Null) AND (1=1)) ORDER BY asset1.cb_circuit1
> > > > >
> > > > > --- In MAXIMO@yahoogroups.com, siva ravuri <srpravuri@> wrote:
> > > > > >
> > > > > > change your SQL. change asset1 as asset.
> > > > > >
> > > > > >
> > > > > >
> > > > > > ________________________________
> > > > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > > > To: MAXIMO@yahoogroups.com
> > > > > > Sent: Wednesday, January 4, 2012 5:26 PM
> > > > > > Subject: [MAXIMO List] Re: SQL Assistance Requested w/Actuate
> > > > > >
> > > > > >
> > > > > > Â
> > > > > > So I modified the SQL... and it works in Actuate... however when I load to Maximo, I get this error: Thoughts?
> > > > > >
> > > > > > Status No1: Basic error: 1011 Module:afc\db.bas Line: 193 Database Error 2: Error generated by the connected data source ... 4104: (SQL State) 37000: [Microsoft][ODBC SQL Server Driver][SQL Server] The multi-part identifier "asset.assetuid" could not be bound. [SQL State] 37000: [Microsoft][ODBC SQL Server Driver][SQL Server][Statement(s) could not be prepared.
> > > > > >
> > > > > > Here is the SQL that is working in Actuate itself... just not in Maximo...
> > > > > >
> > > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
> > > > > > asset1.cb_secondary, asset2.manufacturer, asset2.description,
> > > > > > asset1.cb_rackassetnum, asset1.bay, asset1.tile, longdescription.ldtext
> > > > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > > > asset2.assetnum LEFT OUTER JOIN longdescription ON asset1.assetid =
> > > > > > longdescription.ldkey and longdescription.ldownertable = 'ASSET' and
> > > > > > longdescription.ldownercol = 'DESCRIPTION'
> > > > > > WHERE
> > > > > > ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit1 Is Not Null) AND (1=1))
> > > > > > OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit2 Is Not
> > > > > > Null) AND (1=1)) OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit3 Is
> > > > > > Not Null) AND (1=1)) ORDER BY asset1.cb_circuit1
> > > > > >
> > > > > > --- In MAXIMO@yahoogroups.com, siva ravuri <srpravuri@> wrote:
> > > > > > >
> > > > > > > include 1=1 in your SQL. Then only it can be replaced with where caluse.
> > > > > > > example: WHERE 1=1 and
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > ________________________________
> > > > > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > > > > To: MAXIMO@yahoogroups.com
> > > > > > > Sent: Wednesday, January 4, 2012 12:50 PM
> > > > > > > Subject: [MAXIMO List] Re: SQL Assistance Requested w/Actuate
> > > > > > >
> > > > > > >
> > > > > > > ÂÂ
> > > > > > > Wes/Victor -
> > > > > > >
> > > > > > > Thanks for the ideas... still having problems... So the SQL Victor provided (below) works... however only in Access... when I load it to the Encyclopedia and to Maximo, the report says 'There are no pages to display'...
> > > > > > >
> > > > > > > Here is the working SQL
> > > > > > >
> > > > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
> > > > > > > asset1.cb_secondary, asset2.manufacturer, asset2.description,
> > > > > > > asset1.cb_rackassetnum, asset1.bay, asset1.tile, longdescription.ldtext
> > > > > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > > > > asset2.assetnum LEFT OUTER JOIN longdescription ON asset1.assetid =
> > > > > > > longdescription.ldkey and longdescription.ldownertable = 'ASSET' and
> > > > > > > longdescription.ldownercol = 'DESCRIPTION' WHERE
> > > > > > > ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit1 Is Not Null))
> > > > > > > OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit2 Is Not
> > > > > > > Null)) OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit3 Is
> > > > > > > Not Null)) ORDER BY asset1.cb_circuit1
> > > > > > >
> > > > > > > So then I tried Wes suggestion and added the following to my Method in Actuate...
> > > > > > >
> > > > > > > SelectStatement = StrSubst(SelectStatement, "1=1', where)
> > > > > > >
> > > > > > > but when I do this, the report won't even compile in Actuate...
> > > > > > >
> > > > > > > I'm at a loss... I'm sure this is a basic Actuate new user issue but I really don't know how to solve... Wes, based on the SQL I'm using, Actuate prompts me for the assetnum referenced in the WHERE section of my SQL... I supply it and the report runs perfectly... I suspect the problem is a disconnect between my WHERE statement the the "1=1" format you are suggesting... Can either of you help me resolve this disconnect...
> > > > > > >
> > > > > > > Your help is SO greatly appreciated... Keith
> > > > > > >
> > > > > > > --- In MAXIMO@yahoogroups.com, wwilliams@ wrote:
> > > > > > > >
> > > > > > > > This is a method under your datastream (where you placed your sql) there are four tabs one being Methods.
> > > > > > > >
> > > > > > > > Depending on how you created the report if you used the Maximo supplied one the followingÃÆ'‚ÂÂ should be there.
> > > > > > > >
> > > > > > > > SelectStatement = StrSubst(SelectStatement, "1=1', where)
> > > > > > > >
> > > > > > > > Look at one of the out of the box reports
> > > > > > > >
> > > > > > > > ÃÆ'‚ÂÂ
> > > > > > > > Wes Williams
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > http://www.weswilliams.net
> > > > > > > > http://www.williamsconnell.com
> > > > > > > >
> > > > > > > >
> > > > > > > > ________________________________
> > > > > > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > > > > > To: MAXIMO@yahoogroups.com
> > > > > > > > Sent: Tuesday, January 3, 2012 3:35 PM
> > > > > > > > Subject: Re: [MAXIMO List] SQL Assistance Requested w/Actuate
> > > > > > > >
> > > > > > > >
> > > > > > > > ÃÆ'‚ÂÂ
> > > > > > > > Hi Wes - Perhaps this is my issue since I don't know where to check this... Can you direct me... where would I find the function obtainselectstatement? Thanks!
> > > > > > > >
> > > > > > > > --- In MAXIMO@yahoogroups.com, wwilliams@ wrote:
> > > > > > > > >
> > > > > > > > > What does your
> > > > > > > > > Function obtainselectstatement look like?
> > > > > > > > > ÃÆ'Æ'‚ÃÆ'‚ÂÂ
> > > > > > > > > Do you have a parameter where?
> > > > > > > > >
> > > > > > > > > Wes Williams
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > http://www.weswilliams.net
> > > > > > > > > http://www.williamsconnell.com
> > > > > > > > >
> > > > > > > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > > > > > > To: MAXIMO@yahoogroups.com
> > > > > > > > > Sent: Tuesday, January 3, 2012 12:38 PM
> > > > > > > > > Subject: Re: [MAXIMO List] SQL Assistance Requested w/Actuate
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > ÃÆ'Æ'‚ÃÆ'‚ÂÂ
> > > > > > > > > Victor/Wes... Thanks for your ideas but still no go...
> > > > > > > > >
> > > > > > > > > Per Victor's suggestion, I tried the following and the report failed to compile...
> > > > > > > > >
> > > > > > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > > > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> > > > > > > > > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> > > > > > > > > asset1.tile, longdescription.ldtext
> > > > > > > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > > > > > > asset2.assetnum
> > > > > > > > > LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
> > > > > > > > > longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> > > > > > > > > 'DESCRIPTION'
> > > > > > > > > WHERE ((asset1.cb_rppassetnum=:asset2.assetnum) AND (asset1.cb_circuit1 Is Not Null))
> > > > > > > > > OR ((asset1.cb_rppassetnum=:asset2.assetnum) AND (asset1.cb_circuit2 Is Not Null))
> > > > > > > > > OR ((asset1.cb_rppassetnum=:asset2.assetnum) AND (asset1.cb_circuit3 Is Not Null))
> > > > > > > > > ORDER BY asset1.cb_circuit1
> > > > > > > > >
> > > > > > > > > HOWEVER I know my SQL is good because if I put this in SQL server for a specific record I get my required data:
> > > > > > > > >
> > > > > > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > > > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> > > > > > > > > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> > > > > > > > > asset1.tile, longdescription.ldtext
> > > > > > > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > > > > > > asset2.assetnum
> > > > > > > > > LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
> > > > > > > > > longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> > > > > > > > > 'DESCRIPTION'
> > > > > > > > > WHERE ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit1 Is Not Null))
> > > > > > > > > OR ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit2 Is Not Null))
> > > > > > > > > OR ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit3 Is Not Null))
> > > > > > > > > ORDER BY asset1.cb_circuit1
> > > > > > > > >
> > > > > > > > > I also tried Wes's suggestion (below) but still no go... Here's what I tried:
> > > > > > > > >
> > > > > > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > > > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> > > > > > > > > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> > > > > > > > > asset1.tile, longdescription.ldtext
> > > > > > > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > > > > > > asset2.assetnum
> > > > > > > > > LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
> > > > > > > > > longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> > > > > > > > > 'DESCRIPTION'
> > > > > > > > > WHERE ((1 = 1) AND (asset1.cb_circuit1 Is Not Null))
> > > > > > > > > OR ((1 = 1) AND (asset1.cb_circuit2 Is Not Null))
> > > > > > > > > OR ((1 = 1) AND (asset1.cb_circuit3 Is Not Null))
> > > > > > > > > ORDER BY asset1.cb_circuit1
> > > > > > > > >
> > > > > > > > > Any other thoughts? Thanks in advance! Keith
> > > > > > > > >
> > > > > > > > > --- In MAXIMO@yahoogroups.com, wwilliams@ wrote:
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > Wes Williams
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > http://www.weswilliams.net
> > > > > > > > > > http://www.williamsconnell.com
> > > > > > > > > >
> > > > > > > > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > > > > > > > To: MAXIMO@yahoogroups.com
> > > > > > > > > > Sent: Monday, January 2, 2012 10:40 AM
> > > > > > > > > > Subject: [MAXIMO List] SQL Assistance Requested w/Actuate
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > ÃÆ'Æ'Æ'ÃÆ'¢â‚¬Å¡ÃÆ'Æ'‚ÃÆ'‚ Try adding and 1 = 1
> > > > > > > > > > Hello -
> > > > > > > > > > Can anyone help me with this SQL statement... It is working except that I need it to pull the data based on the record I have open in Maximo through Actuate... i.e. the WHERE statement needs to indicate using the current record in Maximo... but I know I can't say this... for example: WHERE ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit1 Is Not Null))
> > > > > > > > > >
> > > > > > > > > > Here is the SQL.... the only part that is not correct is the WHERE statement... any help is GREATLY appreciated!
> > > > > > > > > >
> > > > > > > > > > Keith
> > > > > > > > > >
> > > > > > > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > > > > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> > > > > > > > > > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> > > > > > > > > > asset1.tile, longdescription.ldtext
> > > > > > > > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > > > > > > > a
> > > >
> > > >
> > > >
> > > >
> > >
> >
>


From: cambrown28 (2012-02-23 01:06)

Hi Keith
Did you ever get this to work? I am having a similar issue.
Cam
--- In MAXIMO@yahoogroups.com, "hankinskeith@..." <keith.d.hankins@...> wrote:
>
> All -
>
> For anyone watching this thread I feel like I am so close and that there is just a disconnect between my data stream query and my FunctionObtainSelect Statement... but I can't figure it out... So the report runs great in Actuate... perfect... but when loaded to Maximo it pulls information up for every record in the ASSET table that meets the criteria in the WHERE clause of the data query instead of just the record selected on the screen in Maxmio...
>
> Here is my Query from the Data: Texitual Query Editor...
> SELECT asset.cb_rppassetdesc, asset.cb_circuit1, asset.cb_amps,
> asset.cb_poles, asset.cb_cabletype, asset.cb_cbllngth, asset.cb_secondary,
> asset2.manufacturer, asset2.description, asset.cb_rackassetnum, asset.bay,
> asset.tile, longdescription.ldtext
> FROM asset asset left outer join asset asset2 on asset.cb_loaddesc =
> asset2.assetnum
> LEFT OUTER JOIN longdescription ON asset.assetid = longdescription.ldkey and
> longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> 'DESCRIPTION'
> WHERE 1=1 AND
> ((asset.cb_rppassetnum=:assetnum) AND asset.cb_circuit1 Is Not Null) OR
> ((asset.cb_rppassetnum=:assetnum) AND asset.cb_circuit2 Is Not Null) OR
> ((asset.cb_rppassetnum=:assetnum) AND asset.cb_circuit3 Is Not Null) ORDER
> BY asset.cb_circuit1
>
> and here is my Textual Query Source Function ObtainSelectStatement
> Function ObtainSelectStatement( ) As String
>
> If MROIncludeWhere Then
> If Not (assetnum = "") and Not (IsNull(assetnum)) Then
> where = where & " and asset.siteid = '" & mroSite & "' "
> where = where & " and asset.assetnum = '" & assetnum & "' "
> End If
> SelectStatement = StrSubst(SelectStatement, "1=1", where)
> End If
> If MROParseSchema Then
> If UCase(schema) <> "MAXIMO" then
> Do While InStr(SelectStatement, "MAXIMO.")
> SelectStatement = StrSubst(SelectStatement, "MAXIMO.", schema & ".")
> Loop
> End If
> End If
> ObtainSelectStatement = Super::ObtainSelectStatement( )
> End Function
>
> Any other ideas?
> Keith
>
> --- In MAXIMO@yahoogroups.com, "hankinskeith@" <keith.d.hankins@> wrote:
> >
> > Have tried... no go... but thanks for the idea. Keith
> >
> > --- In MAXIMO@yahoogroups.com, "cy_babe" <gjohnson@> wrote:
> > >
> > > Not sure if you have this solved, if not, try removing the alias (asset1) from your main asset reference ---just use asset. I know Maximo's default where clause fully qualifies the main object.
> > >
> > > --- In MAXIMO@yahoogroups.com, "hankinskeith@" <keith.d.hankins@> wrote:
> > > >
> > > > Still not working... I made the change. The report builds nicely in Actuate but when I run it in Maximo it says there are no pages to display... Do you have any other ideas? Thanks! Keith
> > > >
> > > > --- In MAXIMO@yahoogroups.com, Siva <srpravuri@> wrote:
> > > > >
> > > > > Whereevrer asset1 is there. That means all places
> > > > >
> > > > > Sent from my iPhone
> > > > >
> > > > > On Jan 5, 2012, at 8:29 AM, "hankinskeith@" <keith.d.hankins@> wrote:
> > > > >
> > > > > > Hi Siva -
> > > > > >
> > > > > > Can you clarify... change asset1 as asset in what section of the SQL... As you can see it is referencing two instances of the ASSET table... Where are you recommending the change?
> > > > > >
> > > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
> > > > > > asset1.cb_secondary, asset2.manufacturer, asset2.description,
> > > > > > asset1.cb_rackassetnum, asset1.bay, asset1.tile, longdescription.ldtext
> > > > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > > > asset2.assetnum LEFT OUTER JOIN longdescription ON asset1.assetid =
> > > > > > longdescription.ldkey and longdescription.ldownertable = 'ASSET' and
> > > > > > longdescription.ldownercol = 'DESCRIPTION'
> > > > > > WHERE
> > > > > > ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit1 Is Not Null) AND
> > > > > > (1=1))
> > > > > > OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit2 Is Not
> > > > > > Null) AND (1=1)) OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit3
> > > > > > Is
> > > > > > Not Null) AND (1=1)) ORDER BY asset1.cb_circuit1
> > > > > >
> > > > > > --- In MAXIMO@yahoogroups.com, siva ravuri <srpravuri@> wrote:
> > > > > > >
> > > > > > > change your SQL. change asset1 as asset.
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > ________________________________
> > > > > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > > > > To: MAXIMO@yahoogroups.com
> > > > > > > Sent: Wednesday, January 4, 2012 5:26 PM
> > > > > > > Subject: [MAXIMO List] Re: SQL Assistance Requested w/Actuate
> > > > > > >
> > > > > > >
> > > > > > > Â
> > > > > > > So I modified the SQL... and it works in Actuate... however when I load to Maximo, I get this error: Thoughts?
> > > > > > >
> > > > > > > Status No1: Basic error: 1011 Module:afc\db.bas Line: 193 Database Error 2: Error generated by the connected data source ... 4104: (SQL State) 37000: [Microsoft][ODBC SQL Server Driver][SQL Server] The multi-part identifier "asset.assetuid" could not be bound. [SQL State] 37000: [Microsoft][ODBC SQL Server Driver][SQL Server][Statement(s) could not be prepared.
> > > > > > >
> > > > > > > Here is the SQL that is working in Actuate itself... just not in Maximo...
> > > > > > >
> > > > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
> > > > > > > asset1.cb_secondary, asset2.manufacturer, asset2.description,
> > > > > > > asset1.cb_rackassetnum, asset1.bay, asset1.tile, longdescription.ldtext
> > > > > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > > > > asset2.assetnum LEFT OUTER JOIN longdescription ON asset1.assetid =
> > > > > > > longdescription.ldkey and longdescription.ldownertable = 'ASSET' and
> > > > > > > longdescription.ldownercol = 'DESCRIPTION'
> > > > > > > WHERE
> > > > > > > ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit1 Is Not Null) AND (1=1))
> > > > > > > OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit2 Is Not
> > > > > > > Null) AND (1=1)) OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit3 Is
> > > > > > > Not Null) AND (1=1)) ORDER BY asset1.cb_circuit1
> > > > > > >
> > > > > > > --- In MAXIMO@yahoogroups.com, siva ravuri <srpravuri@> wrote:
> > > > > > > >
> > > > > > > > include 1=1 in your SQL. Then only it can be replaced with where caluse.
> > > > > > > > example: WHERE 1=1 and
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > ________________________________
> > > > > > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > > > > > To: MAXIMO@yahoogroups.com
> > > > > > > > Sent: Wednesday, January 4, 2012 12:50 PM
> > > > > > > > Subject: [MAXIMO List] Re: SQL Assistance Requested w/Actuate
> > > > > > > >
> > > > > > > >
> > > > > > > > ÂÂ
> > > > > > > > Wes/Victor -
> > > > > > > >
> > > > > > > > Thanks for the ideas... still having problems... So the SQL Victor provided (below) works... however only in Access... when I load it to the Encyclopedia and to Maximo, the report says 'There are no pages to display'...
> > > > > > > >
> > > > > > > > Here is the working SQL
> > > > > > > >
> > > > > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth,
> > > > > > > > asset1.cb_secondary, asset2.manufacturer, asset2.description,
> > > > > > > > asset1.cb_rackassetnum, asset1.bay, asset1.tile, longdescription.ldtext
> > > > > > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > > > > > asset2.assetnum LEFT OUTER JOIN longdescription ON asset1.assetid =
> > > > > > > > longdescription.ldkey and longdescription.ldownertable = 'ASSET' and
> > > > > > > > longdescription.ldownercol = 'DESCRIPTION' WHERE
> > > > > > > > ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit1 Is Not Null))
> > > > > > > > OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit2 Is Not
> > > > > > > > Null)) OR ((asset1.cb_rppassetnum=:assetnum) AND (asset1.cb_circuit3 Is
> > > > > > > > Not Null)) ORDER BY asset1.cb_circuit1
> > > > > > > >
> > > > > > > > So then I tried Wes suggestion and added the following to my Method in Actuate...
> > > > > > > >
> > > > > > > > SelectStatement = StrSubst(SelectStatement, "1=1', where)
> > > > > > > >
> > > > > > > > but when I do this, the report won't even compile in Actuate...
> > > > > > > >
> > > > > > > > I'm at a loss... I'm sure this is a basic Actuate new user issue but I really don't know how to solve... Wes, based on the SQL I'm using, Actuate prompts me for the assetnum referenced in the WHERE section of my SQL... I supply it and the report runs perfectly... I suspect the problem is a disconnect between my WHERE statement the the "1=1" format you are suggesting... Can either of you help me resolve this disconnect...
> > > > > > > >
> > > > > > > > Your help is SO greatly appreciated... Keith
> > > > > > > >
> > > > > > > > --- In MAXIMO@yahoogroups.com, wwilliams@ wrote:
> > > > > > > > >
> > > > > > > > > This is a method under your datastream (where you placed your sql) there are four tabs one being Methods.
> > > > > > > > >
> > > > > > > > > Depending on how you created the report if you used the Maximo supplied one the followingÃÆ'‚ÂÂ should be there.
> > > > > > > > >
> > > > > > > > > SelectStatement = StrSubst(SelectStatement, "1=1', where)
> > > > > > > > >
> > > > > > > > > Look at one of the out of the box reports
> > > > > > > > >
> > > > > > > > > ÃÆ'‚ÂÂ
> > > > > > > > > Wes Williams
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > http://www.weswilliams.net
> > > > > > > > > http://www.williamsconnell.com
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > ________________________________
> > > > > > > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > > > > > > To: MAXIMO@yahoogroups.com
> > > > > > > > > Sent: Tuesday, January 3, 2012 3:35 PM
> > > > > > > > > Subject: Re: [MAXIMO List] SQL Assistance Requested w/Actuate
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > ÃÆ'‚ÂÂ
> > > > > > > > > Hi Wes - Perhaps this is my issue since I don't know where to check this... Can you direct me... where would I find the function obtainselectstatement? Thanks!
> > > > > > > > >
> > > > > > > > > --- In MAXIMO@yahoogroups.com, wwilliams@ wrote:
> > > > > > > > > >
> > > > > > > > > > What does your
> > > > > > > > > > Function obtainselectstatement look like?
> > > > > > > > > > ÃÆ'Æ'‚ÃÆ'‚ÂÂ
> > > > > > > > > > Do you have a parameter where?
> > > > > > > > > >
> > > > > > > > > > Wes Williams
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > http://www.weswilliams.net
> > > > > > > > > > http://www.williamsconnell.com
> > > > > > > > > >
> > > > > > > > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > > > > > > > To: MAXIMO@yahoogroups.com
> > > > > > > > > > Sent: Tuesday, January 3, 2012 12:38 PM
> > > > > > > > > > Subject: Re: [MAXIMO List] SQL Assistance Requested w/Actuate
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > ÃÆ'Æ'‚ÃÆ'‚ÂÂ
> > > > > > > > > > Victor/Wes... Thanks for your ideas but still no go...
> > > > > > > > > >
> > > > > > > > > > Per Victor's suggestion, I tried the following and the report failed to compile...
> > > > > > > > > >
> > > > > > > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > > > > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> > > > > > > > > > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> > > > > > > > > > asset1.tile, longdescription.ldtext
> > > > > > > > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > > > > > > > asset2.assetnum
> > > > > > > > > > LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
> > > > > > > > > > longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> > > > > > > > > > 'DESCRIPTION'
> > > > > > > > > > WHERE ((asset1.cb_rppassetnum=:asset2.assetnum) AND (asset1.cb_circuit1 Is Not Null))
> > > > > > > > > > OR ((asset1.cb_rppassetnum=:asset2.assetnum) AND (asset1.cb_circuit2 Is Not Null))
> > > > > > > > > > OR ((asset1.cb_rppassetnum=:asset2.assetnum) AND (asset1.cb_circuit3 Is Not Null))
> > > > > > > > > > ORDER BY asset1.cb_circuit1
> > > > > > > > > >
> > > > > > > > > > HOWEVER I know my SQL is good because if I put this in SQL server for a specific record I get my required data:
> > > > > > > > > >
> > > > > > > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > > > > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> > > > > > > > > > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> > > > > > > > > > asset1.tile, longdescription.ldtext
> > > > > > > > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > > > > > > > asset2.assetnum
> > > > > > > > > > LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
> > > > > > > > > > longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> > > > > > > > > > 'DESCRIPTION'
> > > > > > > > > > WHERE ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit1 Is Not Null))
> > > > > > > > > > OR ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit2 Is Not Null))
> > > > > > > > > > OR ((asset1.cb_rppassetnum='2089') AND (asset1.cb_circuit3 Is Not Null))
> > > > > > > > > > ORDER BY asset1.cb_circuit1
> > > > > > > > > >
> > > > > > > > > > I also tried Wes's suggestion (below) but still no go... Here's what I tried:
> > > > > > > > > >
> > > > > > > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > > > > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> > > > > > > > > > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> > > > > > > > > > asset1.tile, longdescription.ldtext
> > > > > > > > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > > > > > > > asset2.assetnum
> > > > > > > > > > LEFT OUTER JOIN longdescription ON asset1.assetid = longdescription.ldkey and
> > > > > > > > > > longdescription.ldownertable = 'ASSET' and longdescription.ldownercol =
> > > > > > > > > > 'DESCRIPTION'
> > > > > > > > > > WHERE ((1 = 1) AND (asset1.cb_circuit1 Is Not Null))
> > > > > > > > > > OR ((1 = 1) AND (asset1.cb_circuit2 Is Not Null))
> > > > > > > > > > OR ((1 = 1) AND (asset1.cb_circuit3 Is Not Null))
> > > > > > > > > > ORDER BY asset1.cb_circuit1
> > > > > > > > > >
> > > > > > > > > > Any other thoughts? Thanks in advance! Keith
> > > > > > > > > >
> > > > > > > > > > --- In MAXIMO@yahoogroups.com, wwilliams@ wrote:
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > Wes Williams
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > http://www.weswilliams.net
> > > > > > > > > > > http://www.williamsconnell.com
> > > > > > > > > > >
> > > > > > > > > > > From: "hankinskeith@" <keith.d.hankins@>
> > > > > > > > > > > To: MAXIMO@yahoogroups.com
> > > > > > > > > > > Sent: Monday, January 2, 2012 10:40 AM
> > > > > > > > > > > Subject: [MAXIMO List] SQL Assistance Requested w/Actuate
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > ÃÆ'Æ'Æ'ÃÆ'¢â‚¬Å¡ÃÆ'Æ'‚ÃÆ'‚ Try adding and 1 = 1
> > > > > > > > > > > Hello -
> > > > > > > > > > > Can anyone help me with this SQL statement... It is working except that I need it to pull the data based on the record I have open in Maximo through Actuate... i.e. the WHERE statement needs to indicate using the current record in Maximo... but I know I can't say this... for example: WHERE ((asset1.cb_rppassetnum = current record) AND (asset1.cb_circuit1 Is Not Null))
> > > > > > > > > > >
> > > > > > > > > > > Here is the SQL.... the only part that is not correct is the WHERE statement... any help is GREATLY appreciated!
> > > > > > > > > > >
> > > > > > > > > > > Keith
> > > > > > > > > > >
> > > > > > > > > > > SELECT asset1.cb_rppassetdesc, asset1.cb_circuit1, asset1.cb_amps,
> > > > > > > > > > > asset1.cb_poles, asset1.cb_cabletype, asset1.cb_cbllngth, asset1.cb_secondary,
> > > > > > > > > > > asset2.manufacturer, asset2.description, asset1.cb_rackassetnum, asset1.bay,
> > > > > > > > > > > asset1.tile, longdescription.ldtext
> > > > > > > > > > > FROM asset asset1 left outer join asset asset2 on asset1.cb_loaddesc =
> > > > > > > > > > > a
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > >
> >
>