How to update column references.
Is there an easy way to make a reference to a data column update for when more data is entered into that column? Ex. =SUM(A1:A10) but then you add data to column A in cell 11, 12, and 13. Is there a way to make the SUM entry update to SUM(A1:A13)?
Hi wj,
Good to see that you got it. For the benefit of others searching for answers to a similar issue, here's a pair of sample tables using your original formula, with my revisions, including a couple beyond changing the cell/range references. Details below.
Colour fill in the rows was added manually to highlight the rows not included because of not filling one or more of the conditions. The yellow filled row is included. It's highlighted to show why the sum isn't a multiple of 10.
Formula: Summary::B3:
=SUMIFS(Data :: $D,Data :: $I,TRUE,Data :: $A,">="&$B$1,Data :: $A,"<="&B2)
This should look pretty much like what you've arrived at, except for the 'condition' expressions.
TRUE: If you're using checkboxes in column I, or using a formula in this column that returns either TRUE or FALSE as a value, this can be used. If you're using a formula in this column that returns the TEXT "true", use what you had in the original formula.
Dates: I put the start and end dates into individual cells on the Summary table rather than into the formula for two reasons:
My numeric date format is different from yours, making this easier than switching to match your numeric format, then returning to mine after checking the formula. Using a cell reference allows the user to choose any available date format, provided the format matches that on the data table.
It's easier to change the Start and End dates in a cell than to edit the formula each time the user wants to sum a different range of dates.
In my example, the Start date is entered directly. The end date is constructed with a formula that assumes the sum period will always be a full year:
Summary::B2: =EOMONTH(B1,11)
Regards,
Barry
Similar Messages
-
How to update column value dynamically
Hi All,
I have created a simple mapping and selected insert/update on target table. In target table there is one column record_type which will hold either 'NEW' (if new record is inserting) or 'UPDATED'(if existing record is updating) value. Please let me know how can I do this using OWB PL/SQL map?
Thanks
BhushanHi Sanjaya,
Thank you for your reply.
I like your approch but i think there is need to pass 'UPDATED' when intersect is being used and 'NEW' when minus is being used.
I have developed an OWB map as mentioned in below steps.
1. Chose source (TableA) and target (TableB) as source using table operator.
2. Joined TableA to TableB on col1 using left outer join using joined operator.
3. In expression operator I have calculated value for TableB.col3 using below logic.
CASE WHEN TableB.col1 IS NULL THEN 'NEW' ELSE 'UPDATED' END
4. Mapped columns from expression operator to target table.
I would like to know you comments on above approch. My OWB map has generated below merge statement.
MERGE INTO TableB
USING(SELECT MERGESQL.col1,MERGESQL.col2, CASE WHEN MERGESQL.col3 is null then 'NEW' else 'UPDATED' END col3
FROM (SELECT TableA.col1, TableA.col2,TableB.col1 AS col3
FROM TableA
LEFT OUTER JOIN TableB
ON (TableA.col1 = TableB.col1)) MERGESQL
ON (col1 = MERGESQL.col1)
WHEN NOT MATCHED THEN INSERT(col1,col2,col3) VALUES(MERGESQL.col1,MERGESQL.col2,MERGESQL.col3)
WHEN MATCHED THEN
UPDATE SET col2 = MERGESQL.col2,
col3 = MERGESQL.col3; -
How to Update Column Declaratively
Is it possible to update a column Declaratively?
For example,
I need to update a table with a passed variable value. Seems easy enough, but only with JAVA as the solution. Groovy should be able to accomplish this but I can't seem to figure out how.
I ask this question because of my strong desire to develop applications without using JAVA. I know that is not possible, but not until I have pursued every option , Declaratively.
I am open to Groovy has an option to avoid Java.
Any Thoughts?
ChuckThanks for replying Frank,
My purpose for the post is to raise awareness for Declarative development.
As to the example,
I need to pass table WoItem , primary key (WoNumber,WoTaskNo), to table B (Note: Table Directory primary key is "DirId") and update WoNumber,WoTaskNo in Table Directory.
This will allow me to create an association between table WoItem and Table Directory.
WoItem represents a multi-level set of tables and Table Directory does as well.
In this example table WoItem is level 2 and Table Directory is Level 1.
This association will support a new master-detail relationship based using WoNumber,WoTaskNo as foriegn keys.
A data control view will be created starting with WoOrder, WoItem,Directory,Dir_card,Dir_acct, etc .
The Work Order tables and Directory Tables are related by associating WoItem to Directory. The master-detail relationships on down the Directory levels are not changed.
A new table Directory View is created to support this new association using a where clause joining the WoITem table and Directory on WoNumber,WoTaskNo.
Note: I rely on creating associations whenever possible allowing jdeveloper to handle all the sql..
Chuck -
How to update column values in a table where that column is referring to different tables
i have a table Order it has columns
OrderID, Name, Total
1 trade value populated from i.e. tradeorder table
2 fixed value is populated from fixedorder table
3 annual value populated from another table
I m thinking of creating function for every order id to call those tables..
and there are many insertions taking place in order table ,,at the moment its 20 rows ..
kindly provide your suggestionsYou can group rows in order table and update the set of row from the specific table. For instance
UPDATE [ORDER] SET [TOTAL]=B.[TOTAL] FROM [ORDER] A INNER JOIN [TRADEORDER] B ON A.ORDERID=B.ORDERID WHERE A.NAME='TRADE'
UPDATE [ORDER] SET [TOTAL]=B.[TOTAL] FROM [ORDER] A INNER JOIN [FIXEDORDER] B ON A.ORDERID=B.ORDERID WHERE A.NAME='FIXED'
UPDATE [ORDER] SET [TOTAL]=B.[TOTAL] FROM [ORDER] A INNER JOIN [ANOTHERTABLE] B ON A.ORDERID=B.ORDERID WHERE A.NAME='ANNUAL'
Regards, RSingh -
How to update column in Oracle SQL Developer?
Hi everybody,
How can I update table in Oracle SQL Developer like in PL/SQL Developer use:
Select * from table for update;
Thank you~Do you mean you want to edit the result grid?
You can't edit the result grid of a query, but you can edit the data tab of a table.
Click on the table in the object browser
Click on the data tab
Optionally filter the results using the filter field at the top
Type into the data cells.
Click on the commit button -
How to update Column value in a list using powershell.
Hi All,
I am trying to copy value of One column to another column in same list. I am using SPSiteDataQuery for this. I am using following power shell script.
if ((Get-PSSnapin -Name Microsoft.SharePoint.Powershell -ErrorAction SilentlyContinue) -eq $null )
Add-PSSnapin Microsoft.SharePoint.Powershell
$CopyFromColumnName1 = "Section-1 Summary" #column copy source 1
$CopyToColumnName1 = "RichTextBoxControl" #destination column 1
$siteCollectionUrl = http://someURL
$site =new-object Microsoft.SharePoint.SPSite($siteCollectionUrl)
$query = new-object Microsoft.SharePoint.SPSiteDataQuery
$query.ViewFields = "<FieldRef Name='Title' /><FieldRef Name='PublishingPageLayout' /><FieldRef Name='FileLeafRef' /><FieldRef Name='RTC' /><FieldRef Name='SummaryOne' />";
$query.Webs = "<Webs Scope='SiteCollection'>"
$query.Lists = "<Lists ServerTemplate='850'/>"
$query.Query = "<Where>
<Contains>
<FieldRef Name='PublishingPageLayout' />
<Value Type='URL'>SomePageLayout</Value>
</Contains>
</Where>"
$spListItems = $site.rootweb.GetSiteData($query)
#Write-Host $spListItems
foreach($row in $spListItems.Rows)
$row.RTC = $row.SummaryOne
write-Host $row.RTC
$childWeb.Dispose()
$site.Dispose()
Here the column RTC is not updating on executing the script. I want to copy data from "SummaryOne" to "RTC" column.
Please assist me with this issue.
amolHi Bruno,
Thanks for reply I use following script and it is working for me.
if ((Get-PSSnapin
-Name Microsoft.SharePoint.Powershell
-ErrorAction SilentlyContinue)
-eq $null )
Add-PSSnapin
Microsoft.SharePoint.Powershell
#Use the Display Names
$webApplicationURL
= Read-Host
'Provide Site collection/Contnt HUB URL'
$webApp
= Get-SPWebApplication
$webApplicationURL
$CopyFromColumnName1
= "colName"
#column copy source 1
$CopyToColumnName1
= "coltoCopyVal"
#destination column 1
if($webApp
-ne $null)
foreach($siteCollectionUrl
in $webApp.Sites)
$site =new-object
Microsoft.SharePoint.SPSite($siteCollectionUrl.Url)
$query =
new-object Microsoft.SharePoint.SPSiteDataQuery
$query.ViewFields
= "<FieldRef Name='Title' /><FieldRef Name='PublishingPageLayout' /><FieldRef Name='FileLeafRef' /><FieldRef Name='RTC' /><FieldRef Name=’Name’ />";
$query.Webs
= "<Webs Scope='SiteCollection'>"
$query.Lists
= "<Lists ServerTemplate='850'/>"
$query.Query
= "<Where>
<Contains>
<FieldRef Name='PublishingPageLayout' />
<Value Type='URL'>PageLayout</Value>
</Contains>
</Where>"
$spListItems
= $site.rootweb.GetSiteData($query)
#Write-Host $spListItems
foreach($row
in $spListItems.Rows)
$listId
= $row["ListId"]
$webId =
$row["WebId"]
$childWeb
= $site.OpenWeb([GUID]($webId))
$pagesList
= $childWeb.Lists[[GUID]($listId)];
$itemUrl
= $childWeb.Url
+ "/"
+ $pagesList.RootFolder.Url
+ "/"
+ $row['FileLeafRef'].Split(';#')[2]
$listItme
= $pagesList.GetItemById($row.ID)
$listItme['RTC']
= $listItme[Name']
[Microsoft.SharePoint.SPSecurity]::RunWithElevatedPrivileges({
$listItme.SystemUpdate()
$childWeb.Dispose()
$site.Dispose()
else
Echo $webApplicationURL
"does not exist, check the WebApplication name"
Regards
Amol
amol -
How to Update the oracle toad column value in table by using SSRS 2008
Hi Team,
How to update the oracle DB table column value by using SSRS 2008.
Can any one help me on this.
Thanks,
Manasa.
Thank You, Manasa.VHi veerapaneni,
According to your description, you want to use SSRS to update data in database table. Right?
Though Reporting Services is mostly used for rendering data, your requirement is still can be achieved technically. You need to create a really complicated stored procedure. Pass insert/delete/update and the columns we need to insert/delete/update as
parameters into the stored procedure. When we click "View Report", the stored procedure will execute so that we can execute insert/delete/update inside of the stored procedure. Please take a reference to two related articles below:
Update Tables with Reporting Services – T-SQL Tuesday #005
SQL Server: Using SQL Server Reporting Services to Manage Data
If you have any question, please feel free to ask.
Best Regards,
Simon Hou -
I've moved my Aperture library from one computer to another using Finder.
I merged the library with one which was already on the computer.
Now, the photos I imported have reference to the old path name on my old computer.
How can I update these references as "Relocate Masters" does not work in this case?Just one suggestion to be able to reconnect all at once:
Create a smart album containing the images with missing masters:
File -> New -> Smart Album, and add a rule: File Status is "Missing" (or File Status is "offline")
Then select the images in this album and go to the File menu:
and select: File -> Locate referenced File
If you are lucky, Aperture will reconnect all at once, if you point the first image version to its counterpart. -
How to update Tr code FB02 and update the field reference key1 (bseg-xref
Can any body
help me how to update Tr code fb02
and update the field reference key1 (bseg-xref1) with the interest amount
calculated.
Below i have written My program flow logic
The program should read the open items i.e debit items in the customer account,
Based on the invoice date and customer payment terms calculate the due date and then the interest should be calculated on that item based on the due date.
Use the transaction fb02 and update the field reference key 1 (BSEG-xref1)
with the interest amount calculated
Only consider customers whose interest indicator knb1-vzskz = 'vk'.
Interest is to be calculated for every 30 days
at the rate of 1% .please see example below.
Document date is 01.01.2007
for amount 1000SGD payment term 7 days
It becomes due on 08.01.2007
until 06.02.2007 you should not consider for calculation of interest
SGD on 7.02.2007 run you can consider this item for interest calculationHi Robert,
Thanks for answering.
I am looking at Ref 2 should flow automatically to clearing document from the accounitng document for billing.
Ex: Billing document is created and accounted. Ref 2 is AB
Now when receipt is accounted for this biling document this AB should flow automatically to Ref 2 field.
Thanks
NNS. -
How to update managed metadata column for all file in document library using powershell
Hi,
How to update managed metadata column for all file in document library using powershell?
Any help on it.
Thanks & REgards
Poomani SankaranHi TanPart,
I have changed the code which you have give in order to get the files from SharePoint 2010 Foundation Document Library.But i am getting below error in powershell.
Property 'ListItemCollectionPosition' cannot be found on this object; make sure it exists and is settable.
Could you tell me which is the issues in it?
See the code below.
$web = Get-SPWeb http://ntmoss2010:9090/Site
$list = $web.Lists["DocLib"]
$query = New-Object Microsoft.SharePoint.SPQuery
$query.ViewAttributes = "Scope='Recursive'";
$query.RowLimit = 2000
$caml = '<Where><Contains><FieldRef Name="Title" /><Value Type="Text">Process Documents/Delivery</Value></Contains></Where>' +
'<OrderBy Override="TRUE"><FieldRef Name="ID"/></OrderBy>'
$query.Query = $caml
do
$listItems = $list.GetItems($query)
$spQuery.ListItemCollectionPosition = $listItems.ListItemCollectionPosition
foreach($item in $listItems)
#Cast to SPListItem to avoid ambiguous overload error
$spItem = [Microsoft.SharePoint.SPListItem]$item;
Write-Host $spItem.Title
while ($spQuery.ListItemCollectionPosition -ne $null)
Thanks & Regards
Poomani Sankaran -
How to update html file in clob column in oracle
hi,
please help me how to update html file in clob column in oracle
ThanksThis is your main query as i am able to understand and you want to update your html file into terms columns based on conditions :
SELECT b.terms As terms
FROM chklst_item_x_enrlmnt_type a, prvdr_enrlmnt_agreement b
WHERE a.enrlmnt_type_cid = 1
AND a.chklst_item_cid = b.chklst_item_cid
AND a.chklst_item_cid = 79
AND a.oprtnl_flag = 'A'
AND b.oprtnl_flag = 'A'
AND TRUNC (SYSDATE) BETWEEN b.from_date AND b.TO_DATE;So i suggest below one but you need to create a directory where you can store your html file and then you can update .. And remaining consult Experts suggestions too as your
question is improperly posted . . .
DECLARE
vclob CLOB;
v_bfile BFILE := BFILENAME ('YOUR_DIR', 'filename.html');
BEGIN
SELECT b.terms
INTO vclob
FROM chklst_item_x_enrlmnt_type a, prvdr_enrlmnt_agreement b
WHERE a.enrlmnt_type_cid = 1
AND a.chklst_item_cid = b.chklst_item_cid
AND a.chklst_item_cid = 79
AND a.oprtnl_flag = 'A'
AND b.oprtnl_flag = 'A'
AND TRUNC (SYSDATE) BETWEEN b.from_date AND b.TO_DATE
FOR UPDATE;
DBMS_LOB.fileopen (v_bfile);
DBMS_LOB.loadfromfile (vclob, v_bfile, DBMS_LOB.getlength (v_bfile));
DBMS_LOB.fileclose (v_bfile);
END;
/ Regards.. -
How to obtain the updated column name in a trigger?
Hello everyone,
I need to know for audit propose the updated column name in a After Update Trigger on a Table.
The table have more than 20 columns, and i think that do more than 20 conditions asking for the difference between the :new value and the :old value is not the best way.
Thanks for the help!
LCJHi,
Thanks to all for the replays.
I didn't know that i can pass the column name to the UPDATING. This is only possible on 10g??
Any way, i pass the column name and works fine, but i have another issue because of that.
I obtain the column name from a cursor that query user_tab_columns view, when i try to obtain the value of the :old or :new, i can't because i don't know how to obtain the value of the value.
This example show better:
DECLARE
vOldValue Varchar2(50);
Cursor cur_Column_Names Is
Select COLUMN_NAME
From User_Tab_Columns
Where TABLE_NAME = 'table_name';
BEGIN
For var_cursor In cur_Column_Names Loop
If Updating(var_cursor.COLUMN_NAME) Then
vOldValue := '?'; -- How obtain the value of the :old. + >var_cursor.COLUMN_NAME??
End If;
End Loop;
END;Thanks to all for the help.
LCJ -
How to update Reference field in the clearing document
Hi Friends,
While accounitng for billing document for sales Reference Key 2 is used for a data.
Now when the payment is recieved from customer and accounted, how to update the Ref 2 automatically from the primary document.
Pl, suggest.
Thanks
NNSHi Robert,
Thanks for answering.
I am looking at Ref 2 should flow automatically to clearing document from the accounitng document for billing.
Ex: Billing document is created and accounted. Ref 2 is AB
Now when receipt is accounted for this biling document this AB should flow automatically to Ref 2 field.
Thanks
NNS. -
How to update a column using hibernate
how to update a particular column using hibernate..
iam using oracle databaseI think you didn't get the point. This is a generic Java forum... not a Hibernate forum.
-
Hello Everyone,
How to update zero to a column value when record does not exist in table but should display the column value when it exists in table
Regards
Regards Gautam SAs per my understanding...
You Would like to see this
Code:
SELECT COALESCE(Salary,0) from Employee;
Regards
Shivaprasad S
Please mark as answer if helpful
Shiv
Maybe you are looking for
-
How to publish Work Manager 6.0 on SMP3.0 ?
Hi SCN Community, I'm trying to get the Work Manager 6.0 running on SMP 3.0 (running on Linux). Currently the events.log within the Agentry folder states, that the Agentry Server was started. But If I look into the Threads*.log I see there might be a
-
This suddenly started a couple of days ago.
-
Major problems when first downloading tunes to a Nano
Has anyone had problems with XP when first downloading tunes from I Tunes to a new 8GB Nano? My friend's PC (which is brand new and top spec) has all but locked up, with a flashing screen, really pixelated display with dots and unclear images, slow r
-
Time Machine Backup History Disappeared
Hi, since I moved to a new place, Time Machine did only one partial backup (with errors) and since then, I'm also unable to make any backup to Time Capsule ("not enough space"). I can't see my old backups as well (only this partial). I checked a post
-
Targus comfort bluetooth mouse won't connect
Hi, just bought Targus bluetooth mouse: http://www.targus.com/us/productdetail.aspx?sku=AMB09US However, my computer is not able to recognize it. When I try to connect it to the different computers, it works without problems so the problem must be on