I am using SSIS in visual studio for a data analysis task where I am comparing two databases
and trying to identify records that appear in one set and not the other. I have enabled dataviewer to see the details of the records however not all the records appear. For example in the attached image there is a difference of 20 records however only 18 appear. I have pressed the green play button but no more appear. Does anyone have any idea how to fix this?
My first guess would be that you've already clicked the Play symbol and the first 2 rows were displayed although I'm not 100% sold on this explanation as I would expect it to display 18 rows then 2.
Quick attempt at a repro. This should page 4 times
SELECT TOP 25 row_number() OVER (ORDER BY (SELECT NULL)) AS rn
,replicate('x', 4000) AS c2
FROM sys.all_columns
We can observe that total rows are cumulative so the next probable explanation would be an error was generated such that the 2 other rows weren't able to be sent to the Data Viewer.
Without seeing your package, it'll be difficult to reproduce this. Were it me, I'd
Add a Multicast operation before the data viewer. This allows the package to run "normal." Then add a second output to the multicast and route it to a new flat file destination. Run package, get the 20 rows, 18 displayed situation and compare that to the flat file output.
Related
I'm a beginner for tableau. I want to get the direct numbers for each row, but i get the number which are separate, how can i achieve this?
I've tried the sentence like:count("Implemented"), but I don't get the result I want.
For example, for the 1st row I want 3 10 10
not 111 10 112111111
Here is worksheet.
My code:
EDIT :
here is the photo for implementation opportunities
As you can see, the status is related to the date, I think maybe it causes the records which are counted 1by1.
Now the situation is that: i create the code which is related to the date, if i remove this from mark, it will cause the problem (the code is related to the date), but if i leave it, the system will always count it one by one. My code is not perfect but i can't find another one which can replace it.....
EDIT 2:
in short,what i want is the sum of the remaining opportunity:10
capture
Remove DAY from Mark shelf. That detail is producing those separations.
Attaching a workbook with numbers similar to (but not exact due to proprietary issues) is almost always advised. You will get the right answer a lot sooner than just screenshots.
In any case, it seems as if the measure portion of the visualization is properly being summed by the date. Try selecting the measure, and manually selecting "sum" from the menu drop down. Here is a link for more detail.
Secondly, you can play around with table calculations. Click this link and read up on option 3.
I have a query from another thread which goes through a list of different events and pulls out the most recent event and puts it into a list. The code I'm using is:
SELECT Cleaning1, Max(Date1) AS most_recent
FROM CleaningLog
GROUP BY Cleaning1;
Cleaning1 is the column that has the different cleanings, and Date1 is the column that has the date the cleaning occurred, and CleaningLog is the name of the table. I currently have a macro in Access which is an OpenQuery, query. I am having it open the above query, and then having it view as a data sheet and it's in edit mode.
What I am stuck on, is getting a subsequent macro/query/vba code to take the datasheet the query produces and going through each item and determining if they're over due to be cleaned. I tried having a Make Table query, but the problem is, there is no user friendly way to refresh that table without having to delete it (I am having unskilled workers use this Access sheet).
I am wondering if there's a way to look at the most recent cleaning's date, what the query produces, and filter the dates out that are over due for a cleaning, specified by a parameter. I have been looking at this webpage to start playing with the notation, but I haven't been able to come up with much that is useful.
https://support.office.com/en-us/article/Examples-of-query-criteria-3197228C-8684-4552-AC03-ABA746FB29D8
Another problem that I am encountering is that each cleaning doesn't have the same time frame in which is needs to be cleaned.
Thank you in advance for any help!!
You should just be able to modify the query above to show entries with a max date lower than they should be. Below shows entries that haven't been cleaned in 30 days, for instance.
SELECT Cleaning1, Max(Date1) AS most_recent
FROM CleaningLog
GROUP BY Cleaning1
HAVING Max(Date1) < Now() - 30;
I have to work on an application in which we are getting list of orders(with all details and display_time) and we have to show them in list view, but the condition is we have to show particular order on their exact display_time.
For example below are some orders with display time:
order_id: 101 |
display_time (hh:mm:ss): 09:10:00
order_id: 102 |
display_time (hh:mm:ss): 09:30:00
Then the requirement is:
We have to show the orders on list on exact their display time.
All order should come instantly as they entered in database.
Edit
The first thing that I need is:
To get the order from database (SQL Server) instantly without hitting
any API. Like push notification.
Then the second need is:
To compare the device's time and order's display_time and if its matched then make visible the order in ListView. I have to do this for each order i think.
I don't know how can I do this.
So please suggest how can we do the above task.
I hope I understand correctly. Mainly you want the list of items to be in the order of time from earliest to latest.
Here is one algorithm and it could be enhanced.
Allocate 100 (arbitrary) items/rows in the Listview.
If you only have 2 items or orders initially, make the other 98 rows not visible (state).
If a new order is entered, add the new order into one of the non-visible rows. And make it visible of course.
The issue in this case, you may have to reorder the items above the new order. However this is only a manipulation of text in your rows. A data structure is necessary to support this.
I claim this algorithm is fast. I think this is a good start.
I am working on putting finishing touches on a tool after a developer abruptly quit and left no documentation. I have been able to fix everything except for the following.
I am creating a bar chart using data from a select query:
Date Facility Bucket Variance
2/5/15 A >$10k >90 -2.1234
2/5/15 A >90 -10.567
... ... ... ...
Using the chart wizard, I select Data: Variance, Axis: Bucket, Linked fields: Facility, Date (users can select these from the main form).
The chart itself looks perfectly fine, but in the main form a navigation bar appeared, giving me the option to switch between 6 records. Switching changes the graph in no way, shape or form.
http://i.imgur.com/qq6xiqi.png
While I can disable/hide the bar, whatever thing caused it to believe there were six unique records makes it print the same chart 6 times when printed or sent to PDF.
http://i.imgur.com/la9JBCs.png
Any idea what is causing this, and how I can prevent it?
Thanks!
EDIT: I should add that there are 6 unique values for facility and bucket. Date, Facility and Bucket make up the primary key for their table.
EDIT2: It's the Bucket causing this. Joining a facility filter table with the query did nothing.
EDIT3: Record Source query
SELECT tbl_Trending_Data.Date, tbl_Trending_Data.Facility, tbl_Trending_Data.Bucket, IIf([Target] Is Null,Null,[Days]-[Target]) AS Variance
FROM tbl_Facility_Filter INNER JOIN tbl_Trending_Data ON tbl_Facility_Filter.Facility = tbl_Trending_Data.Facility
ORDER BY tbl_Trending_Data.Bucket;
Change your recordsource query to:
SELECT TOP 1 tbl_Trending_Data.Date, tbl_Trending_Data.Facility,
tbl_Trending_Data.Bucket, IIf([Target] Is Null,Null,[Days]-[Target]) AS Variance
FROM tbl_Facility_Filter
INNER JOIN tbl_Trending_Data
ON tbl_Facility_Filter.Facility = tbl_Trending_Data.Facility
ORDER BY tbl_Trending_Data.Bucket;
You need to limit it to TOP 1 so that you're only looking at the first row. That will stop the program from printing multiple records/charts.
I have a problem with a BIRT report I'm working on where I have a nested table in the report. The outer table contains data to do with an item on an invoice, while the inner table contains stuff to do with price banding for labor charges. I've written a separate DataSet which gets the inner data, bound by parameters to data in the outer table. Now, when I preview the inner DataSet in BIRT using the defaults I've given it, it returns two rows of data for that bill number & item number - a normal rate & an overtime rate if you like. When I run the report in full over the same data, the outer table stuff is fine, but the inner table just repeats the same row over twice - it's just the first row repeating.
This is sorta what the table looks like in layout view:
Item Description Rate Quantity Item total
[item] [desc] [rate] [quantity] [total]
...where the price & quantity are in the inner table.
I'd have expected to see something like:
Item Description Rate Quantity Item Total
1 Callout $40 1 $40
2 Labor $30 4.5 $185
$50 1
but instead I get more like:
Item Description Rate Quantity Item Total
1 Callout $40 1 $40
2 Labor $30 4.5 $185
$30 4.5
...even though querying the database & previewing the inner data set based on the same input criteria show the expected result.
Has anyone else had experience like this? I have a hunch it's to do with bindings, but not sure what.
One way to get this behavior is by accidentally replacing a table-level binding with a column-level binding.
For example, define a table by dragging a data set into the report. Select the entire table (use the outline view, or select something in the table and then click on the "Table" button that pops up just below the grid.) Then go to the Binding tab. Note that the data set and column bindings are all filled in.
Now select just one field in the Detail row. On the Binding tab, note that the Data Set is blank, and no column binding is shown. Someone who is confused by this (as I was) might then edit the column's binding and specify the same Data Set that was used to create the table. If you do this you will only see a single value repeated in that column when you run the report. (I believe the overridden column is binding to a second instance of the data set, not the one the table is iterating over.)
Not sure your question can be answered withou looking at the data and the design. But it is important to note that the results you see in the dataset preview, and not neccisarly what you would see if the query was run fully. I have seen difference with 7 records returned. I thought as it was only 7 it would be the same on full run, but it's not. The preview is not just a top 500 query, it has some other (not sure what) filters also.
To problem solve if it is your query or your binding.
If you are using a SQL database. Run the SQL in a SSMS query and see if you get the same results you do when run in the innner table.
Altentively, create a new test report, copy over your dataset and use with a stand alone table.
I think I sorted it, & this is the most bizarre thing: On the child table I'd been deleting the header & footer row & just leaving the detail row in, in the layout view. Last thing today, just before I was going to go home, I tried again - deleted the table for about the 70th time that day, replaced it, re-did the parameter bindings all exactly as before, but this time I left the header row & footer intact. Clicked the preview tab, voila, all shows up correctly. So, since I didn't need the header or footer on the child table, I went into properties, clicked Hide this element, preview again - all good. No difference to the data bindings, no difference to mappings or anything else, no change to the data sets - the only difference was leaving the header & footer in place but hidden.
Contemplating making a bug report, tbh.