Viewing 15 posts - 181 through 195 (of 240 total)
Changing to LEFT JOINs would not be advised. What they do is tell SQL server to include every row in the set preceeding the LEFT JOIN no matter if a...
February 17, 2006 at 3:21 pm
This works and allows the set of rows to be included to be reduced by the values in the where clause. Using some sort of case statment will force all...
February 17, 2006 at 3:09 pm
I feel that using forms of hungarian notation is generally a mistake. As has been previously stated, when changes occur the prefixes are generally not changed or require mass search...
February 17, 2006 at 12:33 pm
Sergiy doesn't want to create a view that takes parameters, he wants to dynamically create views based on parameters passed into a stored procedure. The problem is that errors in...
February 17, 2006 at 9:38 am
Since the souce data is in the format you have, you could base the cube on a view that transposes the data into the format of:
storefront, account, dateid, balance
Sample SQL...
February 17, 2006 at 9:02 am
Since Analysis Services allows you to specifiy that a dimension is a time dimension when creating it, the following is the practice that I use:
Create Table dimDate (DateID int Identity(1,1), Date Datetime)
--Insert...
February 17, 2006 at 8:18 am
This could be wrapped in either a function or stored procedure. As noted above this also depends on the value of @@DATEFIRST.
--using a standard seq table
SELECT TOP 9999
IDENTITY(INT,0,1) AS...
February 16, 2006 at 10:34 am
Try this:
UPDATE tableA
Set tableA.ItemName = TableB.ItemName
From tableA
inner join TableB ON TableA.ID = TableB.ID
February 16, 2006 at 10:09 am
Try this:
declare @Table1 table (ColumnID int,ColumnDescription varchar(20))
insert @Table1 values(1, 'Description')
insert @Table1 values(2, 'Age')
insert @Table1 values(3, 'Type')
declare @Table2 table (StatementID int, LeftColumnID int, RightColumnID int)
insert @Table2 values(1, 1, 2)
insert @Table2 values(2,...
February 16, 2006 at 10:06 am
It appears that there are multiple rows in the pdc table for number = 1186.
Also, the need to have a DISTINCT clause on a SELECT statement is often a sign...
February 16, 2006 at 9:42 am
The matching of similar strings is more complex than just comparing the first 10 characters. By just comparing the first 10 characters, 'AAA Int'l' won't match 'AAA International' but they are...
February 16, 2006 at 8:28 am
When SQL creates the temp tables, each connection gets its own copy of a #TEMP table. If you look in sysobjects after creating a #TEMP table, the name will be...
February 15, 2006 at 3:04 pm
I would use a user defined function that returns a table as in:
create function fnTable (@var varchar(20))
returns @t table (
Reference varchar(100)
)
as
begin
insert into @t
SELECT @Var + '-1'
UNION
SELECT @Var + '-2'
UNION
SELECT...
February 15, 2006 at 3:00 pm
You can't. You will have to do something like:
declare @sql varchar(8000)
set @sql = 'select top ' + cast(@MYLIMT as varchar) + ' * from ......'
exec(@SQL)
February 15, 2006 at 2:04 pm
The transaction log does not store a log of all queries. It stores the changes that are made to a database. It is also an unreadable entity.
February 15, 2006 at 1:21 pm
Viewing 15 posts - 181 through 195 (of 240 total)