SELECT PeopleGroup_Form_Entry_ID, count(PeopleGroup_Form_Entry_ID)
FROM VATT_HelpTool___Join___AssetPe
WHERE AssetLifecycleStatus = 3 and Data_Set_Id = 'BMC.ASSET' and
PeopleGroup_Form_Entry_ID like 'SGP%'
GROUP BY PeopleGroup_Form_Entry_ID
On Mon, Mar 9, 2015 at 10:36 AM,
Hi lars,
Use group by clause like as below example:
Select people_group_id,count(*) from vatthelp where (your clause) group by
people_group_id.
Shambo.
On 9 Mar 2015 22:06, lars.j.petters...@vattenfall.com wrote:
**
Hi group, I have this sql, working fine:
SELECT distinct
Hi group, I have this sql, working fine:
SELECT distinct (PeopleGroup_Form_Entry_ID) from VATT_HelpTool___Join___AssetPe
where AssetLifecycleStatus = 3 and Data_Set_Id = 'BMC.ASSET' and
PeopleGroup_Form_Entry_ID like 'SGP%'
Now I would like to include number of entries for each unique match.
hmm let me give it a try -
SELECT PeopleGroup_Form_Entry_ID as SGP_ID, Count(PeopleGroup_Form_Entry_ID)
as SGP_Number from VATT_HelpTool___Join___AssetPe where
AssetLifecycleStatus = 3 and Data_Set_Id = 'BMC.ASSET' and
PeopleGroup_Form_Entry_ID like 'SGP%' group by SGP_ID;
Regards,
Harsh
On
Regards Conny
--
*Von:* Action Request System discussion list(ARSList) [mailto:
arsl...@arslist.org] *Im Auftrag von *Joe D'Souza
*Gesendet:* Dienstag, 16. Februar 2010 23:27
*An:* arslist@ARSLIST.ORG
*Betreff:* Re: SQL help needed
**
The second statement should
Hello All,
Below is the problem and way I was trying to handle it
C_list contains comma separated values of group Id’s. this list contains all
the group id’s associated to a particular login name.
C_list= (1,15005,85,83,84,805)
This variable will be holding up dynamically
Sent: Tuesday, February 16, 2010 3:20 PM
To: arslist@ARSLIST.ORG
Subject: SQL help needed
**
Hello All,
Below is the problem and way I was trying to handle it
C_list contains comma separated values of group Id's. this list contains
all the group id's associated to a particular login
What is the error that you are getting?
Joe
-Original Message-
From: Action Request System discussion list(ARSList)
[mailto:arsl...@arslist.org]on Behalf Of amit dw
Sent: Tuesday, February 16, 2010 4:20 PM
To: arslist@ARSLIST.ORG
Subject: SQL help needed
**
Hello All
-Original Message-
*From:* Action Request System discussion list(ARSList) [mailto:
arsl...@arslist.org]*on Behalf Of *amit dw
*Sent:* Tuesday, February 16, 2010 4:20 PM
*To:* arslist@ARSLIST.ORG
*Subject:* SQL help needed
**
Hello All,
Below is the problem and way I was trying
@ARSLIST.ORG
Subject: Re: SQL help needed
**
the error points to the Fetch statement Fetch C1 into froup_id,group_name
It will be great if somebody has done sql manipulations on the C104 filed of
the t9(User Form)
On Tue, Feb 16, 2010 at 3:37 PM, Joe D'Souza jdso...@shyle.net wrote:
**
What
]on Behalf Of remedy.help
Sent: Tuesday, February 16, 2010 4:42 PM
To: arslist@ARSLIST.ORG
Subject: Re: SQL help needed
**
the error points to the Fetch statement Fetch C1 into froup_id,group_name
It will be great if somebody has done sql manipulations on the C104 filed
of the t9(User Form
@ARSLIST.ORG
Subject: Re: SQL help needed
**
What i need --
I need to pull out the group names from group list field(c104). Since it
contains the group id and not the group names i need to convert it back to
group names;
Also can we do a select statement for group list field where we say
-
*From:* Action Request System discussion list(ARSList) [mailto:
arsl...@arslist.org]*on Behalf Of *remedy.help
*Sent:* Tuesday, February 16, 2010 5:09 PM
*To:* arslist@ARSLIST.ORG
*Subject:* Re: SQL help needed
**
What i need --
I need to pull out the group names from group list
) [mailto:
arsl...@arslist.org]*on Behalf Of *remedy.help
*Sent:* Tuesday, February 16, 2010 5:39 PM
*To:* arslist@ARSLIST.ORG
*Subject:* Re: SQL help needed
**
Joe,
Thanks for the response but the query on C104 doesnt catches it and if we
give like '1%' it throws up lot of results.
I
D'Souza
Gesendet: Dienstag, 16. Februar 2010 23:27
An: arslist@ARSLIST.ORG
Betreff: Re: SQL help needed
**
The second statement should be
select count(*) from t9 where c104 like '1; %' or c104 like '% 1; %';
However I would rather use the view name of the user form which is
user_x instead of t9
, c.[name];
Thanks,
Shawn Pierson
From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Moore, Christopher Allen
Sent: Monday, June 02, 2008 8:02 PM
To: arslist@ARSLIST.ORG
Subject: SQL help
**
I'm trying to do a query on 2 tables- SIT:Site
Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Moore, Christopher Allen
Sent: Monday, June 02, 2008 8:02 PM
To: arslist@ARSLIST.ORG
Subject: SQL help
**
I'm trying to do a query on 2 tables- SIT:Site and AST:ComputerSystem.
I'm a bit rusty on my SQL.
The error
:[EMAIL PROTECTED]
On Behalf Of Grooms, Frederick W
Sent: Tuesday, June 03, 2008 8:54 AM
To: arslist@ARSLIST.ORG
Subject: Re: SQL help
Is it a typo in the email or do you have an = after the Status in the 3rd line?
I believe it should be a comma there
AST_ComputerSystem.assetlifecyclestatus
Allen
Sent: Tuesday, June 03, 2008 9:28 AM
To: arslist@ARSLIST.ORG
Subject: Re: SQL help
**
Hey guys, thanks for the help! I'm really not a SQL pro by any stretch,
so I'm working with 2 queries that I know work and trying to combine
them. The first is really short:
SELECT SIT_Site.Site
I'm trying to do a query on 2 tables- SIT:Site and AST:ComputerSystem. I'm a
bit rusty on my SQL.
The error this gives is:
Msg 102, Level 15, State 1, Line 3
Incorrect syntax near '='.
Can anyone help?
Thanks!
Chris
SELECT
AST_ComputerSystem.Company AS 'Agency',
From: Moore, Christopher Allen [EMAIL PROTECTED]
To: arslist@ARSLIST.ORG
Sent: Monday, June 2, 2008 9:01:35 PM
Subject: SQL help
**
I’m trying to do a query on 2 tables- SIT:Site and AST:ComputerSystem. I’m a
bit rusty on my SQL.
The error this gives is:
Msg 102, Level 15, State 1, Line 3
discussion list(ARSList) [mailto:[EMAIL PROTECTED]
On Behalf Of McManus Michael A SSgt HQ 754 ELSG/DOMH
Sent: 27 July 2007 13:27
To: arslist@arslist.org
Subject: Re: More SQL Help
It's a character field I created and I'm setting the value literally to Yes
Temp field maybe wasn't the best way to state
Pospisil
Sent: Friday, July 27, 2007 7:47 AM
To: arslist@ARSLIST.ORG
Subject: Re: More SQL Help
Michael,
looking at your condition and description of what you are trying to achieve,
should not the condition be
... PassOffReason IS NULL AND ...
rather than
... PassOffReason IS NOT NULL
-
From: Action Request System discussion list(ARSList) [mailto:[EMAIL PROTECTED]
On Behalf Of Thad K Esser
Sent: Thursday, July 26, 2007 6:36 PM
To: arslist@ARSLIST.ORG
Subject: Re: More SQL Help
**
Michael,
You're using SQL... is your 'TicketPassedOff' field a selection field? Those
are stored
(ARSList)
arslist@ARSLIST.ORG
07/26/2007 01:19 PM
Please respond to
arslist@ARSLIST.ORG
To
arslist@ARSLIST.ORG
cc
Subject
More SQL Help
**
Listers,
I?m running into more problems with SQL so I figured I?d check
here again. Here?s the initial query:
SELECT COUNT(*) AS Total
Listers,
I'm running into more problems with SQL so I figured I'd check here
again. Here's the initial query:
SELECT COUNT(*) AS Total
FROM Session_Tracking
WHERE Incident_ID = '$Incident_Number$' AND PassOffReason IS NOT NULL
This works perfectly. When the user tabs over to the
D'Souza
Sent: Thursday, July 19, 2007 7:01 PM
To: arslist@ARSLIST.ORG
Subject: Re: SQL help
I stand corrected.. I was leaving work when I wrote my last mail and
hurried through it.. this should work..
SELECT COUNT(*) AS Total
FROM Session_Tracking
WHERE Incident_ID = '$Incident Number$' IS NOT NULL
, Frederick W
Sent: Friday, July 20, 2007 9:14 AM
To: arslist@ARSLIST.ORG
Subject: Re: SQL help
Joe,
You were having a bad day yesteray ;)
SELECT COUNT(*) AS Total
FROM Session_Tracking
WHERE Incident_ID = '$Incident Number$' AND PassOffReason IS NOT NULL
Fred
-Original Message-
From: Action
So I stink and SQL and I imagine it's a syntax error so I figured I'd check
here. We have a field on our incident form that tracks the total number of
passoffs a ticket goes through. Currently it's not working so I'm trying to
make it happen. Here's the SQL I'm trying to use.
SELECT
A SSgt HQ 754
ELSG/DOMH
Sent: Thursday, July 19, 2007 2:47 PM
To: arslist@ARSLIST.ORG
Subject: SQL help
So I stink and SQL and I imagine it's a syntax error so I figured I'd
check here. We have a field on our incident form that tracks the total
number of passoffs a ticket goes through. Currently
Sent: Thursday, July 19, 2007 4:47 PM
To: arslist@ARSLIST.ORG
Subject: SQL help
**
So I stink and SQL and I imagine itÂ’s a syntax error so I figured IÂ’d
check here. We have a field on our incident form that tracks the total
number of passoffs a ticket goes through. Currently itÂ’s
, July 19, 2007 4:47 PM
To: arslist@ARSLIST.ORG
Subject: SQL help
**
So I stink and SQL and I imagine it's a syntax error so I figured I'd check
here. We have a field on our incident form that tracks the total number of
passoffs a ticket goes through. Currently it's not working so I'm trying
System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] Behalf Of Mike Wallick
Sent: Thursday, July 19, 2007 6:25 PM
To: arslist@ARSLIST.ORG
Subject: Re: SQL help
You might also try giving the count(*) a name so there is a column to
reference.
e.g.
SELECT COUNT(*) AS Total
FROM Session_Tracking
33 matches
Mail list logo