Forum Replies Created

Viewing 15 posts - 31 through 45 (of 64 total)

  • RE: Use of Union or concatenate

    I just ran this query and this is the results that I got:

    sp_getoncallresults '4/17/2011', 'ctka'

    REATE procedure dbo.sp_getoncallresults

    -- Add the parameters for the stored procedure here

    @sincedate nvarchar(25),

    @schedname nvarchar (100)

    AS

    BEGIN

    SET NOCOUNT...

  • RE: Limiting a stored procedure

    Seth,

    I changed my procedure to reflect your edits and still get an error:

    CREATE PROCEDURE [dbo].[getoncall2]

    @subschedule varchar(50),

    @lookup_time...

  • RE: Use of Union or concatenate

    Jack,

    Sorry I did have to modify the query a bit for the user. Here is the query as it is now:

    SELECT

    mOnCallAdd.SchedName,

    DATEADD(MINUTE, mOnCallAdd.AddTime,

    ...

  • RE: Use of Union or concatenate

    Jack,

    One other thing I'm noticing. When I run my query I'm getting some results that don't make any sense. I used the date of 3/21/2011 and produced the following results...

  • RE: matching both time and date in a query

    ALZ,

    Could you offer me an example to clean up my query? I'm not the dba but I'm trying to make my queries as efficient as possible.

    Thank you

    Doug

  • RE: Use of Union or concatenate

    Jack,

    Thank you. That was absolutely it.

  • RE: Use of Union or concatenate

    Lutz,

    Will that work for SQL 2000? I see that cross apply will work with SQL 2005 but don't see that command being used in 2000.

  • RE: Query not showing needed results

    Craig,

    Sorry about not getting the data right on that. I tested your query and it works the way that I need it to.

    Thanks

    Doug

  • RE: Query not showing needed results

    Did I post enough information? Can anyone please assist with this?

    Thank you

    Doug

  • RE: Query not showing needed results

    The DDL for that table is

    if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[scratchpad5]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)

    drop table [dbo].[scratchpad5]

    GO

    CREATE TABLE [dbo].[scratchpad5] (

    [EmployeeNumber] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS...

  • RE: SQL Server error '80040e31'

    Ninja,

    Yes we were able to connect to the server via the page. In my testing here's what I've done so far:

    1. Increased the time out in the page itself from...

  • RE: SQL Server error '80040e31'

    I just ran the query in question from the server itself and it took me almost 2:45, but the other person who brought this to my attention, said that he...

  • RE: SQL Server error '80040e31'

    Ninja,

    The server is pingable from the SQL server and both pages use the same username/pwd combination which works. What I'm not sure of is why another connection string would be...

  • RE: SQL query not returning all results

    Lowell,

    After adding specminutes to the outer group by I resolved that issue BUT it's still showing only 4 entries for results for that period when there should be at least...

  • RE: SQL query not returning all results

    Lowell,

    I ran this query:

    SELECT

    name,

    employeenumber,

    summinutes,

    sum(summinutes/60) as hours,

    specminutes,

    sum(specminutes/60) as sphours

    FROM

    (

    SELECT

    scratchpad2.name,

    scratchpad2.employeenumber,

    ...

Viewing 15 posts - 31 through 45 (of 64 total)