Forum Replies Created

Viewing 15 posts - 4,516 through 4,530 (of 5,502 total)

  • RE: concatenate

    The following should at least help you to get you started (please note how I set up sample data in a ready to use format...)

    DECLARE @t TABLE (ID INT ,Key_...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: import from excel to a sql table

    I cannot confirm what you describe:

    Table definition:

    CREATE TABLE [dbo].[Table_1](

    [z] [int] IDENTITY(1,1) NOT NULL,

    [a] [int] NULL,

    [int] NULL,

    [c] [int] NULL,

    [d] [datetime] NULL CONSTRAINT [DF_Table_1_d] DEFAULT (getdate())

    ) ON [PRIMARY]

    Excel file (grid...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: update qry

    Lynn Pettis (1/12/2010)


    We are updating the column with the results of the "concatenation". Since the field is real (numeric) 2009.1 and 2009.10 are the same.

    It's still an insoluble puzzle...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: update qry

    Just for the sake of it (since the business reason is still a secret to me):

    DECLARE @TheColumn INT

    SET @TheColumn = 1

    SELECT left((2009 + @TheColumn / CASE WHEN @TheColumn <10...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: update qry

    Lynn Pettis (1/12/2010)


    ...

    Basically:

    2009. + 1 = 2009.1

    2009. + 10 = 2009.10

    Both values are numerically the same and the column is defined as a real value. ...

    Completely understood. But...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: update qry

    Tara-1044200 (1/12/2010)


    great, Lynn's query

    update dbo.TheTable set

    TheColumn = 2009 + (TheColumn / 100.00)

    worked for me.

    For the same real data type how would i update...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: update qry

    WayneS (1/12/2010)


    ..

    The data was enclosed in quotation marks, so it was assumed that this was a string.

    ...

    I agree with you and my comment didn't question your solution at all...

    Since we're...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Update field after stiping brackets from data

    Armani (1/12/2010)


    below did it

    update dbo.testtable set testcode = substring(testcode,1,len(testcode)-1)

    Thanks

    That's really strange...

    Your query only removes the last character, but not the first one:

    declare @x varchar(50)

    SET @x='{FFFFFFFF-0000-0000-0000-000000000463}'

    SELECT substring(@x,1,len(@x)-1) --{FFFFFFFF-0000-0000-0000-000000000463

    SELECT substring(@x,2,len(@x)-2) --FFFFFFFF-0000-0000-0000-000000000463

    But...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: update qry

    Here's what I came up with to cover the options I think we're faced with...

    If the base column is of data tpe INT I actually doubt that it would be...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Challenging - SQL XML Task

    sanjai.nbs 57867 (1/12/2010)


    I got to know there is no such option to get the data in MODIFY(). SO I did that with some other method.. Thanks 4 everyone

    Excellent you found...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: How do I schedule to send out query result in certain format like csv or xls? Thanks.

    Based on BOL, extended by some more parameter (untested, but should work):

    EXEC msdb.dbo.sp_send_dbmail

    @profile_name = 'AdventureWorks Administrator',

    @recipients = 'danw@Adventure-Works.com',

    @query...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Where are you?

    Leipzig, (South-) East Germany, Central Europe. 🙂



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: How do I schedule to send out query result in certain format like csv or xls? Thanks.

    It depends on where you want to start...

    Assuming, you need to start from the very beginning, I'd recommend the following article:

    http://www.sqlservercentral.com/articles/Administration/introtodatabasemailinsql2005/2197/

    Once you succesfully send the testmail you should check...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Update field after stiping brackets from data

    You're definitely right...

    Should have limited "fastest" to the solutions provided in the post.

    I'll go and edit it... 😉



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: How do I schedule to send out query result in certain format like csv or xls? Thanks.

    Or you could set up Database Mail and send the data directly as a xls file using a stored proc called by a job.



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

Viewing 15 posts - 4,516 through 4,530 (of 5,502 total)