Showing posts with label includes. Show all posts
Showing posts with label includes. Show all posts

Wednesday, March 7, 2012

Help with outer join query please!

I have a MSDE query that includes a "left outer join..." clause. It runs fine in MSDE Query (a 3rd party GUI tool) and produces 12 rows. column 3 has some NULL values (because of the outer join).

But when I use the same query in an ASP.NET page, and display the result in a datagrid, it only displays 7 rows - the rows with the NULL value in column 3 do not display.

Is there a parameter somewhere in datagrid or dataset that I should be setting?

thank you someone!there should be an AllowDbNull afaik|||


private void AddNullAllowedColumn(){
DataColumn myColumn;
myColumn = new DataColumn("classID", System.Type.GetType("System.Int32"));
myColumn.AllowDBNull = true;
// Add the column to a new DataTable.
DataTable myTable;
myTable = new DataTable();
myTable.Columns.Add(myColumn);
}

maybe a foreach (DataColumn column in DataGrid.Columns) { or datatable.
you can specify that.

Monday, February 27, 2012

Help with multiple counts..

I have a application table that I have turned into a cube. It includes attributes of a organizaiton name, month, and year. This all works fine.

I would like to add another table to the cube that counts a visits. It also has attributes of organization name, month and year.


I am confused where I make the associations so they can operate in the same cube.

Do I join the tables in the datasource and just add the measure in the cube? Do I add a new dimention in the cube?

Any help in this area would be great. I am basically looking for a cube like so..

Month Year

Organization Name ApplicationCount (From the application table)

Visit Count (From the visit table)

Thanks in advance,


Mardo

If it has a similar structure, just a different measure, then you could add this table as a separate measure group with a measure in it that maps to the Visit Count. If these two table are completely identical you might be able to join them with a view or a named query in the DSV so that Visit Count is just added as an extra column to the existing cube, this might be a more efficient approach.