Using String Col From Fact Tables

May 11, 2005

Hi
I have a fact table in which i have a String column now i want to show it in the mdx queries..when i add it as a measure it shows some numerical values in the cube i cannot even add it as a member propeties due to some datwarehouse design constraints..so can anyone out there help me please....it urgent
Thankx in advance
regards
Hemant

View 3 Replies


ADVERTISEMENT

Dimensions Vs. Factless Fact Tables

Jan 17, 2005

I am building a health care application that marries transaction-level data (health care services provided) with person-level characteristics that have a time-dimension. The person-level characteristics are diseases that the person has (these disease all have a start and some have an end date). The diseases are stored in a table in which the foreign keys are a person-identifier, a time identifier (month/year) and a surrogate for the disease. Persons can have more than one disease at a time (the diseases are NOT mutually-exclusive). There are no measures in this table. The transaction table has a foreign key for person and time (month/day/year), a procedure code (the type of service rendered) and money (the cost of the services).

How do I answer the following questions:

What is the total cost of care (the sum of all service costs) last year for persons with "disease A"?

What is the total cost of care last year for persons with "disease A" AND "disease B"?

What is the total cost of care last year for persons with "disease A" OR "disease B"?

I've tried a factless fact table but can't get it to work. If anyone has the right solution and can communicate to me before I slit my wrists, I would be greatly appreciative!!!

View 1 Replies View Related

Calculated Measure From 2 Fact Tables

Dec 6, 2007

I have a cube with 2 fact tables and I would like to create a calculated measure that uses values from both tables like:

fact1.measure1 / fact2.measure2

I can't see how to do this?

View 1 Replies View Related

From Dimension Tables To Fact Table

Feb 6, 2008

Hi All,

What is the best way to move data from Online system tro data warehouse?
I have created 3 dimension tables(product,date and customer tables) and
I wanna create fact table and get foreign keys from dimension tables.
What is the best method to do that in SSIS?

thanks

View 1 Replies View Related

SSIS (DImension And Fact Tables)

May 16, 2007

Hi,

I am new at SSIS and I am trying to create a Datawarehouse using SSIS. I have the data files as flat files I have the Dimensional Model ready on Paper and Now I need to use the SSIS for the ETL process.

I am trying to figure out how to make dimension tables in SSIS? I mean I want to create the 5 Dimension tables and then create a Fact table out of it but I cant understand where to start? Can any one tell me how we create Dimesion tables in SSIS. Like one of the dimesion tables I need to create uses 2 flat files and is like a flattened dimension, How would I create this in SSIS?

Even if there is any tutorial which shows this step by step do let me know. I would really appreciate any guidance on this.

Thanks,

Sarang

View 11 Replies View Related

Addding A Column To Dim And Fact Tables

Mar 6, 2008

Hi All,
I want you an urgent respones, I want to add a column to a Dim_table and Fact_table, the Dim_table is sourcing from different database table and now the new column is going to source from another DB, thus without changing the structure of the table relationship can i add a column? To make it clear Dim_table has got Clomun1 from table1, Clomun2 from table2, Clomun3 From table3, Clomun4 From table4. Now I want Clomun5 From table5. How do i add and let it source from table5.
Thank you for your qiuck response.

View 4 Replies View Related

Select Data From Huge Fact Tables

Oct 12, 2006

Hi,

I have a situation where I have 4 tables:

1. 2 Dimensional tables(Parent), DIM1 with 50000 rows, and DIM2 with 1000 rows

2. Fact 1 with 50 columns, 25 Million rows and with FK to DIM1 and DIM2

3. Fact 2 with 40 columns, and 25 Million rows and with FK to DIM1 & DIM2 tables.

Actually the fact 1 and fact 2 have same related data but since our Analysis cube person wanted the fact table not to have more than 50 columns we divided the tables into 2, but they have the same compound key.

Above said, I have a situation where I have to select all the columns, in both fact tables, and do a group by. I wrote the query and ran "Analyze Query in the Database Engine Tuning Advisor" for it. It gave bunch of recomendations about the statistics and indexes which I created. When I executed the query the result came up in matter of seconds, which was good.

In the query I had a condition having MarketName='Bridgeview' and DateID = 344 (FK of today-1).

When I wanted the data for last 30 days I changed to DateID in ( > FK of today -32 and < FK of today), the query responded and worked fine.

But when I changed the query to get MarketName='Aurora' (other than I used when I ran Tuning Advisor), the result returned is empty set. When I removed the MarketName condition, it is supposed to return all markets' data, but it returns only Bridgeview data.

I know the data is in the table for all markets, since reports are rendered from these fact tables for all of these markets(also ran queries to check the fact table data).

I am unable to point out the reason why the query behaves like this. It responds to the date change, but not to the MarketName change.

I really appreciate if anyone can help me point out the problem.

Thanks,

Venkat

View 3 Replies View Related

JOIN 2 FACT Tables And ETL With SSIS 2005

Nov 21, 2007


Hello,

I have the following Datawarehouse problem (SQL Server 2005 and SSIS 2005):

2 Fact tables and both with some foreign surrogate keys of dimensions (some of them with common dimensions, other with different dimensions).

I have to create another FACT table that is an aggregation and join table between the 2 ones.

How can I do?

View 6 Replies View Related

How To Implement Incremental Load In Fact Tables.

Feb 19, 2007

Hi all,

i have a fact table which loads through package,when
i m trying to load this table by running the package,i m truncating the
fact table and loading the fresh data,instaed of this without
truncating the fact table i have to implement the incremental logic in
this.


For this i can use SCD or Conditional split,but problem
here is i have many source tables to load this fact table,so its
very difficult to trace the changes in different source tables.

can any one help me out in this??????

View 1 Replies View Related

Loading Data Into Dimensions &&amp; Fact Tables

Jul 10, 2007

Hello Everybody,



Can anybody please let me know the procedure for loading data into Dimensions & Facts? And what is the sequence of loading?



Thanks in Advance

Rajesh

View 1 Replies View Related

Copying Dimension And Fact Tables From One Database To Another...

Dec 17, 2007

Hi there, my question is really simple. I want to setup an automatic task in SSIS that drops the tables in the target database and substitutes them with tables from the source database. We are talking about two or three dimension tables and one fact table. The dimension tables are pretty small. The fact table will contain, at maximum, 300,000 rows and 12 columns. I do not use delta or flag historisation btw. What tasks in SSIS would you suggest to use?

BTW I'm new to SSIS... ;-) Thanks in advance!

View 9 Replies View Related

Load Ordering For Dimension And Fact Tables

Sep 22, 2006

Hi ,

I have situation where I get data from SRC Flat file and have to load Dimensional table and also fact table, using same data flow(have no other choice since I have to unpivot some src data). Since I have to load both tables in same data flow, I have to have a way to put load ordering constraint (I know informatica allows that). Does any one have any idea on how this can be done in SSIS?

I would be really grateful.

Thanks

View 3 Replies View Related

Query:Source From Multiple Tables To A Fact Table

Jan 19, 2006

Greetings,

Iam new to SQLl2005. Iam using DTS to transfer data from my source to the warehouse. I have a couple of tables in my source whein I have to join these to tables fields and insert the same in teh warehouse fact table. I have used a Join query in my Oledb source component, What other component needs to be used to insert the data into the fact table.
I also need to extract same data with aggregation and insert the same into an another Fact table.

Kindly help.

View 21 Replies View Related

Analysis :: Role Playing Dimension Among Multiple Fact Tables

Oct 28, 2015

I am modelling cube in SSAS. Cube has around 20 dimensions and 6 fact tables. Some of the dimensions are common among the fact tables. e.g. Time dimension. Fact_PNL has 3 date columns for those we have 3 role playing dimensions in the dimension usages.

Another fact table has 5 date columns for them as well we have separate role playing dimensions in dimension usage tab. We have a common dimension Company which is foreign key in all fact tables. We might need to combine the data from multiple facts to get final output.

Should i create 6 role playing dimension for each of the fact table or use the same dimension for all fact tables?

Role playing dimensions should be created when we have multiple columns pointing to the same dimension ?

View 2 Replies View Related

Analysis :: Fact Tables Appearing As Dimensions In Tabular Model

Jul 6, 2015

I built my first tabular model and see that my fact tables are also appearing as dimensions. In Multi dimensional mode i could choose which are the dimensions. How do i do that in tabular model.

View 2 Replies View Related

Fact Table With 3 Keys From Dimension Tables - Avoid Populating NULLs

Jun 10, 2014

I created a Fact Table with 3 Keys from dimension tables, like Customer Key, property key and territory key. Since I can ONLY have one Identity key on a table, what do I need to do to avoid populating NULLs on these columns..

View 3 Replies View Related

Data Warehousing :: Populating Fact Tables With Surrogate Key From Dimension Table?

Sep 11, 2015

How do I correctly populate a fact table with the surrogate key from the dimension table?

View 4 Replies View Related

Analysis :: Relating Multiple Fact Tables To Find Data That Exists In One But Not The Other

Nov 18, 2015

I'm currently setting up a Tabular Model to do some research between several fact tables.  In this example i have two fact tables (table 1 and table 2) which I've created a 1 to 1 relationship on phone number.  Typically I create a relationship between these tables to find common data between the two.  However, in this case I am trying to figure out the best way to model the data so that I can easily surface data from one table that does not exist in the other.  I would liken this to a LEFT JOIN or a WHERE NOT EXISTS in SQL.

Table 1 has all of the data and Table 2 Only has a subset of the data from Table 1.  What I'm trying to do here is display what attributes in Table 1 may play a part in records not existing in Table 2. What is the best way to model this?

View 3 Replies View Related

Power Pivot :: Creating A Summary Report Using Relationship Between Date Table And Two Fact Tables

Oct 19, 2015

I have below tables in my power pivot.Fact 1 & Fact 2 - connected directly to Mainframes - Data is from the same table broken up due to size of the data.Date Table - Relation ship between both the fact tables.How do i create a summary pivot to get the number of tasks that have been completed in each month.

Month   Count
July
August
September
October.

View 3 Replies View Related

SQL Server 2012 :: Joining Dim To Fact Table Where Dim Table Key Exists In Multiple Fact Columns

Oct 26, 2015

Say you have a fact table with a few columns that all reference the same key column in a dimension table, you want to write a view to return the information for those keys?

USE MyTestDB;
GO
SET NOCOUNT ON;
IF OBJECT_ID ('dbo.FactTemp' ,'U') IS NOT NULL
DROP TABLE dbo.FactTemp;

[Code] ....

I'm using very small data at the moment, and the query plan and statistics don't really say which way.

View 2 Replies View Related

SQL Script To Search All Tables In A Database For A Particular String?

Apr 9, 2008

Is their a way to search every table in a database for a particular character string that might appear in any column in any of the tables?
 
For example suppose in a hypothetical situation that the character string "http://www.DrSeusOnTheLoose.com" appears randomly in a database, but we do not know which tables it occurs in and in what columns. How can we do a search to find such a character string?
 
As you know, this is easily accomplished in MS Windows XX or through a dos command line script. But when it comes to searching a whole database, I don't know how to do this. Can someone please help me?
Ralph

View 1 Replies View Related

Transact SQL :: Search A String Across Multiple Tables

Jul 29, 2015

Is it possible to search a string/value across 1000's of tables and just display the table name and column name which it is in. I don't need to know every instance of the string/value only that I can find it in a given table name.

View 9 Replies View Related

How To Handle Connection String When Using Tables From Multiple Databases?

Mar 10, 2004

I have a query that involves tables from 2 different databases. Using the query analyzer I can construct my query and it works great. Now I am trying to implement the query into my code and I am confused about I handle the connection string(s) since I am now using 2 different databases.

Can anybody help?

Cheers,
AzF

View 2 Replies View Related

Sql Query String In VS2005 Help Needed. Involves AVG, 2 Tables, And URL Querystrings!

Jan 25, 2008

hey everyone,I'm having trouble cranking out an appropriate SQL query for what I'm trying to do. I'm trying to add a ratings system into a website, I have 2 relevant tables.Files = table listing all uploaded filesRatings = table listing all ratings for filesThe two DB's are theoretically linked by the fact that the ratings table has a field for "fileID" which matches up to "fileID" in the files table. The way the page works, is that there is a querystring in the URL "filename" where "filename" is a field within the files table. So basically I'm looking for the AVG rating.ratings, where rating.fileID = files.fileID, and the appropriate files.fileID is gained from files.fileID WHERE files.filename = request.querystring["filename"]holy crap, i hope that made sense to someone here. i'm not great at explaining this. My problem is I want the AVG ratings.rating from the table ratings.... where ratings.fileID = files.fildIDWhat I have so far, that works except for the AVG part is below. This code will pull only the ratings for the appropriate file, the problem is whenever I try to add "AVG(something)" to it, the query fails.SELECT        files.FID AS Expr1, files.filename, ratings.FID, ratings.ratingFROM            files INNER JOIN                         ratings ON files.FID = ratings.FIDWHERE        (files.filename = @filename) @filename value is gained from the URL querystringany ideas? 

View 1 Replies View Related

Script To Search For A String In All Varchar Columns In All Tables In A Database?

Sep 14, 2005

I have a string which I need to know where it came from in a database.I don't want to spend time coding this so is there a ready made scriptwhich takes a string as a parameter and searches all the tables whichcontain varchar type columns and searches these columns and indicate whichtables contain that string?Full text search is not enabled.--Tonyhttp://dotNet-Hosting.com - Super low $4.75/month.Single all inclusive features plan with MS SQL Server, MySQL 5, ASP.NET,PHP 5 & webmail support.

View 1 Replies View Related

PK In Fact Table

May 21, 2008

I only see a need for a PK in a dimension table, not a fact table. Do you agree?

View 4 Replies View Related

Help With A Fact Table

May 28, 2008

I would like to know how to use a fact table so that when I insert or update a row with a word that the table will reference the fact table to make sure that the word I'm using is correct.

for example I have a table with column Fulltext and Abbreviation
in the fulltext column I have a a word "Windows Server 2008" now in the abbreviation I would like to abbreviate this to "Win Srv 08" Now the Fact table would have to columns Fulltext and Abbreviation under Full text the full words would be in it like Windows, Server, and 2008 and under the Abbreviation column Win, srv, and 08

So I want it so that everytime the word Windows comes up and I need to type an Abbreviation for it that it will reference the fact table which is using the Abbreviation Win. To avoid different ways of abbreviating the word windows.

Is there a way to do this automatically so that I don't have to manually go back and forth between the fact table and the table that I'm updating?

View 2 Replies View Related

New Fact Records

Jan 26, 2006

Hi there



Is there functionality in SQL 2005 to update only new records, e.g. only records from yesterday. I've seen functionality for dimension tables to only get new records but nothing for fact tables.



Thanks

View 4 Replies View Related

Combining Two Different Fact Grains

Jan 14, 2005

I'm trying to get one cube to display two different grains of data:

1) Vehicle measures - such as total time and total miles.

2) Trip measures - such as total trip time and total trip miles.

How would I accomplish this? I assume that the measures have to be in the same fact table?

Thanks for your time!

View 1 Replies View Related

Intermediate Fact Table

May 19, 2008

Hi,

I am writing a BI solution for a recruitment company. In their
business, the can be n number of participants from different
dimensions linked to the same fact record. For example, a client can
be sent the CV of 50 candidates. That's my first problem. My second
problem is the variety of dimension participant types for a given fact
record. This results in the need for nullable dimension FK's - which
I'm trying to avoid. For example, consider the following two business
events. In the first one, a candidate fills a job. Easy, we have a
record in the fact table where the fact table has the following
columns: DateKey, EventType, CandidateKey, VacancyKey. No nullable
columns, great. But there are other events that I want to store in
the fact table too. Let's go back to my first example: The client is
sent CV's of 50 candidates in one transaction. So there is one client
linked to the fact, but 50 candidates. So now I need to extend the
fact table and add another column: CandidateGroupKey (which links to
and Intermediate Fact Table). But in this case there was no vacancy
involved. So do I now have to make the VacancyKey column nullable?
That doesn't seem like a good idea...
Or do I have to go for a completely different approach and have
different fact tables instead of just one?

Anyone have any suggestions?

View 1 Replies View Related

Populate The Fact Table

Jun 6, 2007

Hi!

can any body tell me how to populate the fact table from base tables.

View 4 Replies View Related

How To Populate The Fact Table

Jun 6, 2007

databse name: bookorder

Realtions:

customer (customerid,l_name,f_name,city, district,country)
cust_order(orderid,orderdate,customerid)
order_detail(orderid,itemno,isbn,quantity)
book(isbn,title,edition_no,price)
author(authorid,name,surname)
book_author(authorid,isbn,authorseqno)


Now populate the datawarehouse name: book_orderdw
having fact table & three dimension tables given below from the above bookorder database

fact table

factsales(customerid,timeid,isbn,unit_price,discount_price,sales_quantity,sales_amount)

dimension tables

dimcustomer(customerid,l_name,f_name,city,district,country)
dimtime(timeid,orderdate,dayofweek, month, year)
dimbook(isbn,title,edition_no,price)

Now I have to populate the fact & dimension tables by writing sql scripts.
Now I have already populated the dimension tables by writing sql script,
But I have to populate the fact table taking into account, here I am facing problem in wriring sql script

(i) unit_price is taken from the book base table with reference to the isbn
(ii) sales_quantity is taken from the order_detail.quantity with reference to table cust_order(via orderid & orderdate)
(iii) discount_price is determined dependent on the quantity. if the quantity > 20 then discount 20 %(i.e discount_price = 0.8 * unit_price). if quantity < 10, no discount i.e normal price. if quantity between 10 and 20, discount 10%. Note that the quantity is determined based on each order of each customer, thus if the same book appears at multiple positions in an order, those positions shall be grouped together. This could happen because the pk of the order_detail table is order_id + item no, not order_id + isbn
(iv) sales_amount is sales_quantity * discount_price

View 1 Replies View Related

Understanding Dimension And Fact

Sep 12, 2007

A few questions:

1) We have numerous fact tables with surrogate keys which reference just one dimensional surrogate key. How does this work?

2) Are the ‘facts’ feeding data TO the ‘dimensions’ (back end warehousing)? Or are the ‘Dimensions’ feeding facts to the ‘facts’ tables for lookups!?

Nb: Im very inexperienced at database design.

Im really also using this thread to get contacts for future harder questions!

Thanks kindly

View 8 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved