Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I'm trying to create an e-mail subject line, based on data in a cell which references another cell.
For some context, I work for an airline (not in IT you will be glad to know!) and I am trying to create a system which saves us from having to type things out, over and over again!
Desired output.
User selects "Live" or "Not Live" flight from list.
If user selects "Live", the airport code (stored in a different cell) is to show.
If user selects "Not Live", the airport code (stored in a different cell) is not to show.
I managed to put together an IF statement for the first leg, which just consisted of one flight, however I'm now struggling to find an efficient way for the other 5 sectors.
Example.
To make things a bit easier to understand, I will refer to each airport as A, B, C, D, E and F. In real life, these would be 3 letters, like Heathrow is LHR for example.
Sector 1 A-B - Not Live
Sector 2 C-D - Live
Sector 3 E-F - Not Live
Sector 4 F-E - Live
Sector 5 D-C - Not Live
Sector 6 B-A - Not Live
E-mail subject line format for above: C-D-F-E
I can for sure create the above off IF statements, however this would leave with: C-DF-E - If I was to work around it about put a hyphen at the end of D, then this wouldn't show correctly if the data was to change.
I need to stress that the "-" must separate each airport code but not at the start or end.
I hope you can help :)
Thanks!
I would rather do this with VBA, but this does work:
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
a Create a PL / SQL block that shows ids not assigned to employees.
b. Create a PL / SQL block where you place the department's id and return the name of the head of that department.
c. Create a PL / SQL block where you place the id of the employee and return the names of the charges it has occupied in the past.
the ponit A ITS DONE ---- all the id's are full so it does not show results.
enter image description here
the point B dont work
enter image description here
As mentioned in my comment:
Looks the dbms_output is not enabled in your session. Click on the plus sign at the end and choose the schema and then re-run the block. See below circled in red.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I have a report that runs daily. I want to send the output of this report to a csv file. Due to the nature of the report, from time to time some data can be lost (new data is generated when the job is executing so sometimes, some is lost during this process as it is a lengthy job).
Is there a way to cross check on a daily basis that there is not any data from the previous day that has been lost- Perhaps with a tick or cross at the end of each row to show that the data has not been exported as a csv?
I am working with sensitive information so cant share any of the report details.
This is a fairly common question. Without specifics, it's very hard to give you a concrete answer - but here are a few solutions I've used in the past.
Typically, such reports have "grand total" lines - your widget report might be broken down by month, region, sales person, product type, etc. - but you usually have a "total widgets sold" line. If that's a quick query (you may need to remove joins and other refinements) then running that query after you've generated the report data allows you to compare your report grand total with the grand total at the end of the report. If the results are different, you know that the data changed while running the report.
Another option - SQLServer specific - is to use a checksum over the data you're reporting on. If the checksum changes between the start and end of the reporting run, you know you've had data changes.
Finally - and most dramatically - if the report's accuracy is critical, you can store the fact that a particular row was included in a reporting run. This makes your report much more complex, but it allows you to be clear that you've included all the data you need. For instance:
insert into reporting_history
select #reportID, widget_sales_id
from widget_sales
--- reporting logic here
select widget.cost,
widget_sales.date,
widget_sales.price,
widget_sales......
from widgets inner join widget sales on ...
inner join reporting_history on widget_sales.widget_sales_id = widget_sales.widget_sales_id
---- all your other logic
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I have a simple tasks I would like to do. Using an RODBC connection I have connected R to a SQL server database. There are four tables in the database and they are tenors of Libor rates
Libor_1_mos
Libor_3_mos
Libor_6_mos
Libor_12_mos
Each table has two columns. The first column shows dates and the second column shows rates.
I would like a simple chart that plots the rates based on the dates in column 1. Straightforward - that is all that needs to be done. The x-axis should be dates (column 1) and the y axis should be rates (column 2). Note it is 5 years worth of data so showing every possible date on the x-axis may not be feasible.
Here is my work so far I am using the Libor_3_mos as an example
threemosdata <- sqlQuery(con,"select * from Libor_3_mos)
Using that line I can read the data from the table. So for instance
colnames(threemosdata)
will give me the names of the column in the table.
So this worked lovely
> date <- (threemosdata$observation_date)
> rates <- (threemosdata$USD3MTD156N)
> plot(date,rates)
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I am trying to achieve this type of Report in RDLC, in which 1 column remains fixed and it's relevant details are repeated in rows.
e.g.
ApplicantName UniqueNo Type Area Covered Amount
Mathew 87878f8d7 Commercial 21sqFt 20sqFT 20,000
829999999 Residential 88sqFT 70sqFT 90,000
865555555 Residential 90sqFT 89sqFt 80,000
John 777777777 Residential 88sqFt 85sqFT 99,000
666666666 Commercial 77sqFT 75sqFT 97,000
so far I have done this:
It looks like you want to add grouping to you report. To achieve this:
right click on detail row header
select "add group" - "parent group" (under row group)
select your "applicant name" field in "group by" dropdown
New column will be added to the left of your existing columns. Optionally you can select to add group header and/or footer. From your example, it looks like you should add footer to achieve blank line "break" between groups.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I have a table A having name of people and Table B having name of people and their membership with different organization. Is there any way I can get the total number of membership of each and every people using count function or any way?
Is there any way I can get the total number of membership of each and every people using count function or any way?
Did you try a Pivot? See screenshot below
I have taken a scenario as you mentioned in Andy G's post... with multiple memberships...
You haven't explained how SQL is involved, but if the two tables are both in Excel then you only need to count the number of times each name occurs in the second table, using COUNTIF and copying this formula down the column:
I'm assuming their membership of an organization is not repeated in the 2nd table.
Added It is more complicated knowing that the combination of person and organization repeats in the second table, but it can be done with an array formula. Use Ctrl-Shift-Enter to complete the following formula, then copy it down the column.
=SUM(IF($E$2:$E$13=A2, 1/(COUNTIFS($E$2:$E$13, A2, $F$2:$F$13, $F$2:$F$13))))
I cannot claim origination for this, a colleague of mine Rudi completed it for me.