Forum Replies Created

Viewing 15 posts - 1,456 through 1,470 (of 3,221 total)

  • RE: Extract 3 months worth of data

    I am asked to extract 3 months worth of data from sql server into a pipe-delimited .txt file with text qualifiers (quotes around the text fields) and with column headers.

    Pardon...

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • RE: Extract 3 months worth of data

    Look up the DATEADD function in Books On Line (BOL).. Now this is a vastly over simplified example"

    SELECT DATEADD(mm,-3,GETDATE()) AS '3 months ago', GETDATE() AS 'Current date'

    Returns:

    3 months ago ...

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • RE: Query with nested subqueries

    barb0822

    To receive tested answers please, please post Table definition(s), some sample data, (you have already posted your T-SQL statement, but not in an easy to use format), and the...

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • RE: help with select statement

    A slightly different way, and in most respects equivalent to GSquared's answer

    CREATE TABLE #T(ID INT,aNAME VARCHAR(20),PHONE VARCHAR(15))

    INSERT INTO #T

    SELECT 1,'user1','5555551234' UNION ALL

    SELECT 2,'user1','5555552222' UNION ALL

    SELECT 3,'user1','1235554444' UNION ALL

    SELECT 4,'user2','1234567890' UNION...

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • RE: fill datagridview with 5 million record & transactions

    Lowell

    take a look at this ms article on using datagrids and paging...maybe that is really what you were looking for?

    http://msdn.microsoft.com/en-us/library/aa479006.aspx

    saeed hg -Think of what your select statement Select *...

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • RE: Are the posted questions getting worse?

    Jeff Moden (2/5/2011)


    Steve Jones - SSC Editor (2/4/2011)


    I had the pleasure of Mr. Moden's company at dinner for a couple hours tonight at SQL Saturday #60. If any of you...

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • RE: Design Suggestions needed for Scoring Expression Based Logic

    Nasreenm (2/4/2011)


    Thanks for the detailed input. I will take a good look at the code and have a bit of a play around with it. The good...

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • RE: fill datagridview with 5 million record & transactions

    Here is some code (Originall posted by Jeff Moden and some what modified by myself)

    Note that the code uses a temp table, but you can change that by inputting a...

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • RE: 'sp_MSforeachdb' expects parameter '@command1',

    pankushmehta (2/3/2011)


    it is working for me. I have tested it both on SQL 2005 SP3 and SQL 2008 R2. What version are you running it on?

    SQL 2005 SP3 and SQL...

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • RE: 'sp_MSforeachdb' expects parameter '@command1',

    Try it this way

    SP_MSForEachDb 'SELECT table_name from [?].information_schema.tables

    where table_name = "table1"'

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • RE: how to join two store procedure together

    what if I use #temp table, is this will happen the same thing),

    No it will not happen - Read this from BOL (Books On Line - the help file for...

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • RE: Order by months (financial year rather than calendar year)

    Is there a way to tell SQL to do this very simply in the ORDER BY clause? I treid DATENAME

    Look at this very short article(Author: Jeff Moden), with lots...

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • RE: fill datagridview with 5 million record & transactions

    saeed hg (2/3/2011)


    hi to all. i have 2 question.I am a newbie. please

    Following are my questions

    1-what's the best and fastest way for fill datagridview with 5 million record ...

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • RE: Design Suggestions needed for Scoring Expression Based Logic

    I would try something like this:

    SET ANSI_NULLS ON

    GO

    SET QUOTED_IDENTIFIER ON

    GO

    SET ANSI_PADDING ON

    GO

    CREATE TABLE [dbo].[QScores](

    [Id] [int] NOT NULL, --to identify who took the test

    ...

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • RE: How to get object name from server wide DMV ?

    Look at this item as determine if it will the work you require.

    It is for SQL 2000 and may have to be modified slightly:

    A more efficient ForEach routine

    http://www.sqlservercentral.com/scripts/Miscellaneous/30900/

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

Viewing 15 posts - 1,456 through 1,470 (of 3,221 total)