Query Assistance - Sum numbers in an Alphanumeric field
Hi,
I am trying to write a SQL statement that will sum the numeric values in a field that contains both numeric and letters.
Here is an example of the data I am working with-
Table Name: mydata
SSN Age Name
123456789 25 Years John
123456789 48 Years Mary
909129456 52 Years Alice
What I want to do is sum the total age of all people with the same social security number- e.g. 123456789 exists twice and the total of the ages is 73. The result I am trying to extrpolate using SQL is 73 without the word years included.
Does anyone have an idea how I could write such a standard SQL statement?
Thanks!!
Mac
Message was edited by: mac
user623512
If there is always only one natural number inside the age column, then:
SQL> create table mydata (ssn,age,name)
2 as
3 select 123456789, '25 Years', 'John' from dual union all
4 select 123456789, '48 Years', 'Mary' from dual union all
5 select 909129456, '52 Years', 'Alice' from dual
6 /
Tabel is aangemaakt.
SQL> select ssn
2 , sum(to_number(regexp_replace(age,'[^[0-9]]*|(.)','\1'))) sum_age
3 from mydata
4 group by ssn
5 /
SSN SUM_AGE
123456789 73
909129456 52
2 rijen zijn geselecteerd.If all data is in the age column is a number followed by the string ' Years', then a regular SUBSTR will do as well.
Regards,
Rob.
Similar Messages
-
Hi all,
I'm getting really frustrated by this Access error. It happens when I export the result of a query through an Access macro to Excel, the first time it runs well but the next time, there is a chance that the query won't run and the error "Query
must have at least one destination field" will be displayed. After that, I try to check the query SQL code and discover the code has vanished. I'm using simple Select query without joins, only "where", "group by" and "order by"
statements.
Thank you in advance for your help,
Jesus
Edit:
One of these queries are like the following (all of them are of this type):
SELECT Field1, field2, field3, field4, field5, Sum(Field6) AS SumOfField6, Sum(Field7) AS SumOfField7
FROM Table1
WHERE Field6 is not null
GROUP BY Field1, field2, field3, field4, field5
Order By Sum(Field6) descHi Peter,
Thank you for your response, I updated the original question with one of the codes.
Thanks,
Jesus -
Maintaining Numeric Values in Alphanumeric field of Material Master
Hello Everyone!
Currently we are in midst of an SAP Project implementation. The problem arising is that we are using External Number for material codes which has already been used by the business in the legacy system. So the material code field has been set to Alphanumeric data type.
During the data upload of material master a problem has been identified that some of the material codes that needs to be uploaded are number in nature or start with a numeral e.g 1234-5674-9, 1234-9876-D. While creating them the system generates the following error.
Number 1234-5674-9 not defined for material type ICI PNT - Trading Goods
Message no. M3318
Diagnosis
Every material type has a speific number range for external number assignment. The material number you have entered does not lie within the number range for this material type.
Procedure
Choose a material number that lies within the number range of your material type.
Is there a way through which we can maintain such external numbers with Alphanumeric field.
- Best RegardsHi Khalid,
You assign as follows for external number range to your group
From Number to Number EXT
A ZZZZZZZZ( enter the number
characters( Z) as required for your client) Tick the Ext box
By this setting you can assign ALPHA NUMERICAL external numbers
Cheers
Chris
Edited by: CHRIS MM on Dec 27, 2010 9:27 AM -
Searching in Alphanumeric fields.
Hi guys,
I have a problem referred to a select from custom table where my variable is GE an alfphanumeric field and LE another alphanumeric field.
Both of alphanumeric fields are char18.
Under you can find the record status, the variable value and the select code.
WERKS ZBU DATBI ZPRDHA_FROM ZPRDHA_TO PRCTR
DE10 3 31.12.9999 A00000000000000000 AZZZZZZZZZZZZZZZZZ DE10-C-ENE
XVBAP-PRDHA = A721451I
select single prctr into l_profit_centre
from ztallbuprctr1
where werks = xvbap-werks
and zbu = l_zbu
and datbi ge xvbap-erdat
and zprdha_from ge xvbap-prodh
and zprdha_to le xvbap-prodh.
Why, according to you, sy-subrc = 4?
Have you got some workaround?
Thanks for your answer.Thanks for response.
You are right, but I don't know exactly where can I delete these 6 fields (because they are generated automatically?). If i delete them in bindings (Page Definition file) fields also dissapears in query result table.
Query embeded in .jsff page looks like these (there are no fields, only reference to the binding):
<af:query id="qryId1" headerText="Search" disclosed="true"
value="#{bindings.AMeklesanaCriteriaQuery.queryDescriptor}"
model="#{bindings.AMeklesanaCriteriaQuery.queryModel}"
queryListener="#{bindings.AMeklesanaCriteriaQuery.processQuery}"
queryOperationListener="#{bindings.AMeklesanaCriteriaQuery.processQueryOperation}"
resultComponentId="::pc1:meklesanaCriteriaQueryResult"/>
Result I would like to achieve: http://my.jetscreenshot.com/demo/20100630-ldrk-281kb.jpg
Edited by: andrejs on 2010.30.6 01:25 -
Query Builder accepts not more than 60 fields in a single dataset
Query Builder accepts not more than 60 fields in a single dataset. Once we try to enter 61st field - it pops up with a message. Is there some setting that we need to change.
Please help me.
Thanx & Regards,
Rajeev GoelQuery Builder accepts not more than 60 fields in a single dataset. Once we try to enter 61st field - it pops up with a message. Is there some setting that we need to change.
Please help me.
Thanx & Regards,
Rajeev Goel -
MATLOC_SET() - Issues when changing alphanumeric fields
Hi All,
I want to enable planner to quickly change safety stock settings for advanced safety stock calculation and recalculate the safety stocks through a macro button in the planning book.
One part of this is to set the safety stock method. I am using the following code.
MATLOC_SET(
'MSDP_SB_METHOD' ;
CHAR_VALUES_INPUT( 'Enter_Safety_Stock_Settings' ;
'Safety_Stock_Method:'
ACT_PRODUCT ;
ACT_LOCATION ;
ACT_VERSION
But it does not work. whenever I enter anything the field is set to zero.
I have tried the same code for the service level and other numeric fields and it works fine.
With other alphanumeric fields like ABC indicator it also does not work. This seems to be an issue with alphanumeric versus numeric fields, but I am not sure how to fix the error, because I can only find the operation MATLOC_SET() as an option to change product-location specific product master fields.
Please help.
Thank you,
MariaHello Maria,
You can use the macro function:
SB_BETA_POINT() - for adv safety stock method BS.
SB_ALPHA_CYCLE()- for adv safety stock method AT
SB_ALPHA_POINT()- for adv safety stock method AS.
SB_BETA_CYCLE()- for adv safety stock method BT.
The syntax would be(if BS):
SB_BETA_POINT( service level ; demand forecast ; forecast error demand (%) ; replenishment lead time ; forecast error replenishment lead time (%) ; days' supply ) returns the safety stock level for the Beta service level according to the point method.
To get the values for Service level,: demand forecast ; forecast error demand (%) ; replenishment lead time ; forecast error replenishment lead time (%) ; days' supply you can use the the function MATLOC()
You can store the values of the fields in auxillary KF and then call these in SB_BETA_POINT()
The above method can be used to run interactively only and not in background.
Thanks,Bopanna -
FRM-40208: Form running in query-only mode. Cannot change database fields.
Hi,
I am using forms 6i where it is calling a form from a menu in query like call_form(,query_only). Now an error is occurring on call of that form ‘FRM-40208: Form running in query-only mode. Cannot change database fields.’ Though this is been handled to give a certain message from on_error message from a package from library.
Now the issue is that the error keeps on popping even after the ok button is pressed. There are number of records from the table. How can we handle the error. Any suggestion would be really appreciated!!!
Regards,
Rajeshthanks Gred but i have resolved the issue. it seems that each row was going into query_only mode (program written such a way). therefore the error was showing even after the OK button. handled the issue from ON_ERROR trigger. anyway thanks for your time Gred!
-
Caml query to retrive keyword from rich text field
hi friends
i am using below caml query to retrieve data from title field and Rich text field(Definition)
<View>
<Query>
<Where>
<And>
<Or>
<Eq>
<FieldRef Name=\'Title\'/>
<Value Type=\'Text\'>'+letter+'</Value>
</Eq>
<Contains>
<FieldRef Name=\'Definition\' />
<Value Type=\'Note\'>'+letter+'</Value>
</Contains>
</Or>
<Neq>
<FieldRef Name=\'status\' />
<Value Type=\'Text\'>Not approved</Value>
</Neq>
</And>
</Where>
<OrderBy><FieldRef Name=\'Title\' /></OrderBy>
</Query>
</View>
this query is working fine. But it is retrieving some extra fields also which doesn't have the queried string. and even it is retrieving keyword from image urls which are present in rich text field.
Please help me to retrieve key word from plain text of rich text field.Hi,
According to your post, my understanding is that you want to use caml query to retrive keyword from rich text field
By design, when specifying a ViewFields clause, values for these fields are returned, together with a few system columns like ID, Created and Modified.
If you query rich text field, it will return the field with HTML tags.
To retrieve key word from plain text of rich text field, you need to use regular expression to remove the HTML tags.
You can use the code below:
using (SPSite site = new SPSite("http://sitename"))
using (SPWeb spWeb = site.OpenWeb())
SPList spList = spWeb.Lists.TryGetList("ListName");
SPQuery qry = new SPQuery();
if (spList != null)
qry.Query =
@" <Where>
<Contains>
<FieldRef Name='Rich_x0020_Text' />
<Value Type='Note'>caml</Value>
</Contains>
</Where>";
qry.ViewFields = @"<FieldRef Name='Title' /><FieldRef Name='Rich_x0020_Text' />";
SPListItemCollection listItems = spList.GetItems(qry);
foreach (SPListItem item in listItems)
string src = item["Rich_x0020_Text"].ToString();
Regex htmlReg = new Regex(@"<[^>]+>", RegexOptions.Compiled | RegexOptions.IgnoreCase);
src = htmlReg.Replace(src, string.Empty);
Console.WriteLine(src);
Console.ReadKey();
The result is as below:
Best Regards,
Linda Li
Linda Li
TechNet Community Support -
CQWP does not return result for a specific query when filtering on a managed metadata field.
Hi,
We are facing a serious production issue. We've search the web extensively but to no avail.
Problem:
CQWP does not return result for a specific query when filtering on a managed metadata field.
ULS log:
The Uls logs provides 3 different messages that I could relate to every time the query is executed. The last item(level Medium) is displayed 14 times. For readability I've moved the ULS logs to the bottom of this question.
Query:
The query is as follows:
(I've translated this from dutch so pardon any typo's)
Query: (top selection) Display items from all sites in the site collection
ListType: Documentlibrary
Contenttype:
Items from this group:Custom Document Contenttypes
Items from this content type: Verklaring
Filter: Soort is equal to X
extra info: the field soort (Type) is a managed metadata field that was assigned the value X
Managed Metadata Structure:
-managed metadata service
-Contoso
-Enterprise Taxonomy (term set)
-Document (term)
-Verklaring (term)
-Soort (term)
-x (term)
EXTRA INFO:
When I modify the filter to filter on Title the CQWP DOES return the correct document!
When I modify the query settings to search a specific library the CWQP also does return the correct document! (In this case I am filtering on a managed metadata field).
QUESTION:
Why doesn't the CQWP return the document when filtering on a managed metadata field over the entire site collection.
Why does the CQWP return the document when filtering on a managed metadata field over a single library.
(The type of information the CQWP should return (Soort:x) is stored in a dozen document libraries!)
Here are the ULS logs.
Product: Web Content Management
Category Publishing
Level: Monitorable:
CrossListQueryCache::GetSiteData() caught exception (Microsoft.SharePoint.SPException: Kan deze actie niet voltooien. Probeer het opnieuw. ---> System.Runtime.InteropServices.COMException (0x80004005): Kan deze actie niet voltooien. Probeer
het opnieuw. bij Microsoft.SharePoint.Library.SPRequestInternalClass.CrossListQuery(String bstrUrl, String bstrXmlWebs, String bstrXmlLists, String bstrXmlQuery, ISP2DSafeArrayWriter pCallback, Object& pvarColumns)
bij Microsoft.SharePoint.Library.SPRequest.CrossListQuery(String bstrUrl, String bstrXmlWebs, String bstrXmlLists, String bstrXmlQuery, ISP2DSafeArrayWriter pCallback, Object& pvarColumns) --- Einde van intern uitzonderingsstackpad
--- bij Microsoft.SharePoint.SPGlobal.HandleComException(COMException comEx) bij Microsoft.SharePoint.Library.SPRequest.CrossListQuery(String bstrUrl, String bstrXmlWebs, String bstrXmlLists, String bstrXmlQuery,
ISP2DSafeArrayWriter pCallback, Object& pvarColumns) bij Microsoft.SharePoint.SPWeb.GetSiteData(SPSiteDataQuery query) bij Microsoft.SharePoint.Publishing.CachedArea.GetSiteData(SPWeb web, SPSiteDataQuery
siteDataQuery, Boolean useSpQueryOnList) bij Microsoft.SharePoint.Publishing.CachedArea.GetCrossListQueryResults(SPSiteDataQuery query, SPWeb currentContext, Boolean onlyPopulateCache, Boolean useSpQueryOnList, Int32 lcid)
bij Microsoft.SharePoint.Publishing.CrossListQueryCache.GetSiteDataResults(CachedArea cachedArea, SPWeb web, SPSiteDataQuery query, Boolean useSpQueryOnList)) for query: '<ViewFields><FieldRef ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}"
Nullable="True" Type="Text"/><FieldRef ID="{94f89715-e097-4e8b-ba79-ea02aa8b7adb}" Nullable="True" Type="Lookup"/><FieldRef ID="{1d22ea11-1e32-424e-89ab-9fedbadb6ce1}" Nullable="True"
Type="Counter"/><FieldRef ID="{28cf69c5-fa48-462a-b5cd-27b6f9d2bd5f}" Nullable="True" Type="DateTime"/><FieldRef ID="{1df5e554-ec7e-46a6-901d-d85a3881cb18}" Nullable="True" Type="User"/><FieldRef
ID="{d31655d1-1d5b-4511-95a1-7a09e9b75bf2}" Nullable="True" Type="User"/><FieldRef ID="{8c06beca-0777-48f7-91c7-6da68bc07b69}" Nullable="True" Type="DateTime"/><FieldRef ID="{30bb605f-5bae-48fe-b4e3-1f81d9772af9}"
Nullable="True" Type="Lookup"/><FieldRef ID="{ba3c27ee-4791-4867-8821-ff99000bac98}" Nullable="True" Type="Text"/><FieldRef ID="{c5c4b81c-f1d9-4b43-a6a2-090df32ebb68}" Nullable="True"
Type="Lookup"/><FieldRef ID="{8fca95c0-9b7d-456f-8dae-b41ee2728b85}" Nullable="True" Type="Lookup"/><FieldRef ID="{39360f11-34cf-4356-9945-25c44e68dade}" Nullable="True" Type="Text"/><FieldRef
ID="{543bc2cf-1f30-488e-8f25-6fe3b689d9ac}" Nullable="True" Type="Image"/><FieldRef ID="{43bdd51b-3c5b-4e78-90a8-fb2087f71e70}" Nullable="True" Type="Number"/><FieldRef ID="{9da97a8a-1da5-4a77-98d3-4bc10456e700}"
Nullable="True" Type="Note"/><FieldRef ID="{aea3cd20-8da0-4cb7-803b-5a33079a0e4d}" Nullable="True" Type="Lookup"/><FieldRef Name="ScopeId" /><FieldRef Name="_Level" /><FieldRef
Name="UniqueId" /><ListProperty Name="DraftVersionVisibility" /></ViewFields><Lists ServerTemplate="101"></Lists><Webs Scope="Recursive" /><RowLimit>45</RowLimit><Query><Where><And><BeginsWith><FieldRef
Name="ContentTypeId" Nullable="True" Type="ContentTypeId"/><Value Type="ContentTypeId">0x010100C5FEE83B67FA6445B0C14AE8B7761BB8011E</Value></BeginsWith><In><FieldRef ID="{aea3cd20-8da0-4cb7-803b-5a33079a0e4d}"
LookupId="TRUE"/><Values><Value Type="Counter">783</Value></Values></In></And></Where><OrderBy><FieldRef ID="{8c06beca-0777-48f7-91c7-6da68bc07b69}" Nullable="True"
Type="DateTime" Ascending="FALSE"/></OrderBy></Query>' at url: /. Titel webonderdeel: Inhoudsquery
Product: Web Content Management
Category Publishing
Level: Warning
Error occured while processing a Content Query Web Part. Performing the following query '<ViewFields><FieldRef ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" Nullable="True" Type="Text"/><FieldRef ID="{94f89715-e097-4e8b-ba79-ea02aa8b7adb}"
Nullable="True" Type="Lookup"/><FieldRef ID="{1d22ea11-1e32-424e-89ab-9fedbadb6ce1}" Nullable="True" Type="Counter"/><FieldRef ID="{28cf69c5-fa48-462a-b5cd-27b6f9d2bd5f}" Nullable="True"
Type="DateTime"/><FieldRef ID="{1df5e554-ec7e-46a6-901d-d85a3881cb18}" Nullable="True" Type="User"/><FieldRef ID="{d31655d1-1d5b-4511-95a1-7a09e9b75bf2}" Nullable="True" Type="User"/><FieldRef
ID="{8c06beca-0777-48f7-91c7-6da68bc07b69}" Nullable="True" Type="DateTime"/><FieldRef ID="{30bb605f-5bae-48fe-b4e3-1f81d9772af9}" Nullable="True" Type="Lookup"/><FieldRef ID="{ba3c27ee-4791-4867-8821-ff99000bac98}"
Nullable="True" Type="Text"/><FieldRef ID="{c5c4b81c-f1d9-4b43-a6a2-090df32ebb68}" Nullable="True" Type="Lookup"/><FieldRef ID="{8fca95c0-9b7d-456f-8dae-b41ee2728b85}" Nullable="True"
Type="Lookup"/><FieldRef ID="{39360f11-34cf-4356-9945-25c44e68dade}" Nullable="True" Type="Text"/><FieldRef ID="{543bc2cf-1f30-488e-8f25-6fe3b689d9ac}" Nullable="True" Type="Image"/><FieldRef
ID="{43bdd51b-3c5b-4e78-90a8-fb2087f71e70}" Nullable="True" Type="Number"/><FieldRef ID="{9da97a8a-1da5-4a77-98d3-4bc10456e700}" Nullable="True" Type="Note"/><FieldRef ID="{aea3cd20-8da0-4cb7-803b-5a33079a0e4d}"
Nullable="True" Type="Lookup"/><FieldRef Name="ScopeId" /><FieldRef Name="_Level" /><FieldRef Name="UniqueId" /><ListProperty Name="DraftVersionVisibility" /></ViewFields><Lists
ServerTemplate="101"></Lists><Webs Scope="Recursive" /><RowLimit>45</RowLimit><Query><Where><And><BeginsWith><FieldRef Name="ContentTypeId" Nullable="True" Type="ContentTypeId"/><Value
Type="ContentTypeId">0x010100C5FEE83B67FA6445B0C14AE8B7761BB8011E</Value></BeginsWith><In><FieldRef ID="{aea3cd20-8da0-4cb7-803b-5a33079a0e4d}" LookupId="TRUE"/><Values><Value Type="Counter">783</Value></Values></In></And></Where><OrderBy><FieldRef
ID="{8c06beca-0777-48f7-91c7-6da68bc07b69}" Nullable="True" Type="DateTime" Ascending="FALSE"/></OrderBy></Query>' generated the following error: Kan deze actie niet voltooien. Probeer het opnieuw.
at the following url: /. Titel webonderdeel: Inhoudsquery
Kan deze actie niet voltooien. Probeer het opnieuw. This is Dutch. It means something like: Cannot complete this action. Please try again.
Product: Web Content Management
Category Publishing
Level: Medium (this message is displayed 14 times)
ConsoleUtilies.GetContextualControlMode had no currentPage so the current SPWebPartManager mode cannot be retrieved.Hi,
while digging through the logging (again) I found some extra logging regarding the same correlation id (see details below).
We have a fairly large term store (4000+ lines).
If somebody has a clue or tip that would greatly appreciated!
03-19-2014 13:49:51.87 w3wp.exe (0x2098) 0x23BC SharePoint Foundation Database fa42 Monitorable A large block of literal text was sent to sql. This can result in blocking in sql and excessive memory use on the front
end. Verify that no binary parameters are being passed as literals, and consider breaking up batches into smaller components. If this request is for a SharePoint list or list item, you may be able to resolve this by reducing the number of fields. 1971313a-6baa-49e9-bace-d024ce67f25c
03-19-2014 13:49:51.87 w3wp.exe (0x2098) 0x23BC SharePoint Foundation Database fa43 High Slow Query Duration: 127.1515 1971313a-6baa-49e9-bace-d024ce67f25c
03-19-2014 13:49:51.87 w3wp.exe (0x2098) 0x23BC SharePoint Foundation Database fa44 High Slow Query StackTrace-Managed: bij Microsoft.SharePoint.Utilities.SqlSession.OnPostExecuteCommand(SqlCommand command,
SqlQueryData monitoringData) bij Microsoft.SharePoint.Utilities.SqlSession.ExecuteReader(SqlCommand command, CommandBehavior behavior, SqlQueryData monitoringData, Boolean retryForDeadLock) bij Microsoft.SharePoint.SPSqlClient.ExecuteQueryInternal(Boolean
retryfordeadlock) bij Microsoft.SharePoint.SPSqlClient.ExecuteQuery(Boolean retryfordeadlock) bij Microsoft.SharePoint.Library.SPRequestInternalClass.CrossListQuery(String bstrUrl, String bstrXmlWebs, String
bstrXmlLists, String bstrXmlQuery, ISP2DSafeArrayWriter pCallback, Object& pvarColumns) bij Microsoft.SharePoint.Library.SPRequest.CrossListQuery(String bstrUrl, String bstrXmlWebs, String bstrXmlLists, String bstrXmlQuery, ISP2DSafeArrayWriter
pCallback, Object& pvarColumns) bij Microsoft.SharePoint.SPWeb.GetSiteData(SPSiteDataQuery query) bij Microsoft.SharePoint.Publishing.CachedArea.GetSiteData(SPWeb web, SPSiteDataQuery siteDataQuery, Boolean
useSpQueryOnList) bij Microsoft.SharePoint.Publishing.CachedArea.GetCrossListQueryResults(SPSiteDataQuery query, SPWeb currentContext, Boolean onlyPopulateCache, Boolean useSpQueryOnList, Int32 lcid) bij Microsoft.SharePoint.Publishing.CrossListQueryCache.GetSiteDataResults(CachedArea
cachedArea, SPWeb web, SPSiteDataQuery query, Boolean useSpQueryOnList) bij Microsoft.SharePoint.Publishing.CrossListQueryCache.GetSiteDataResults(CachedArea ca, Boolean useSpQueryOnList) bij Microsoft.SharePoint.Publishing.CrossListQueryCache.GetSiteDataResults(SPSite
site, String webUrl, Boolean useSpQueryOnList) bij Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart.IssueQuery() bij Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart.GetXPathNavigator(String
viewPath) bij Microsoft.SharePoint.WebPartPages.DataFormWebPart.PrepareAndPerformTransform(Boolean bDeferExecuteTransform) bij Microsoft.SharePoint.WebPartPages.DataFormWebPart.PerformSelect()
bij Microsoft.SharePoint.WebPartPages.DataFormWebPart.DataBind() bij Microsoft.SharePoint.WebPartPages.DataFormWebPart.EnsureDataBound() bij Microsoft.SharePoint.WebPartPages.DataFormWebPart.CreateChildControls()
bij System.Web.UI.Control.EnsureChildControls() bij System.Web.UI.Control.PreRenderRecursiveInternal() bij System.Web.UI.Control.PreRenderRecursiveInternal() bij System.Web.UI.Control.PreRenderRecursiveInternal()
bij System.Web.UI.Control.PreRenderRecursiveInternal() bij System.Web.UI.Control.PreRenderRecursiveInternal() bij System.Web.UI.Control.PreRenderRecursiveInternal() bij System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) bij System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) bij System.Web.UI.Page.ProcessRequest()
bij System.Web.UI.Page.ProcessRequest(HttpContext context) bij ASP.BLANKWEBPARTPAGE_ASPX_1653093133.ProcessRequest(HttpContext context) bij Microsoft.SharePoint.Publishing.TemplateRedirectionPage.ProcessRequest(HttpContext
context) bij System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() bij System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
bij System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error) bij System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb) bij System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest
wr, HttpContext context) bij System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags) bij System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr
managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags) bij System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32
flags) bij System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags) 1971313a-6baa-49e9-bace-d024ce67f25c -
I want to copy and paste a long list of phone numbers into the 'to' field of messaging. All it does is become one long number instead. I have even tried commas in between. Any ideas? (They are NOT contacts)
That's not how iMessage was designed to work. It works with your contacts. You start typing a phone number or email address and you'll se a list of hint from auto-complete. After you select a suggestion, start typing another address. If the addresses you want are not in your contacts, you'll need to enter each of them manually.
-
Suppressing Footer by Sum Summary Problem - MSSQL float field?
I'm evaluating CR2008 and came to a problem I can't find an answer to.
I'm summarizing quantity of shares in a transaction log and if the sum is zero should suppress the Footer as there is no quantity to report. This works for 95%+ of cases but there are instances where the zero is not being supressed. I'm not sure this is a problem with MSSQL's float field or if it is a problem with CrystalReports.
I have a suppression formula as follows:
If Sum({Transactions.Quanity, {Securities.Description}) = 0 Then
True
Else
False
This works as I stated for most instances. But some it will display a 0.0000000000 (testing with the largest rounding and decimals to see if there is a rounding problem).
The values are stored in a MSSQL database and the quantity field is of type 'float'. As a test I queried the database for one of the failing instances with query "select quantity from transactions where portfolioid=XXXX and symbolid=YYYY". This returns 52.732 and -52.732. If I where to change the suppression formula to
If Sum({Transactions.Quanity, {Securities.Description}) <= 0.0000000001 And
Sum({Transactions.Quanity, {Securities.Description}) >= -0.0000000001 Then
True
Else
False
the suppression works correctly. Could someone shed some light on this issue?Debi is the one that is correct but it still is something weird about it. When I do the multiplication by 10000000000, I get some trailing fractions converted into a zero value as expected like 527320000001. But if I do the same multiplication in an query on MSSQL, ie. "select quantity * 10000000000 from transactions where portfolioid=XXXX and symbolid=YYYY" I do not get the trailing fractions but the numbers I would hope to get 527320000000. Somewhere along the way the float is converted into a number on CrystalReports and the fractions are not kept as is on database. Null values are not allowed on database schema so those would not be an issue.
-
SUMIF to sum only if test-value field is non-blank?
Hey Numbers experts, I'm looking for a way to conditionally sum the values in a column. In other words, if the corresponding field in my "test values" column is blank, I do not want to include the value from the same row in my "sum values" column. Is there a way to do this?
It seems that SUMIF is the perfect function, I just can't figure out a way to make it look for only non-blank fields. the test values, except for the blank fields, are all going to be unique values, so there is really nothing else to use as a test other than the presence or absence of data. Help?
Thanks in advance!C2=SUMIF(A, "<>"&"", B)
this is shorthand for... select cell C2, then type (or copy and paste from here) the formula:
=SUMIF(A, "<>"&"", B)
the expression:
"<>"&""
reads:
"is not equal to the empty string" -
Query - Formatted Search in a User Defined Field
Hi,
I am having some problems with a very simple query but it doesn't seem to work. I insert this formatted search in to my UDF I made called Cost. The query I am using is:
SELECT $[$34.0.0] - (I had to use variable number because this Unit Price field in the Item master data does not have a field name associated)
It is supposed to grab the unit price from the screen, however it is always displaying zero when I query it, and when I put it in the UDF as a formatted search, it give me the internal error.
I would greatly appreciate your help.
ThanksQuestion 1: Where is this Cost UDF defined. Is it at the Marketing document Header or row level?
NOTE:
The field reference for the Unit Price column is incorrect. When you mouse over the Unit Price column you should see the values for Item=xx Colunm=xx
The syntax is $\[$Item.Column.Type]. Therefore for your case it should be $\[$38.14.Number]
The type prefix can be 0 if you are accessing a Alphanumeric column.
If you user field is at the Header level the Formatted Search Query might not work unless you highlight that whole row and then click on the header level UDF and press Shift+F2
How have you set the refresh options? -
Total using SUM not working on Account field on Lead History report
Hi,
I have a report based on Lead History on which I need to use the SUM of a field that is under the Account.Custom Number/Integer. This basically is a report of leads along with some fields from the account the lead is associated with. The SUM on that field works fine when I try it on another report off the Account History object but does not work when used on the report off the Lead History. It just shows the value of the field for that record instead of the total of the field for all the records displayed on the report. I am guessing that the issue has to do with the query going off the Lead-Account relationship because of which it treats each relationship as one resultset and totals the field values for just that relationship.
Any ideas on how to accomplish this would help very much. Can a field on one report be referred from another to achieve this?
Thanks in advance for your help!
Regards,
MadhukarHi again
Just checked a similar report test I did a while ago, and my query is:
SELECT c001 MyText, TO_NUMBER(c002) MyNumber
FROM HTMLDB_COLLECTIONS
WHERE COLLECTION_NAME = 'ATD'
So, you should use TO_NUMBER(c002)
Andy -
Hi, I have imported from an Excel spreadsheet 3 fields 1. Name 2. Forename and 3. results.
the first two fields are obviously string fields but the results field is an Alphanumeric (general) field, which has numbers and letters corresponding to exam results. Crystal reports reads the field as a String because the first few cells in the spreadsheet are blank, if I put numbers in the cells then it reads it as a Number fields and ignores the letters. Is there any way to force Crystal to read both numbers and letters.
Thanks
Dave PickettIt is actually an issue with Excel and there is an MS knowledge base article on this and a script that can be run.
The MS KB number is KB208414
Maybe you are looking for
-
Security popup accessing applet with https
I have a website that serves everything over https. One of the things being served is an applet. I've found that just before the first request is made for the applet's .class files, I get a popup from the Java plug-in saying: Warning - Security The w
-
Modification assistant in Local Program to be turned ON
Hi all, I need to get the modification assistant ON for programs created on local system as well, currently it works only for programs transported from other servers. Is there a way to prevent the developer from Switching it OFF. Thanks.
-
Metdata Query Crippling the Database
Hi All, We are using ResultSet getProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern) throws SQLException; method of the interface DatabaseMetaData
-
Xdg-default-chooser - Register default XDG application
Hi archers. I have python-glued together xdg-mime and dzen2, so that when xdg-open hits an mimetype that is not associated, it fires up a dzen2 menu that allows user to choose between applications capable of handling this mimetype. I find it quite us
-
How to build a plugin without Encrypt Metadata ?
I downloaded the sample SecurityHandler(from Acrobat 8 SDK) . I write pdCryptHandler->EncryptDocMetadata = ASCallbackCreateProto(PDCryptEncryptDocMetadata, MyEncryptDocMetadata); and static ACCB1 ASBool ACCB2 MyEncryptDocMetadata(PDDoc pdDoc) return