Forum Replies Created

Viewing 15 posts - 13,201 through 13,215 (of 13,841 total)

  • RE: Saving to a csv file

    Semi-automatically.  Select Tools/Options/Results and set 'Results to File' as the 'Default Results Target' and set the Results output format to CSV.

    But you'll have to supply the filename and path.

    If you...

  • RE: Excel Column widths larger than 255....

    Although the maximum column width in Excel is 255 characters, that is not the maximum length of data that can be stored in a column, which is 32,767 characters.

    DTS will...

  • RE: Creating tables using Management Studio

    Can you post the script that generated the error?

  • RE: log data

    This appears to be a reply to a non-existent message

  • RE: I created the tables with admin user.Why I am not able to see all the tables in SQL Server?

    So you are not seeing the tables in QA's Object Browser after creating them?  Have you tried refreshing the view?  Have you tried looking via Enterprise Manager?

  • RE: Embedding Single Quote in text string in INSERT INTO value

    Not sure about SQL7, but in SQL Server 2000, you could consider using

    SET QUOTED_IDENTIFIER

    to get round this.

  • RE: I created the tables with admin user.Why I am not able to see all the tables in SQL Server?

    This question is not detailed enough.

    How did you create the tables - what tool did you use?  What tool are you using to view the tables?  Who were you logged...

  • RE: Query Performance

    This is certainly one of the more bizarre and exasperating threads on the go at the moment - suggestions for differences in performance have been posted and these seem perfectly plausible...

  • RE: Defining a default value, how to?

    You are wrong in stating that functions cannot be used as defaults - getdate() works fine, for example.

    What can be used - from BOL:

    "Is an expression that contains only constant...

  • RE: Data Purge Process taking more Time.....

    Given that you have so many tables, I suspect that the relationships will be pretty complex.  Without knowing the relationships between all the tables, it is difficult to get specific.

    However,...

  • RE: Query Performance

    Try running SQL Profiler when you run the query - you should be able to get exact execution times that way.

  • RE: SQL sub-query problem

    Sticking with Northwind, is this roughly where you're heading?

    select sum(t1.Count1), sum(t1.Count2) from

    (select employeeid,

    Count1 = (

    case

     when Count(EmployeeID) < 100 then Count(EmployeeID)

     else 0

    end

    ),

    Count2 = (

    case

     when Count(EmployeeID) >= 100...

  • RE: SQL sub-query problem

    OK, here's an example.  Try running against the Northwind database.

    select employeeid,

    Count1 = (

    case

     when Count(EmployeeID) < 100 then Count(EmployeeID)

     else 0

    end

    ),

    Count2 = (

    case

     when Count(EmployeeID) >= 100 then Count(EmployeeID)

     else 0

    end

    )

    from...

  • RE: SQL sub-query problem

    OK - I see now what you're trying to do.

    One idea I've had, which I've not tested, is for you to have a single subquery containing two counts

    select studentid, count1,...

  • RE: SQL sub-query problem

    If you put the COUNTs in the subqueries, I think that this will work:

    SELECT t1.TotalRows, t2.TotalRows FROM

    (SELECT count(StudentID) TotalRows

    FROM Attendance

    WHERE ClassId=1 and Month(Date)=11 and status=0

    GROUP BY studentID

    HAVING...

Viewing 15 posts - 13,201 through 13,215 (of 13,841 total)