Forum Replies Created

Viewing 15 posts - 286 through 300 (of 1,082 total)

  • RE: FORCESEEK in SQL 2005

    looks like a 2008 hint not 2005

    ----------------------------------------------
    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: can anyone see anything wrong with this query?

    HI Mike,

    Could you confirm that this solved, I noticed that other people are still spending time on this post, when looks like it might be fix?

    ----------------------------------------------
    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: Convert Date 20090319 to 2009-03-19

    what is the error you getting?

    ----------------------------------------------
    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: Buils a select statement from another select statement

    are you saying that when you run your proc you have no idea what the columns are?

    ----------------------------------------------
    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: Buils a select statement from another select statement

    Try this:

    DECLARE @table TABLE

    (id INT,

    Name VARCHAR(10),

    Col1 BIT,

    Col2 BIT,

    Col3 BIT)

    INSERT INTO @table

    SELECT 1, 'Carlos', 1, 0, 1

    --START

    DECLARE @sql VARCHAR(MAX)

    SELECT [CoLName], [Include]

    FROM

    (SELECT Col1, Col2, Col3

    ...

    ----------------------------------------------
    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: Convert Date 20090319 to 2009-03-19

    why does it fail?

    What is the error?

    ----------------------------------------------
    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: Convert Date 20090319 to 2009-03-19

    :hehe:

    Sorry I'm an idiot 😀

    obviously a varchar need cofffffffeeeeee

    ----------------------------------------------
    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: Convert Date 20090319 to 2009-03-19

    are you sure?

    My script when run seems to work!

    could that be became of the format settings on the server?

    ----------------------------------------------
    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: Convert Date 20090319 to 2009-03-19

    If in your table you declare rundate as a datetime and just insert into to from sysjobhsitory run date the conversation should happen automatically.

    here is an example of the conversion:

    DECLARE...

    ----------------------------------------------
    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: Convert Date 20090319 to 2009-03-19

    not sure what you saying but:

    this table:

    DECLARE @Jobs_failed TABLE

    (

    [name] nvarchar (128),

    [message] nvarchar(1024),

    run_date int

    )

    has Run_date defined as an int, which makes it impossible to start anything that looks like this '2009-03-19'

    I...

    ----------------------------------------------
    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: My AFTER DELETE Trigger does not work as I expected

    the reason for this is because there is only one insert statement which is using the values key word.

    If you delete 3 rows from the table in one statement 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: Convert Date 20090319 to 2009-03-19

    that field is defined as an INT, so you can't have it in this format: '2009-03-19' are we missing something here?

    Oh and you should be starting dates in a datetime,...

    ----------------------------------------------
    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: Identical columns in clustered and non-clustered index

    just a note, be care when deleting a large number of indexes from a table. You might notice a drastic change in performance 🙂

    ----------------------------------------------
    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: Insert spaces before upper case characters

    just incase you need it.

    Here is a solution for if you data is stored in table and you want to do more than one row at a time.

    DECLARE @table TABLE

    (Input...

    ----------------------------------------------
    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: Remove characters from query result

    cool and if you find the solution could you post it here for others who might be trying the same thing.

    Or if you have questions post what you have so...

    ----------------------------------------------
    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 - 286 through 300 (of 1,082 total)