Forum Replies Created

Viewing 15 posts - 1,006 through 1,020 (of 1,082 total)

  • RE: set dateformat

    HI There,

     

    I found this in BOL:

    This setting is used only in the interpretation of character strings as they are converted to date values. It does not affect the display of...

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: String to datetime

    HI There,

    Could you send me the data in your table?

    I'm think that some of your Date_On_List, fields are not in the format you descibed.

    Here is the code I used:

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: String to datetime

    Hi there,

     

    This looks messy so I will try and find a better way to do it.

    SELECT

    CONVERT(DATETIME,(RIGHT('23/07/2007'

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: ''''First'''' not supported in SQL Server

    Have you tried using

    TOP

    or

    PERENT

     

    Thanks

    Chris

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Reduce Aggravating Aggregation

    Hi,

     

    Sorry please ignore my first explination as I didn't see your order by clause!

     

    I am also now asking myself why your way isn't the correct way to do it.

    I have...

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Reduce Aggravating Aggregation

    Hi Edmund,

     

    Sorry that explination was incorrect please ignore my last post!

     

    Thanks

    Chris

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Reduce Aggravating Aggregation

    🙂

     

    Lets say for example the data in our tables was stored in an order on disk that was not what we expected it to .

    for example the 1st records was...

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Reduce Aggravating Aggregation

    HI Edmund,

    Your method does not guarantee that you will get the status with the maxdate.

    Thanks

    Chris

     

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Using views first time around

    Hi There,

     

    What I mean is that I can actually run a select on the view.

    I think if you want to see it under the Database you need to grant the...

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Subquery inefficiency - anyone help?

    Hi there,

    As far as I remember case statements are the only way in SQL2000

     

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Change a Date/time to a date format

    There a re few ways to do this.

    SELECT

    CONVERT(VARCHAR(13),GETDATE(),11)

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Subquery inefficiency - anyone help?

    HI Scott,

     

    Is what I used to recreate what you are trying to do.

    You'll see where you need to Add any other Coloumns such as [Item D] etc

     

    CREATE TABLE SubQuery

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Subquery inefficiency - anyone help?

    Are you using SQL 2005?

     

    If so try using a pivot

     

    If you not sure how to do that give me a shout.

     

    Thanks

    Chris

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Using views first time around

    Hi there,

    You shouldn't need to grant perms to the table.

    Here is the code I ran and it worked 100%

    CREATE

    TABLE Courses

    (ID...

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Change a Date/time to a date format

    Hi there,

     

    What format do you want?

     

    thanks

    Chris

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life

Viewing 15 posts - 1,006 through 1,020 (of 1,082 total)