Viewing 15 posts - 17,821 through 17,835 (of 18,926 total)
Check the inserted lines... Once on the server they are all kept as '' (no space). Looks like the where condition is treated the same way (rtrimed). ...
May 12, 2005 at 8:36 am
How about something like this :
Select CustomerID, Year, Count(*)
from dbo.HistoryTable
group by CustomerID, Year
having count(*) < 12 or (Year = year(getdate()) and COUNT(*) < Month(Getdate()))
This returns only the...
May 12, 2005 at 7:58 am
I've once worked on a similar problem. I had to export the billing information to a text file so it could be imported to a 3rd party software.. Easy...
May 12, 2005 at 7:52 am
I would suggest you buy a book that explains how sql server's optimizer works under the hood... maybe inside sql can help you. But Frank would be better at...
May 12, 2005 at 7:29 am
Did you run my script???????
May 12, 2005 at 7:20 am
Run this and find for yourself :
CREATE TABLE [dbo].[TypesCommentairesADPS] (
[PkTypeCommentaireADP] [int] IDENTITY (1, 1) NOT NULL ,
[DescTypeCommentaireADP] [varchar] (50) COLLATE French_CI_AS NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TypesCommentairesADPS] WITH...
May 12, 2005 at 6:40 am
From SQL Team
There are several requirements that you must take into consideration when using Indexed views.
1. View definition must always return the same results from the...
May 12, 2005 at 6:28 am
Care to elaborate on those reasons Frank?? Can't think of many right now.
May 12, 2005 at 6:20 am
Not always stupid.. I've heard of cases where a view using a view was slower than a single select statement, but unless you've proven that fact you probably wasted some...
May 11, 2005 at 3:16 pm
You can't declare a variable in a view.. this will do the trick :
SELECT RTrim(op_o.team) AS [Team],
op_o.last_rep AS [Consultant],
RTrim(op_o.type) AS [Opportunity Type],
Convert(Char, op_o.open_date, 101) AS [Opportuntiy Create Date],
RTrim(op_o.curr_mile) AS...
May 11, 2005 at 2:21 pm
What uniquely identifies the rows??
May 11, 2005 at 1:07 pm
Because you can add many more things than days (from books online)
Syntaxe
DATEADD ( datepart , number, date )
Year : aa, aaaa
quarter : qq, q
Month : mm,...
May 11, 2005 at 12:01 pm
You're better off learning this method :
Select dateadd(d, -90, Getdate())
May 11, 2005 at 11:48 am
Can you post the query and the ddl so we can show you how to do it?
May 11, 2005 at 11:31 am
Viewing 15 posts - 17,821 through 17,835 (of 18,926 total)