Re: query help

2012-03-02 Thread Jim Fox
Here is a way I have seen it done by some SQL generators:

 

('field1' like "%/%") = FALSE

 

Fluxman

 

From: Action Request System discussion list(ARSList)
[mailto:arslist@ARSLIST.ORG] On Behalf Of Martinez, Marcelo A
Sent: 03/01/2012 4:21 PM
To: arslist@ARSLIST.ORG
Subject: query help

 

** 

I've drawn a blank.. need help creating a query.

 

I have a field (field1) on a view form that I want to search for all records
that do not contain symbol "/" (forward slash). 

Example of data in field:

ABC/123

ABB

ABC/345

DEF/555

DEF

XY

 

I only need the query to return ABB, DEF, XY.

 

I can do 'field1' LIKE "%/%"---but how do I do the opposite?

 

I've tried: 'field1' != "%/%" ---this does not work.

 

 

Thanks for the help,
Marcelo

 

 

_attend WWRUG12 www.wwrug.com ARSlist: "Where the Answers Are"_ 


___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
attend wwrug12 www.wwrug12.com ARSList: "Where the Answers Are"


Re: query help

2012-03-02 Thread Martinez, Marcelo A
Thank you Doug. The Vendor form is using ARSYS.ARDBC.LDAP plugin; and it was 
created by a partner. 

Thank you for pointing me in the right direction.

Marcelo



-Original Message-
From: Action Request System discussion list(ARSList) 
[mailto:arslist@ARSLIST.ORG] On Behalf Of Mueller, Doug
Sent: Thursday, March 01, 2012 6:07 PM
To: arslist@ARSLIST.ORG
Subject: Re: query help

Marcelo,

The key topic here is that you are saying the form is a VENDOR FORM.

Being a vendor form, the AR System passes the qualification criteria on to the
plugin code that was written.  That code is responsible for performing the
query and doing the processing.

So, the question is  Does that code have logic that supports the NOT
operation?

Is this a vendor form supplied by BMC or one that a partner has written, or one
that your company has written?

Once you determine that, then you know where to go to get the answer about
whether the code supports the NOT operation.

As you can see, the operation and the syntax does indeed work (all permutations
of the syntax as any parenthesis are extra in this simple query) when you are
going to a regular form.  That is because the NOT operation is fully supported
for regular and view forms by the AR System server.


What you will find in this situation (OK, I am only 99.9548694% sure that this
is what you will find) is that the code of the vendor form does not support
the NOT operation at all or is not doing something correctly for it in the
case of this query.

I hope this helps point things in the right direction,

Doug Mueller

-Original Message-
From: Action Request System discussion list(ARSList) 
[mailto:arslist@ARSLIST.ORG] On Behalf Of Martinez, Marcelo A
Sent: Thursday, March 01, 2012 3:13 PM
To: arslist@ARSLIST.ORG
Subject: Re: query help

Tried NOT ('field1' LIKE "%/%")   --no go
Tried (NOT ('field1' LIKE "%/%")) -- no go

I'll expand on my request a little.

I have a vendor form reading active directory thru LDAP. One of the user's 
attributes is 'physicalDeliveryOfficeName' , some users have the value in this 
field as ABC/123 or ABC or AAA-123\123.  On this field, I only want to extract 
what is to the left of the "/". 
Therefore, I used the string:
SUBSTR($physicalDeliveryOfficeName$, 0, STRSTR($physicalDeliveryOfficeName$,  
"/") - 1)

This query works fine, except when there is no "/" , then I don't get that 
record.

Thanks everyone.

-Original Message-
From: Action Request System discussion list(ARSList) 
[mailto:arslist@ARSLIST.ORG] On Behalf Of Tommy Morris
Sent: Thursday, March 01, 2012 4:20 PM
To: arslist@ARSLIST.ORG
Subject: Re: query help

Try it like this NOT ('field1' LIKE "%/%")

-Original Message-
From: Action Request System discussion list(ARSList) 
[mailto:arslist@ARSLIST.ORG] On Behalf Of Martinez, Marcelo A
Sent: Thursday, March 01, 2012 4:15 PM
To: arslist@ARSLIST.ORG
Subject: Re: query help

Thanks Axton. I've not used NOT before.
Your example does work querying the incident form, etc. But does not work on my 
vendor form (I said view form before, that's incorrect, my fault). Also 
'field1' is a character field... 

'field1' LIKE "%/%"   -- works and returns the expected results. But I want the 
opposite.

NOT 'field1' LIKE "%/%" -- no entries are returned.

Anything else I could try?

Thanks - Marcelo

-Original Message-
From: Action Request System discussion list(ARSList) 
[mailto:arslist@ARSLIST.ORG] On Behalf Of Axton
Sent: Thursday, March 01, 2012 3:24 PM
To: arslist@ARSLIST.ORG
Subject: Re: query help

NOT 'field1' LIKE "%/%"

On Thu, Mar 1, 2012 at 3:21 PM, Martinez, Marcelo A  wrote:
> **
> I've drawn a blank.. need help creating a query.
>
> I have a field (field1) on a view form that I want to search for all 
> records that do not contain symbol "/" (forward slash).
> Example of data in field:
> ABC/123
> ABB
> ABC/345
> DEF/555
> DEF
> XY
>
> I only need the query to return ABB, DEF, XY.
>
> I can do 'field1' LIKE "%/%"    ---but how do I do the opposite?
>
> I've tried: 'field1' != "%/%" ---this does not work.
>
>
> Thanks for the help,
> Marcelo
>
>
> _attend WWRUG12 www.wwrug.com ARSlist: "Where the Answers Are"_

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org attend wwrug12 
www.wwrug12.com ARSList: "Where the Answers Are"

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org attend wwrug12 
www.wwrug12.com ARSList: "Where the Answers Are"

___

Re: query help

2012-03-01 Thread Mueller, Doug
Marcelo,

The key topic here is that you are saying the form is a VENDOR FORM.

Being a vendor form, the AR System passes the qualification criteria on to the
plugin code that was written.  That code is responsible for performing the
query and doing the processing.

So, the question is  Does that code have logic that supports the NOT
operation?

Is this a vendor form supplied by BMC or one that a partner has written, or one
that your company has written?

Once you determine that, then you know where to go to get the answer about
whether the code supports the NOT operation.

As you can see, the operation and the syntax does indeed work (all permutations
of the syntax as any parenthesis are extra in this simple query) when you are
going to a regular form.  That is because the NOT operation is fully supported
for regular and view forms by the AR System server.


What you will find in this situation (OK, I am only 99.9548694% sure that this
is what you will find) is that the code of the vendor form does not support
the NOT operation at all or is not doing something correctly for it in the
case of this query.

I hope this helps point things in the right direction,

Doug Mueller

-Original Message-
From: Action Request System discussion list(ARSList) 
[mailto:arslist@ARSLIST.ORG] On Behalf Of Martinez, Marcelo A
Sent: Thursday, March 01, 2012 3:13 PM
To: arslist@ARSLIST.ORG
Subject: Re: query help

Tried NOT ('field1' LIKE "%/%")   --no go
Tried (NOT ('field1' LIKE "%/%")) -- no go

I'll expand on my request a little.

I have a vendor form reading active directory thru LDAP. One of the user's 
attributes is 'physicalDeliveryOfficeName' , some users have the value in this 
field as ABC/123 or ABC or AAA-123\123.  On this field, I only want to extract 
what is to the left of the "/". 
Therefore, I used the string:
SUBSTR($physicalDeliveryOfficeName$, 0, STRSTR($physicalDeliveryOfficeName$,  
"/") - 1)

This query works fine, except when there is no "/" , then I don't get that 
record.

Thanks everyone.

-Original Message-
From: Action Request System discussion list(ARSList) 
[mailto:arslist@ARSLIST.ORG] On Behalf Of Tommy Morris
Sent: Thursday, March 01, 2012 4:20 PM
To: arslist@ARSLIST.ORG
Subject: Re: query help

Try it like this NOT ('field1' LIKE "%/%")

-Original Message-
From: Action Request System discussion list(ARSList) 
[mailto:arslist@ARSLIST.ORG] On Behalf Of Martinez, Marcelo A
Sent: Thursday, March 01, 2012 4:15 PM
To: arslist@ARSLIST.ORG
Subject: Re: query help

Thanks Axton. I've not used NOT before.
Your example does work querying the incident form, etc. But does not work on my 
vendor form (I said view form before, that's incorrect, my fault). Also 
'field1' is a character field... 

'field1' LIKE "%/%"   -- works and returns the expected results. But I want the 
opposite.

NOT 'field1' LIKE "%/%" -- no entries are returned.

Anything else I could try?

Thanks - Marcelo

-Original Message-
From: Action Request System discussion list(ARSList) 
[mailto:arslist@ARSLIST.ORG] On Behalf Of Axton
Sent: Thursday, March 01, 2012 3:24 PM
To: arslist@ARSLIST.ORG
Subject: Re: query help

NOT 'field1' LIKE "%/%"

On Thu, Mar 1, 2012 at 3:21 PM, Martinez, Marcelo A  wrote:
> **
> I've drawn a blank.. need help creating a query.
>
> I have a field (field1) on a view form that I want to search for all 
> records that do not contain symbol "/" (forward slash).
> Example of data in field:
> ABC/123
> ABB
> ABC/345
> DEF/555
> DEF
> XY
>
> I only need the query to return ABB, DEF, XY.
>
> I can do 'field1' LIKE "%/%"    ---but how do I do the opposite?
>
> I've tried: 'field1' != "%/%" ---this does not work.
>
>
> Thanks for the help,
> Marcelo
>
>
> _attend WWRUG12 www.wwrug.com ARSlist: "Where the Answers Are"_

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org attend wwrug12 
www.wwrug12.com ARSList: "Where the Answers Are"

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org attend wwrug12 
www.wwrug12.com ARSList: "Where the Answers Are"

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
attend wwrug12 www.wwrug12.com ARSList: "Where the Answers Are"

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
attend wwrug12 www.wwrug12.com ARSList: "Where the Answers Are"

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
attend wwrug12 www.wwrug12.com ARSList: "Where the Answers Are"


Re: query help

2012-03-01 Thread Martinez, Marcelo A
Tried NOT ('field1' LIKE "%/%")   --no go
Tried (NOT ('field1' LIKE "%/%")) -- no go

I'll expand on my request a little.

I have a vendor form reading active directory thru LDAP. One of the user's 
attributes is 'physicalDeliveryOfficeName' , some users have the value in this 
field as ABC/123 or ABC or AAA-123\123.  On this field, I only want to extract 
what is to the left of the "/". 
Therefore, I used the string:
SUBSTR($physicalDeliveryOfficeName$, 0, STRSTR($physicalDeliveryOfficeName$,  
"/") - 1)

This query works fine, except when there is no "/" , then I don't get that 
record.

Thanks everyone.

-Original Message-
From: Action Request System discussion list(ARSList) 
[mailto:arslist@ARSLIST.ORG] On Behalf Of Tommy Morris
Sent: Thursday, March 01, 2012 4:20 PM
To: arslist@ARSLIST.ORG
Subject: Re: query help

Try it like this NOT ('field1' LIKE "%/%")

-Original Message-
From: Action Request System discussion list(ARSList) 
[mailto:arslist@ARSLIST.ORG] On Behalf Of Martinez, Marcelo A
Sent: Thursday, March 01, 2012 4:15 PM
To: arslist@ARSLIST.ORG
Subject: Re: query help

Thanks Axton. I've not used NOT before.
Your example does work querying the incident form, etc. But does not work on my 
vendor form (I said view form before, that's incorrect, my fault). Also 
'field1' is a character field... 

'field1' LIKE "%/%"   -- works and returns the expected results. But I want the 
opposite.

NOT 'field1' LIKE "%/%" -- no entries are returned.

Anything else I could try?

Thanks - Marcelo

-Original Message-
From: Action Request System discussion list(ARSList) 
[mailto:arslist@ARSLIST.ORG] On Behalf Of Axton
Sent: Thursday, March 01, 2012 3:24 PM
To: arslist@ARSLIST.ORG
Subject: Re: query help

NOT 'field1' LIKE "%/%"

On Thu, Mar 1, 2012 at 3:21 PM, Martinez, Marcelo A  wrote:
> **
> I've drawn a blank.. need help creating a query.
>
> I have a field (field1) on a view form that I want to search for all 
> records that do not contain symbol "/" (forward slash).
> Example of data in field:
> ABC/123
> ABB
> ABC/345
> DEF/555
> DEF
> XY
>
> I only need the query to return ABB, DEF, XY.
>
> I can do 'field1' LIKE "%/%"    ---but how do I do the opposite?
>
> I've tried: 'field1' != "%/%" ---this does not work.
>
>
> Thanks for the help,
> Marcelo
>
>
> _attend WWRUG12 www.wwrug.com ARSlist: "Where the Answers Are"_

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org attend wwrug12 
www.wwrug12.com ARSList: "Where the Answers Are"

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org attend wwrug12 
www.wwrug12.com ARSList: "Where the Answers Are"

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
attend wwrug12 www.wwrug12.com ARSList: "Where the Answers Are"

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
attend wwrug12 www.wwrug12.com ARSList: "Where the Answers Are"


Re: query help

2012-03-01 Thread Gentry, Elmer
Are your parentheses correct?

(NOT('Field1' LIKE "%/%") 



Thanks,

Elmo Gentry
Remedy Developer
HP Enterprise Services


-Original Message-
From: Action Request System discussion list(ARSList) 
[mailto:arslist@ARSLIST.ORG] On Behalf Of Martinez, Marcelo A
Sent: Thursday, March 01, 2012 5:15 PM
To: arslist@ARSLIST.ORG
Subject: Re: query help

Thanks Axton. I've not used NOT before.
Your example does work querying the incident form, etc. But does not work on my 
vendor form (I said view form before, that's incorrect, my fault). Also 
'field1' is a character field... 

'field1' LIKE "%/%"   -- works and returns the expected results. But I want the 
opposite.

NOT 'field1' LIKE "%/%" -- no entries are returned.

Anything else I could try?

Thanks - Marcelo

-Original Message-
From: Action Request System discussion list(ARSList) 
[mailto:arslist@ARSLIST.ORG] On Behalf Of Axton
Sent: Thursday, March 01, 2012 3:24 PM
To: arslist@ARSLIST.ORG
Subject: Re: query help

NOT 'field1' LIKE "%/%"

On Thu, Mar 1, 2012 at 3:21 PM, Martinez, Marcelo A  wrote:
> **
> I've drawn a blank.. need help creating a query.
>
> I have a field (field1) on a view form that I want to search for all records
> that do not contain symbol "/" (forward slash).
> Example of data in field:
> ABC/123
> ABB
> ABC/345
> DEF/555
> DEF
> XY
>
> I only need the query to return ABB, DEF, XY.
>
> I can do 'field1' LIKE "%/%"    ---but how do I do the opposite?
>
> I've tried: 'field1' != "%/%" ---this does not work.
>
>
> Thanks for the help,
> Marcelo
>
>
> _attend WWRUG12 www.wwrug.com ARSlist: "Where the Answers Are"_

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
attend wwrug12 www.wwrug12.com ARSList: "Where the Answers Are"

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
attend wwrug12 www.wwrug12.com ARSList: "Where the Answers Are"

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
attend wwrug12 www.wwrug12.com ARSList: "Where the Answers Are"


Re: query help

2012-03-01 Thread Tommy Morris
Try it like this NOT ('field1' LIKE "%/%")

-Original Message-
From: Action Request System discussion list(ARSList) 
[mailto:arslist@ARSLIST.ORG] On Behalf Of Martinez, Marcelo A
Sent: Thursday, March 01, 2012 4:15 PM
To: arslist@ARSLIST.ORG
Subject: Re: query help

Thanks Axton. I've not used NOT before.
Your example does work querying the incident form, etc. But does not work on my 
vendor form (I said view form before, that's incorrect, my fault). Also 
'field1' is a character field... 

'field1' LIKE "%/%"   -- works and returns the expected results. But I want the 
opposite.

NOT 'field1' LIKE "%/%" -- no entries are returned.

Anything else I could try?

Thanks - Marcelo

-Original Message-
From: Action Request System discussion list(ARSList) 
[mailto:arslist@ARSLIST.ORG] On Behalf Of Axton
Sent: Thursday, March 01, 2012 3:24 PM
To: arslist@ARSLIST.ORG
Subject: Re: query help

NOT 'field1' LIKE "%/%"

On Thu, Mar 1, 2012 at 3:21 PM, Martinez, Marcelo A  wrote:
> **
> I've drawn a blank.. need help creating a query.
>
> I have a field (field1) on a view form that I want to search for all 
> records that do not contain symbol "/" (forward slash).
> Example of data in field:
> ABC/123
> ABB
> ABC/345
> DEF/555
> DEF
> XY
>
> I only need the query to return ABB, DEF, XY.
>
> I can do 'field1' LIKE "%/%"    ---but how do I do the opposite?
>
> I've tried: 'field1' != "%/%" ---this does not work.
>
>
> Thanks for the help,
> Marcelo
>
>
> _attend WWRUG12 www.wwrug.com ARSlist: "Where the Answers Are"_

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org attend wwrug12 
www.wwrug12.com ARSList: "Where the Answers Are"

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org attend wwrug12 
www.wwrug12.com ARSList: "Where the Answers Are"

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
attend wwrug12 www.wwrug12.com ARSList: "Where the Answers Are"


Re: query help

2012-03-01 Thread Martinez, Marcelo A
Thanks Axton. I've not used NOT before.
Your example does work querying the incident form, etc. But does not work on my 
vendor form (I said view form before, that's incorrect, my fault). Also 
'field1' is a character field... 

'field1' LIKE "%/%"   -- works and returns the expected results. But I want the 
opposite.

NOT 'field1' LIKE "%/%" -- no entries are returned.

Anything else I could try?

Thanks - Marcelo

-Original Message-
From: Action Request System discussion list(ARSList) 
[mailto:arslist@ARSLIST.ORG] On Behalf Of Axton
Sent: Thursday, March 01, 2012 3:24 PM
To: arslist@ARSLIST.ORG
Subject: Re: query help

NOT 'field1' LIKE "%/%"

On Thu, Mar 1, 2012 at 3:21 PM, Martinez, Marcelo A  wrote:
> **
> I've drawn a blank.. need help creating a query.
>
> I have a field (field1) on a view form that I want to search for all records
> that do not contain symbol "/" (forward slash).
> Example of data in field:
> ABC/123
> ABB
> ABC/345
> DEF/555
> DEF
> XY
>
> I only need the query to return ABB, DEF, XY.
>
> I can do 'field1' LIKE "%/%"    ---but how do I do the opposite?
>
> I've tried: 'field1' != "%/%" ---this does not work.
>
>
> Thanks for the help,
> Marcelo
>
>
> _attend WWRUG12 www.wwrug.com ARSlist: "Where the Answers Are"_

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
attend wwrug12 www.wwrug12.com ARSList: "Where the Answers Are"

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
attend wwrug12 www.wwrug12.com ARSList: "Where the Answers Are"


Re: query help

2012-03-01 Thread Axton
NOT ‘field1’ LIKE “%/%”

On Thu, Mar 1, 2012 at 3:21 PM, Martinez, Marcelo A  wrote:
> **
> I’ve drawn a blank.. need help creating a query.
>
> I have a field (field1) on a view form that I want to search for all records
> that do not contain symbol “/” (forward slash).
> Example of data in field:
> ABC/123
> ABB
> ABC/345
> DEF/555
> DEF
> XY
>
> I only need the query to return ABB, DEF, XY.
>
> I can do ‘field1’ LIKE “%/%”    ---but how do I do the opposite?
>
> I’ve tried: 'field1' != "%/%" ---this does not work.
>
>
> Thanks for the help,
> Marcelo
>
>
> _attend WWRUG12 www.wwrug.com ARSlist: "Where the Answers Are"_

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
attend wwrug12 www.wwrug12.com ARSList: "Where the Answers Are"