Forum Replies Created

Viewing 15 posts - 6,091 through 6,105 (of 7,187 total)

  • RE: enhancing sql command

    You're not going to get anywhere by shouting. I don't even see a question in your original post, so what is it that you're asking?

    Please start off by posting...

  • RE: What should be a simple query

    Then Jason's query should work. How about the results of this?

    SELECT TOP 20 OutStartDate + OutStartTime, OutEndDate + OutStartTime

    FROM vwOutofOffice

    Have a look at the results and see if they...

  • RE: What should be a simple query

    Martin

    It's so much more complicated when you separate out date and time. Please will you post the results of this query:

    SELECT TOP 20 OutStartDate, OutEndDate

    FROM vwOutofOffice

    Thanks

    John

  • RE: Sequence number with Group By

    No. Probably the easiest way is to create a temp table with an identity column, insert your rows into that, then select from it.

    John

  • RE: What should be a simple query

    Martin

    Now I'm confused. If you're storing OutStartDate and OutEndDate as datetime, why do you need OutStartTime and OutEndTime?

    John

  • RE: What should be a simple query

    Martin

    Do you have the option to change the view so that it gives the date and time in one value? If you can do that then a simple BETWEEN...

  • RE: Problem with Query

    Luis

    Each one of your insert statements returns "Error converting data type nvarchar to numeric." Sorry but I don't have time to find which of the columns this is happening...

  • RE: avoiding duplicate table

    Try it for yourself. Run the following code:

    create table #MyTable(t int)

    then create a new connection to the database and run the same code again. Now run this query:

    SELECT...

  • RE: Problem with Query

    Luis

    Thanks for that, but we still need DDL and sample data so that we're not guessing at what's going on. For instance, the data type of the conta column...

  • RE: Restoring the database

    Sugesh Kumar (2/27/2008)


    alter database dbname with recovery to bring it online. you need not restore it again.

    That won't work... try parsing it. The correct syntax is the one that...

  • RE: Are Views Slow ?

    Roy Ernest (2/27/2008)

    I beg to disagree on that. A wrong query plan does not always happen due to Paramater sniffing. It can happen when the Statistics are out of date...

  • RE: Are Views Slow ?

    Roy Ernest (2/27/2008)


    I have doubt.... Since Stored Procs can have recompiles and then take bad query plans, cant view also have that same issue?

    Since a view doesn't take parameters,...

  • RE: Problem with Query

    Luis

    Please will you post DDL for your tables in the form of CREATE TABLE statements, sample data in the form of INSERT statements, the results your query is producing, and...

  • RE: Error converting datetime...... ".....out-of-range datetime value..."

    JMSM

    Try experimenting with the date style parameter in the CONVERT function. This may prevent the "out of range" error eppearing.

    John

  • RE: Complex (??) Query

    Sounds like something you would want your app, rather than SQL Server, to do. Put please will you post table definitions in the form of CREATE TABLE statements and...

Viewing 15 posts - 6,091 through 6,105 (of 7,187 total)