How to Provide where clause condition in Sql Query of a View
Completed
Hi Yellow Fin Team,
How can we specify a where clause condition while creating a View.
If you click on Model Tab of a View, will see all the Tables with there relations, Click on Table settings, we can make use of conditions but this is used only for particular Table not for the entire SQL statement.
Scenario : I have Table with status as Priority 1 (5 Records), Priority 2 (5 Records) and some data with Null (5 Records), The data with null value should be updated to Priority 2.
So when i make count while processing report it should show
Priority 1 (5 Records), Priority 2 (10 Records)
But its not possible directly if i use and Calculated fields then also its not able to sum.
Kindly required your help
Thank You.
Files:
Incident.png
Hi Sairamreddy,
Unfortunately I am a bit confused as to what you are looking for here. Would you be interested in scheduling a time to screen-share? If so, please let me know what time works best for you. I am on United States Mountain Time.
Regards,
Nathan
Hi Sairamreddy,
Unfortunately I am a bit confused as to what you are looking for here. Would you be interested in scheduling a time to screen-share? If so, please let me know what time works best for you. I am on United States Mountain Time.
Regards,
Nathan
Hi Sairam,
Applying a where clause in the view query depends highly on what you are trying to achieve, what exactly would you like to filter on through this clause?
Typically the best way to apply filters over the entire view is to employ access filters which allow you to limit data by what user/client organization is accessing the data. http://wiki.yellowfin.com.au/display/USER73/Access+Filters
Other than this, your best bet will be to apply these filters at the report level.
From my understanding the "null values" and "where clause" are separate issues, can you please elaborate a bit on this?
Regards,
Nathan
Hi Sairam,
Applying a where clause in the view query depends highly on what you are trying to achieve, what exactly would you like to filter on through this clause?
Typically the best way to apply filters over the entire view is to employ access filters which allow you to limit data by what user/client organization is accessing the data. http://wiki.yellowfin.com.au/display/USER73/Access+Filters
Other than this, your best bet will be to apply these filters at the report level.
From my understanding the "null values" and "where clause" are separate issues, can you please elaborate a bit on this?
Regards,
Nathan
Hi Sairam,
Have you had any luck in resolving this?
One additional thought here is to employ filter groups, which make the application of common filters far simpler than creating them for each report. Please let me know if there is anything I can do to help here.
Regards,
Nathan
Hi Sairam,
Have you had any luck in resolving this?
One additional thought here is to employ filter groups, which make the application of common filters far simpler than creating them for each report. Please let me know if there is anything I can do to help here.
Regards,
Nathan
Hi Sairam,
I am going to set this ticket to closed for now, but if there is anything else I can do to help here, please just let me know and the case will be re-opened!
Regards,
Nathan
Hi Sairam,
I am going to set this ticket to closed for now, but if there is anything else I can do to help here, please just let me know and the case will be re-opened!
Regards,
Nathan
For anyone in 2025 looking for the answer to this. The where clause is in the condition on the primary table. For demonstration purposes, if you build a view and then enter a condition on the first table using drag and drop, the condition will populate in the where clause. If the table is a joined table then the condition stays local to the table join.
Virtual table conditions currently drops to the where clause so try to avoid those.
For anyone in 2025 looking for the answer to this. The where clause is in the condition on the primary table. For demonstration purposes, if you build a view and then enter a condition on the first table using drag and drop, the condition will populate in the where clause. If the table is a joined table then the condition stays local to the table join.
Virtual table conditions currently drops to the where clause so try to avoid those.
Hello Larry
Greetings of the day
Thank you for contacting Yellowfin support. I have noted your response regarding this case. I would like to clarify that when creating a view in Yellowfin, any conditions applied to the primary table will be reflected in the WHERE clause of the SQL statement. Conversely, if conditions are applied to a joined table, they will remain specific to that table join, meaning they will be included in the ON clause of the join.
Understanding this behavior is crucial, as placing conditions in the WHERE clause can alter the nature of the join. For instance, a LEFT JOIN with a condition in the WHERE clause may effectively transform into an INNER JOIN, which might not be the intended result.
I see that you have already submitted a new question ticket to log this as an idea, and our team is currently reviewing it. Additionally, this ticket has been reopened after a considerable time. Please let me know if we can proceed to close this case or if you require any further assistance.
Sincerely,
Siddartha Pathi
Yellowfin Technical Support Engineer
Hello Larry
Greetings of the day
Thank you for contacting Yellowfin support. I have noted your response regarding this case. I would like to clarify that when creating a view in Yellowfin, any conditions applied to the primary table will be reflected in the WHERE clause of the SQL statement. Conversely, if conditions are applied to a joined table, they will remain specific to that table join, meaning they will be included in the ON clause of the join.
Understanding this behavior is crucial, as placing conditions in the WHERE clause can alter the nature of the join. For instance, a LEFT JOIN with a condition in the WHERE clause may effectively transform into an INNER JOIN, which might not be the intended result.
I see that you have already submitted a new question ticket to log this as an idea, and our team is currently reviewing it. Additionally, this ticket has been reopened after a considerable time. Please let me know if we can proceed to close this case or if you require any further assistance.
Sincerely,
Siddartha Pathi
Yellowfin Technical Support Engineer
Replies have been locked on this page!