Forum Replies Created

Viewing 15 posts - 7,711 through 7,725 (of 26,490 total)

  • RE: check if database exist before restore

    Do not use sys.sysdatabases. It is a SQL Server 2000 system and is included for backward compatibility. You should use sys.databases instead.

  • RE: Better restore solution ?

    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...

  • RE: Indexed view CI chosen of table CI. Why?

    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...

  • RE: Problem with SQLCLR in VS 2012 / Net 4.5

    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...

  • RE: T-SQL help

    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) *...

  • RE: SQL Server 2012 Evaluation (Trial) or Beta Version?

    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...

  • RE: T-SQL help

    Oh, and how is this information passed to query?

  • RE: T-SQL help

    etirem (5/6/2013)


    But I have different scenarios to get the persons retrieved based on the parameters for BEGIN AGE and END AGE in WHERE Clause:

    Like :

    SELECT person, dob,

    case when DATEDIFF(MONTH,dob,@SDate)/12>0...

  • RE: Indexed view CI chosen of table CI. Why?

    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...

  • RE: T-SQL help

    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'),

    ...

  • RE: Rounding Up with given precision

    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...

  • RE: T-SQL help

    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...

  • RE: sql service broker

    Is there a reason you can't use database triggers to capture/audit DML actions?

  • RE: conversion of the varchar value overflowed an int column

    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...

  • RE: Redgate Differential Backup and Restore

    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.

Viewing 15 posts - 7,711 through 7,725 (of 26,490 total)