Forum Replies Created

Viewing 15 posts - 1,711 through 1,725 (of 5,502 total)

  • RE: Script to Return all User Tables, Including Column Names

    David Fulton-420388 (3/30/2011)


    Now I feel rather silly.

    The db that we are migrating into is 2005. The old db, the one that I'm trying to get the information from is...



    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: Incorrect syntax near ';'

    There's an unclosed code block (BEGIN without END).

    Strong hint: Proper indention helps a lot... 😉



    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: Script to Return all User Tables, Including Column Names

    David Fulton-420388 (3/30/2011)


    Hi Lutz,

    I'm executing it with Query Analyzer.

    Thanks.

    Dave

    Errmmm - Query Analyzer?

    You're not using SQL Server 2005 or beyond then? (that's what I assumed based on the forum you posted...



    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: Script to Return all User Tables, Including Column Names

    David Fulton-420388 (3/30/2011)


    Lutz and ColdCoffee,

    Thank you for replying.

    Unfortunately, Lutz's query returns this:

    "[Microsoft][ODBC SQL Server Driver]COUNT field incorrect or syntax error"

    Thank you.

    Dave

    Please provide more details about how you're using the 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: Script to Return all User Tables, Including Column Names

    :blush:

    😀



    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: Script to Return all User Tables, Including Column Names

    Something like this?

    SELECT t.name AS table_name,

    c.name AS column_name,

    y.name AS column_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: CTE vs Derived Tables

    Unfortunately, based on the original table DDL you provided the code won't run.

    Please provide the DDL for all related tables as well as sample data and values for the parameter...



    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: Memory pressure please help!!!

    samsql (3/29/2011)


    ...

    About the upload it gets uploaded from the text file one by one(here the data gets update or insert).

    ...

    If you're talking about a row by row approach then: OUCH!

    Get...



    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: Are the posted questions getting worse?

    Alvin Ramard (3/29/2011)


    ...

    Sorry folks, I was hibernating 😎

    I hope you're feeling better now. What type of medicine did you take to cure the disease? 😀



    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: detecting similarity among tables attributes(columns)

    You could start with the following query returning all tables and related columns in a database:

    SELECT

    t.name AS table_name,

    c.name AS column_name

    FROM sys.tables t

    INNER JOIN sys.columns c

    ON...



    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: EXCEL TO SQL EXPRESS 2008 R2

    Step 1: verify the data make sense in terms of describing the business scenario.

    Example: Do you have rows in your import table with "Company A", "Company A Inc.", "Company A,...



    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: Memory pressure please help!!!

    I'm neither Gail nor Jeff nor do I consider myself a "biggie" but here's what I think might be the issue:

    Most of the high counters are related to SQL Plans,...



    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 join to another table when you need to see the data from the second tables column without increaseing the record count when the tables have a 1 to many relationship

    Here's the CTE solution using MIN(SubmissionBatchID).

    Side note: I also change the way to query for the year 2009 to make it SARGable...

    ;WITH cte AS

    (

    SELECT submissionID, MIN(SubmissionBatchID)

    FROM tblsubmissionHistory

    GROUP BY submissionID

    )

    SELECT ...



    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 join to another table when you need to see the data from the second tables column without increaseing the record count when the tables have a 1 to many relationship

    You need to define the submissionbatch you want to return if there is more than one. You could either use MIN(),MAX(),SUM() or any other aggregation you like.

    But then you'd need...



    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 query Extended Properties from multiple servers

    Here's a script to query the data per SQL instance:

    EXECUTE sp_msforeachdb 'USE ? SELECT DB_NAME(); SELECT *

    FROM sys.extended_properties'



    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 - 1,711 through 1,725 (of 5,502 total)