Forum Replies Created

Viewing 15 posts - 3,631 through 3,645 (of 5,502 total)

  • RE: MySQL Stored Procedure

    If you're using MySQL and not SQL Server you probably should try a MySQL forum instead....

    The solutions we're posting probably won't work...



    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 to improve a query with a like statement

    ricardo_chicas (4/28/2010)


    I simplify the query a lot, I need the others tables, but with just the one with the a.column_key like ....., is enough to have a really poor performance

    Most...



    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: list possible values for the DATA_TYPE column in INFORMATION_SCHEMA.COLUMNS view

    The nvarchar(128) is the defined type and length for identifiers (see BOL, section "identifiers [SQL Server]")

    I would use the allowed tpes as described for base_types when creating a user-defined type...



    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 to improve a query with a like statement

    First question:

    Why do you have table2 and table3 in your query? They are neither part of your SELECT nor your WHERE condition....

    To help you any further please post more detailed...



    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: OPENXML TSQL INSERT

    Digs (4/28/2010)


    ....

    Sorry I dont understand your response, and could you please coment on my performance concern with 20,000 records...

    Your performance concern comes second. First we have to understand what you'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: OPENXML TSQL INSERT

    Digs (4/28/2010)


    Ok thanks you answered 1,2,4 for me,thanks.:-D

    But you missed 3..

    ...

    No, I didn't. I told you that the information you provided so far is not consistent. You use columns in...



    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: OPENXML TSQL INSERT

    @matt-2: you beat me this time... :crying:

    But at least our answers do not contradict... 😉



    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: OPENXML TSQL INSERT

    Digs (4/28/2010)


    Sure whatever works..

    So I just do

    INSERT INTO dbo.DIM_OHLC_Xml

    SELECT

    @symbol AS Symbol,

    @CurrDate AS Currdate,

    ...



    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: OPENXML TSQL INSERT

    You might want to use XQuery instead of Openxml:

    DECLARE @xml XML

    SELECT @xml='<ohlc>

    <record date="02/01/2010" open="125.25" high="126.25" low="124.25" close="125.20" volime="554651668" adjclose="125.20" />

    <record date="02/02/2010" open="126.25" high="127.25" low="125.25" close="126.20" volime="548935488" adjclose="126.20" />

    <record date="02/03/2010" open="125.25"...



    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: Trying To Do an UNPIVOT But Not Sure If I need To

    If you have a fixed number of brand_names then you could either use PIVOT (see BOL, aka BooksOnLine, the SQL Server help system), or CrossTab (see the related link in...



    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: SQL query help please

    You're referencing different tables in your SELECT and GROUP BY clause:

    SELECT

    dbo.DimAge.Age,

    dbo.DimSex.Sex,

    dbo.DimOccupation.Occupation

    GROUP BY

    DimCountry.Age,

    DimTaxDetails.Sex,

    DimRace.Occupation

    Since we're talking about a cross join across 10 tables: I truly...



    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: Help me to write a query

    Grant Fritchey (4/28/2010)


    People here may not have, or may not want, StackOverflow logins to answer your question. If you want an answer here, ask the question here. Otherwise, wait patiently...



    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 to get the previous ID from this query

    The code you're running is basically a triangular join which probably doesn't scale very well...

    You should look into ROW_NUMBER().

    Something like this (untested, since ne ready to use sample data to...



    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: Help on counting working days between two variable dates

    Something like this?

    SELECT SUM(CASE WHEN daytype ='W' THEN 1 ELSE 0 END) as total_days

    FROM TM_calendar

    WHERE yourColumn>= @startDate

    AND yourColumn<@endDate



    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: Filtering data using float column

    Here's a sample code that works as expected:

    DECLARE @tbl TABLE ( float_column FLOAT )

    INSERT INTO @tbl

    SELECT 0 UNION ALL

    SELECT 0.001 UNION ALL

    SELECT -0.001 UNION ALL

    SELECT -1110

    SELECT *

    FROM ...



    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 - 3,631 through 3,645 (of 5,502 total)