Please help me!I dont know why i cant solve this simple problem.
I wanna read my sequence that I made it in my database and add it to my text Item.
any idea?(with code plz)
right know I write a cursor and call my sequence by a select from it but i dont know what should I do after it :(
In Forms if you want to enter the value of a sequence into an item (named :BLOCK.ITEM) this would work:
SELECT your_sequence.nextval INTO :BLOCK.ITEM FROM DUAL;
Related
So I am having a dbgrid that is used as a data entry.
Assume I got 4 fields that needed to be filled by user and another field that I need to assign a value into. Look at the picture.
I connected that dbgrid to query1 through datasource1.
my question is, how did I assign a certain value (ex:abc) to idpay field so that it will be read without user inputing it?
As dbgrid is automatically posted, I need to assign that value on event beforepost. any idea how to do that?
any help is much appreciated! Thank you!
Does the Query component you use has the AfterInsert event ?
If so than simply do something like this
procedure TForm1.ClientDataSet1AfterInsert(DataSet: TDataSet);
begin
DataSet.FieldByName('IDPAY').AsString := 'ABC';
end;
When I issue a query like select * from city; using oracle sql developer in mac I get the output that is not aligned and it is very hard to read. How do I get the grid view and set it as default?
Sounds like you're getting the script output. You can have that formatted nicely by using SET SQLFORMAT ansiconsole, we'll make the columns line up as nice as possible based on the size of the display.
But if you want the data back in a grid, use Ctrl+Enter or F9 or the first execute button in the toolbar to execute.
This will get you the output in a grid, like this:
I talk about both executing as a script or statement here.
If your issue is with formatting, you may want to look at this link
If your issue is with records not getting inserted, please note these.
Records inserted in one session will not be visible in another session unless they are committed.
If you are checking the count in the same session where you inserted the records, then check for errors in insert. Add a show errors command at the end of your script, "path_to_file.sql" to check if any errors occurred while inserting the records.
Hope this helps.
I've made the mistake of using the 'Calculate and Replace Column' feature to replace the wrong column, and realized after the fact. The column I replaced corresponds to last names and is important. I would like to retrieve this column but maintain my other 15 or so data transformations. Ideally, I would like to remove this transformation, but I've come up empty so far. Here's what I've tried:
I tried adding the 'last name' column again from the same external source, using >Insert >Columns... I also tried renaming this column to avoid the data transformation. Unfortunately, this resulted in an entirely empty column, so it did not successfully match to the table or was affected by the transformation..
I checked the source information, and found exactly the 3-4 lines that I wish were not there. I thought it might be possible to edit this but haven't found a way. This seems like it would be the easiest.
Another idea I had was I could replace the data table with the same source, and repeat all of the transformations from the replace data table dialogue (excluding the bad one). This is my next plan of attack, but I figured I would come on here to see if there's an easier way first.
Thanks in advance!
Good News for YOU!!! #jeremyVollen.
It is possible to 'edit' your transformation per Tibco article 44098.
Resolution: If there are more then one transformations on a data table and you need to edit any of those transformation, follow the steps below:
Go To Edit >> Data Table Properties.
Select the desired data table inside which the transformation has been added and click on Refresh Data > With Prompt.
A new window will pop up which will allow you to make the desired changes in each of the transformations.
unfortunately it is NOT possible to reverse data table transformations.
it IS possible to undo the transformations with Edit>>Undo or CTRL+Z, but that's as far as it goes.
my strategy for dealing with this is (in accordance with your #3) to visit Edit>>Data Table Properties, select the table I'm interested in, select Source Information, then copy the contents of the textarea and paste it into notepad. then, I'll File>>Replace Data Table and start over from the beginning while keeping the notepad open so I don't miss any steps.
I realize it's not ideal, but there is unfortunately not another way.
I am trying to find a way to get a distinct count on a field that is being filtered by a territory without using grouping because of the fact that I need to then pass this value over to another report. The easiest way would be something like this:
distinctcount({Comm_Link.CmLi_Comm_CompanyId}) if {Company.Comp_Territory}='Atlanta'
But for obvious reasons that won't work. Any thoughts?
what you have to do is a running total. Right click on {Comm_Link.CmLi_Comm_CompanyId} insert running total, type of summary will be distinct count and on evaluate where says Use a formula type your condition {Company.Comp_Territory}="Atlanta"
your formula and approach is wrong.. I doubt whether your formula compiled with out any errors...
first create the value and then find the distinct count
if {Company.Comp_Territory}='Atlanta'
Then {Comm_Link.CmLi_Comm_CompanyId}
Now in footer write or you can get it by right click on the filed.
distinctcount({Comm_Link.CmLi_Comm_CompanyId})
How can I select a table column by column header name with XPath?
My attempt is:
//table/tbody/tr/td[count(//table/thead/tr/th[.="$columnName"]/preceding-sibling::th)+1]
This is not working.
It always selects the first column no matter what value I provide for $columnName.
There is barely any information in this post, but my educated guess would be that
count(//table/thead/tr/th[.="$columnName"]/preceding-sibling::th)+1
is always equal to 1 because you use $columnName in quotes - which makes it a string, not a variable.
If this is indeed the problem, using
count(//table/thead/tr/th[.=$columnName]/preceding-sibling::th)+1
would solve it. If it doesn't, you really need to give more information - show the whole input document, indicate the programming language, show all of that code.