Viewing 15 posts - 106 through 120 (of 443 total)
Well I dont know if was a coincidence.
I generated 1000000 rows in a tally table;
Select Top 1000000 Identity(int,1,1) N
into tblTally
from sys.columns a, sys.columns b,sys.columns c
Then, I inserted 1000000 in...
May 11, 2010 at 1:58 am
Atif Sheikh (5/9/2010)
--------------------------------------------------------------------------------
Set ANSI_NULLS off / on changes the results.
By default in database settings it is set to OFF.
But in SSMS --> Tools --> Options, go to Query Execution...
May 10, 2010 at 6:36 am
Set ANSI_NULLS off / on changes the results.
By default in database settings it is set to OFF.
But in SSMS --> Tools --> Options, go to Query Execution -->...
May 9, 2010 at 11:01 pm
Question 1. If I do create a view, can the view be indexed even if the tables are not indexed?
Yes you can.
Question 2. Will the indexed view be better than...
May 7, 2010 at 1:14 am
WHEN (marks between 60 and 79) THEN 'C'
Just one thing. Replace 79 with 78.
May 6, 2010 at 10:45 pm
Try this code....
1. UPDATE t1
2. SET t1.colx=t2.colx
3. FROM t1,t2
Didnt get the point....
May 6, 2010 at 10:44 pm
Dynamic SQL is the only solution that comes to my mind. Using it with sp_executesql is safe.
May 6, 2010 at 10:41 pm
Why not to use Top(N) clause with Order by Col1?
I think it should solve the problem.
May 6, 2010 at 10:39 pm
Something like this...
Select NIN_CODE,Count(*) as Cnt from (
select distinct OO.ORDER_NUMBER, OO.NIN_CODE
from Table as OO
WHERE (OO.SUBMITTED_DATE BETWEEN '20090101' AND '20091231')
AND (OO.TICKET_NUMBER IS NOT NULL) and OO.NIN_CODE='990685711' or OO.NIN_CODE='993435940'
) Main
group...
May 6, 2010 at 10:35 pm
But if you need an indexed view, then I think you should go for proper defined view instead of joining tables everytime. I think it depends upon the situation.
May 6, 2010 at 10:26 pm
It depends upon the table structure that you use to store Transactions of Current Month and Last Months. As said above, plz post the sample data and structure.
From your description...
May 4, 2010 at 3:32 am
Try This...
Declare @vShiftTable Table (ShiftID int, startTime datetime, endtime datetime)
Declare @vVarTime datetime
declare @start varchar(10)
set @start = '06:00'
declare @End varchar(10)
set @End = '13:59'
Insert into @vShiftTable
Select 1,@start,@End
set @start = '14:00'
set @End =...
May 4, 2010 at 3:25 am
Thanks for posting that Atif.
No Problem....:-D
April 30, 2010 at 4:44 am
Viewing 15 posts - 106 through 120 (of 443 total)