Forum Replies Created

Viewing 15 posts - 661 through 675 (of 1,082 total)

  • RE: INSERT script errors *** Gurus help needed ***

    HI there,

    You missing a closing bracket after you 'CONVERT(VARCHAR(5),@____'

    AT the end you need a ')'

    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: Creating crosstab/pivot table

    Thanks G,

    I was going to actually post something to ask which was a better performer 🙂

    ----------------------------------------------
    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: how to run sql scripts in small batches

    well when you put

    GO

    on the first line of a script that defines the end of a batch.

    It will also mean that the variables leave scope etc.

    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: Where is my package saved?

    thanks again Jack,

    This is great, means I get to introduce a whole new world in my knowledge base, can't wait 🙂

    ----------------------------------------------
    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: Where is my package saved?

    I worked out how to do it in VS, still hoping it can be done in SSMS

    ----------------------------------------------
    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: Where is my package saved?

    HI Jack,

    One more question.

    How can view what this package is doing?

    Can it be viewed in SSMS?

    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: Where is my package saved?

    Thanks Jack that is awesome 🙂

    ----------------------------------------------
    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: Creating crosstab/pivot table

    HI,

    Here is another example using the new SQL 2005 UNPIVOT operator:

    DROP TABLE #Temp

    CREATE TABLE #Temp ([Code] VARCHAR(6), [Panel No] INT, [Bay No] INT, [Closing Code] CHAR(1),

    [Test Product] VARCHAR(3), [Oil...

    ----------------------------------------------
    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: SQL 2000 db, queries running slow in SQL 2005

    mmmm

    Interesting , I'm pretty sure view have the same execution plan as the same query run outside the view.

    Do you have test data for us to examine this?

    ----------------------------------------------
    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: Inserting mulitple rows from 1 table into multiple joined tables w/ identity

    OK if you create a temp table then do the first output into that temp table then you all the data in there to use to input into as many...

    ----------------------------------------------
    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: Inserting mulitple rows from 1 table into multiple joined tables w/ identity

    HI there,

    try to look up the OUTPUT command in BOL

    This will help you do the inserts without having to do a loop.

    By the way to loop in SQL you can...

    ----------------------------------------------
    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: Help with a T-SQL query.

    IS this sort of what you looking for?

    DECLARE @Orders table

    (Order_Number INT , Total_Cases INT)

    INSERT INTO @Orders

    SELECT 1,4 UNION ALL

    SELECT 2,6 UNION ALL

    SELECT 3,3 UNION ALL

    SELECT 4,2 UNION ALL

    SELECT 5,5

    DECLARE @OrderLines...

    ----------------------------------------------
    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: Trailing spaces in my where clause

    Thanks for the explanation that's perfect 🙂

    ----------------------------------------------
    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: Trailing spaces in my where clause

    HI Jack,

    Interesting article thanks.

    I have a few questions.

    Firstly our DB has Ansi_Padding Enabled = False

    I take it this is the same as SET Ansi_Padding Off ?

    IF the above is...

    ----------------------------------------------
    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: Trailing spaces in my where clause

    thanks

    WOW I'm a bit embarressed that I never knew that SQL did out RTIMMING.

    Maybe it's just that the environment that I work in before at the different padding setting...

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