Viewing 15 posts - 7,711 through 7,725 (of 26,490 total)
Do not use sys.sysdatabases. It is a SQL Server 2000 system and is included for backward compatibility. You should use sys.databases instead.
May 7, 2013 at 12:08 pm
Look at WITH STANDBY. This will allow you to bring the database into a read only mode which should allow you to read the data from the table into...
May 7, 2013 at 12:04 pm
First, I don't think your question is really about why is the index on the view being selected as much as why the first query generates 5 index seeks while...
May 7, 2013 at 7:06 am
jordanovskibojan 74807 (5/6/2013)
Yes,but I am using Sql 2008R2 ?
One, posted in a SQL Server 2005 forum and may not have seen you mention 2008 R2.
Two, still applies to SQL Server...
May 6, 2013 at 4:29 pm
Maybe this:
declare @StartPeriod varchar(10),
@EndPeriod varchar(10);
select @StartPeriod = '4Months', @EndPeriod = '12Years';
select
cast(substring(@StartPeriod, 1, patindex('%[^0-9]%',@StartPeriod) - 1) as int) *...
May 6, 2013 at 3:05 pm
The evaluation version is Enterprise Edition. Which means if you find yourself using Enterprise Edition features during your evaluation, you may find yourself having to go that direction unless...
May 6, 2013 at 2:16 pm
etirem (5/6/2013)
Like :
SELECT person, dob,
case when DATEDIFF(MONTH,dob,@SDate)/12>0...
May 6, 2013 at 2:07 pm
I am assuming that the table dbo.Products has more columns than those defined in the indexed view you built over the table and that the query using the indexed views...
May 6, 2013 at 12:16 pm
This:
declare @people as table (
person varchar(20),
dob date
)
declare @SDate as date = '5/3/2013';
insert into @people(person,dob)
values ('Frank','3/20/1990'),
...
May 6, 2013 at 11:49 am
Here is another option (The CTE is just how I passed in the sample data):
with TestData as (
select datavalue
from (
values
(5.0000016), -- should be 5.01
(6.1000138), -- should be 6.11
(7.1200073), -- should...
May 6, 2013 at 11:10 am
etirem (5/4/2013)
Thank you!!But I also need to get the persons
WHERE age BETWEEN '4 Mths' AND '12 Yrs'.
Is this an additional requirement to only display individuals that are between 4...
May 6, 2013 at 10:53 am
Is there a reason you can't use database triggers to capture/audit DML actions?
May 6, 2013 at 10:40 am
kapil_kk (5/6/2013)
Sergiy (5/6/2013)
kapil_kk (5/6/2013)
Instead of RETURN I have added a SELECT @pSTN statement for the different different conditions and its working 🙂Is it correct?
Yes, it is correct.
In fact, "RETURN @pSTN...
May 6, 2013 at 10:28 am
It may take longer, but if needed you can restore the Full backup from the 1st and then use all the t-logs up to the point in time you require.
May 6, 2013 at 9:54 am
Viewing 15 posts - 7,711 through 7,725 (of 26,490 total)