Forum Replies Created

Viewing 15 posts - 24,151 through 24,165 (of 26,486 total)

  • RE: Optimizing a Stored Procedure

    Actually, I believe that indexes will help. I can't remember where I read it, but I believe that there has been improvements in the query engine in SQL Server...

  • RE: Query keeps running

    I can see why this runs fast:

    SELECT * FROM REFERRALS WHERE RECVD_DTTM >= '2008-10-06 23:59:59' AND RECVD_DTTM < '2008-10-05 00:00:00'

    It is executing in 1 second where as

    It won't select...

  • RE: a simple (i hope) syntax question

    Or you can do something like this in SQL Server 2005/2008. (Pardon my use of the * in the query).

    create table dbo.MyUsers (

    UserID varchar(25),

    ...

  • RE: Optimizing Physical Temp Tables

    Truncating or deleting data from the tables will not drop the indexes you create. If you drop the tables themselves every day, then you'd lose the indexes you create.

    😎

  • RE: int to date and time.

    How about the following:

    declare @timeint int,

    @dateint int;

    set @dateint = 20081003;

    set @timeint = 70004;

    select cast(cast(@dateint as char(8)) as datetime) +

    ...

  • RE: Commom Table Expressions VS Sub-queries

    lucassouzace (10/2/2008)


    I would like to know whether in a CTE is possible define sub-queries?

    for example:WITH CTE1 as ( Select AddressID from Person.Address

    where AddressiD in ( select ProductID from Production.Product)

    Error:

    Msg 156,...

  • RE: Collation Conflict

    Still need the DDL for the under lying tables to the view.

    😎

  • RE: Cannot enter Surface Area Configuration on a SQL instance

    I just wanted to be sure. We have WSS installed on one of our development servers, and I have to shutdown the Windows Internal Database to run the Surface...

  • RE: Collation Conflict

    Can you provide the DDL (create statement) for the tables including collation for character columns?

    😎

  • RE: Cannot enter Surface Area Configuration on a SQL instance

    Curious, is there any other software installed on the system? In particular, I am wondering if the Windows Internal Database (aka SQL Server 2005 Embedded Edition) is installed on...

  • RE: Query help urgent

    Unfortunately, we aren't mind readers. The help you get is only as good as the information you provide with your question.

    I suggest you read the article in Jeff's signature...

  • RE: passing datetime param to sproc

    Added an additional test:

    create proc dbo.MyTest (

    @StartDate datetime = null

    )

    as

    begin

    set @StartDate = isnull(@StartDate,getdate());

    select @StartDate;

    return...

  • RE: passing datetime param to sproc

    You can't use the fuction getdate() as a default. You need to do something like this:

    create proc dbo.MyTest (

    @StartDate datetime = null

    )

    as

    begin

    ...

  • RE: Join three tables and

    rbarryyoung (9/30/2008)


    Jeffrey Williams (9/30/2008)


    tbeadle (9/29/2008)


    As for the other paragraphs - basically, you cannot have the following:

    SELECT ...

    FROM table1

    LEFT JOIN table2 ON table2.fkey =...

  • RE: Allow users to create temp tables

    A quick fix may (or may not) be to add the user to the db_ddladmin role in the database in question.

    I haven't found anything else as of yet.

    😎

Viewing 15 posts - 24,151 through 24,165 (of 26,486 total)