Forum Replies Created

Viewing 15 posts - 46 through 60 (of 64 total)

  • RE: SQL query not returning all results

    Ok ,

    I think I see what the problem is here. In scratchpad2, I'm calculating the number of minutes that each employee is logged in and in scratchpad4, that's just for...

  • RE: SQL query not returning all results

    Lowell,

    I changed the inner join to left outer join and it does show all of the employees now but not all of the data (as far as summinutes and hours)

    Here's...

  • RE: Logic loop to check variables

    GSquared,

    Thank you. That was exactly what I was looking for. Works just like it should.

    Doug

  • RE: Logic loop to check variables

    Here's the DDL for both tables:

    CREATE TABLE [dbo].[scratchpad2] (

    [name] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,

    [employeenumber] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,

    [dateonly] [datetime] NULL ,

    [minutes] [decimal](10, 2) NULL

    )...

  • RE: Copying and comparing data

    Thank you both for the suggestions. I am going to go with the SELECT DISTINCT option. Now the last question I have is how do I delete all the duplicates...

  • RE: Using Sum and Cast Together

    Yes, its recorded in 15 minute increments. It's minutes and seconds.

  • RE: Using Sum and Cast Together

    G

    The ontime column contains data that looks like this:

    15.01015

    and what I need to do is to round it to the nearest minute. I have to use a conversion (([LoggedIn]/1000/60) to...

  • RE: Using Sum and Cast Together

    Gsqaured,

    I dont think that the round function would work unless it's after I do the cast, because it is in a decimal format before that. Can you show me an...

  • RE: Using a query to return the next Sunday

    David,

    Thanks. I'll use that one to be more precise.

  • RE: Using a query to return the next Sunday

    David,

    Then can you give me an example of max being used? This query is being included in an application that's being built and if I can improve it by writing...

  • RE: Using a query to return the next Sunday

    G,

    It might but since I already have this in place and I'm going to be using the variable anyway, why not use it for this as well.

    Doug

  • RE: Using a query to return the next Sunday

    Andrew,

    I forgot, I have another field that has a yes or no value that I can use as a "qualifier" for the payroll date.

    so I have this:

    select payrolldate,

    ...

  • RE: Using a query to return the next Sunday

    andrew,

    yes that does. How would I go about making sure it only returns the last entry though? In other words, I have 3 records in my table, all 3 with...

  • RE: SQL Database comparison

    Alvin,

    I'll first say thank you for the advice and I'll take that to heart but that decision is not mine to make. The network that we have is small (we...

  • RE: SQL Database comparison

    Alvin,

    This was fixed by creating a new table called Newclients2 and having data inserted into that table. For whatever reason, when I tried doing this with the newclient table, this...

Viewing 15 posts - 46 through 60 (of 64 total)