I recently asked the following question and received a wonderful answer: SQL: Dynamic view with column names based on column values in source table
As someone not familiar at all with BusinessObjects, is there any way to perform this in InfoView? Would I have to edit the universe?
Sorry, I know this is a terrible question... but we're in a bind.
This might be possible via a derived table in the universe. A derived table allows you to write a custom query to provide objects in the universe.
I don't think so. It would require the dynamic creation and destruction of objects.
Related
MySQL Documentation explains how to create a view. However it doesn't explain why should I make a MySQL View in the first place.
Thus, my question is, what is MySQL View? What is it for? At what circumstances should I make or not make one?
Quoting the documentation
The view definition is “frozen” at creation time and is not affected by subsequent changes to the definitions of the underlying tables.
I don't see how creating a view would be beneficial, so please, enlighten me.
View the data without storing the data into the object.
Restrict the view of a table i.e. can hide some of columns in the tables.
Join two or more tables and show it as one object to user.
Restrict the access of a table so that nobody can insert the rows into the table.
Where I work, we use the views as big painful querys that we need many times, we decided to create views for them instead of doing a manual query and when we need to access the information
SELECT * FROM view WHERE (anything)
Im getting confused on this day fixing the database for having the consistent field name.
When i want to name the field to explain: the name of the one who locked, or hidden the post.
What's the field should i use?
locked_by_username , lock_by_username or lock_username
hidden_by_username , hide_by_username or hidden_username ?
Present tense or past tense? and should i use by inside the field name, does it a bad practice?
I see many database use post_username or poster_username to describe the username of the one who posted the post.
But with lock and hide verb, i can't see any the good way for describing it.
Sorry, i know this is a really stupid question, but English isn't my native language.
Whether your native language is Kiswahili or Klingon or English, what you want here are column names that describe current state. For example username_holding_lock means the column contains the name of a user holding a lock on the row.
Somebody using a tool to troubleshoot by doing SELECT * will then be able to guess what's up when the value TomSawyer appears on some row.
I think this is more opinion based but I generally would use camel case.
I personally would use:
HiddenByUsername
LockedByUsername
A good idea might be to look at some of the Microsoft sample DB's.
A example would be the AdventureWorksDB or you can look here
http://codeplex.com/SqlServerSamples
I have a pivot table, say PivotA, and another table left joined to its primary key, say TableB. I need to edit TableB in the pivot view.
Is it possible to edit the contents of a pivot table at all? When I try to edit a cell from either source, it tells me the recordset is not updateable. It's a very vague error and I haven't found any causes relating to what I'm doing. Even if I recreate the pivot without TableB, I get the same thing.
An updateable record source is one that fulfills a few standards to ensure that Access knows precisely which row needs to be edited. Unfortunately, one of those limitations is that it cannot be updated in an aggregation or calculated field. I believe in most if not all cases, a pivot table is an aggregation of the underlying data. So by design, you will not be able to update data in a pivot table.
Here is a link that may help understand your error: Updateable records
Sorry hate to break it to you but the Access team decided to drop Pivot Tables in 2013. See: https://technet.microsoft.com/en-us/library/cc178954%28v=office.15%29.aspx?f=255&MSPPError=-2147217396
You can see a walk through of alternatives suggested by Microsoft Here: https://youtu.be/VxDWIQaO5Pg
I have to build this retail site, and aparently all the properties info comes from a third party company. Everything looked fine, they sent me a .mdb file with all the tables (which convert to a .sql file), and later I get emailed with data to update those tables.
What confused me was the fact that a few of these tables already have values in them. And when looking at the documentation, it says that I will also get emailed 'dictionary tables'. It says: "These tables contain fixed values in reference to value tables".
I have googled and searched here at stalkoverflow but couldnt find an answer. What I read was something about 'sas' and 'proc sql' which I haven't heard before.
Could someone please explain me (or kindly point me to some understandable documentation) what this tables are (are they in fact tables?), and how can I use them to build my site? I also use Codeigniter, can I use active records on them? Or what would be the correct SQL to access that table? I'm pretty much lost here :(
I use Codeigniter 2.x and Mysql.
Thanks guys, I will be infinetely grateful for your help.
Two guesses:
a data dictionary provides information about tables in a database:
field names, field types, field sizes
stored procedures associated with certain tables
OR
simply a fixed table that provides lookup or validation for a separate updatable table.
I'm working with a third party software package that is on it's own database. We are using it for the user management back bone on our application. We have an API to retrieve data and access info.
Due to the nature of information changing daily, we can only use the user_id as a pseudo FK in our application, not storing info like their username or name. The user information can change (like person name...don't ask).
What I need to do is sort and filter (paging results) one of my queries by the person's name, not the user_id we have. I'm able to get an array of the user info before hand. Would my best bet be creating a temporary table that adds an additional field, and then sorts by that?
Using MySQL for the database.
You could adapt the stored procedure on this page here to suit your needs the stored procedure is a multi purpose one and is very dynamic, but you could alter it to suit your needs for filtering the person table.
http://weblogs.asp.net/pwilson/archive/2003/10/10/31456.aspx
You could combine the data into an array of objects, then sort the array.
Yes, but you should consider specifically where you will make the temporary table. If you do it in your web application then your web server is stuck allocating memory for your entire table, which may be horrible for performance. On the other hand, it may be easier to just load all your objects and sort them as suggested by eschneider.
If you have the user_id as a parameter, you can create a user defined function which retrieves the username for you within the stored procedure.
Database is on different servers. For all purposes, we access it via an API and the data is then turned into an array.
For now, I've implemented the solution using LINQ to filter and out the array of objects.
Thanks for the tips and helping me go in the right direction.