Forum Replies Created

Viewing 15 posts - 451 through 465 (of 582 total)

  • RE: How Can I store the store the result set by using sp_execute

    Take a look at this thread: http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=8&messageid=18819

    It has some good information similar to you question.

     

    Kathi

  • RE: Count number commas in string

    Frank,

    I agree that your solution would be more efficient.  I don't have to use profiler to see that.  I knew my solution would work, but suggested that this be done...

  • RE: Count number commas in string

    You would have to create a UDF that counts the commas and returns the count.  If this data is being returned to an application, I think it might be more efficient...

  • RE: In Enterprise Manager, no servers listed

    If SQL Server is actually installed do you see a server called (local)?  If so, that is your server. 

    Or maybe you need to register the server in EM.  Right...

  • RE: Complex Stored Procedure

    No that you have your stored proc compiled, you can use the Debugger in Query Analizer to step through your code and follow the logic.

    1. Open the Object Browser. ...

  • RE: Update using multiple columns

    The correct query should look something like this:

    UPDATE det
    SET  det.SFDT_QtyMonth1 = tmp.TMSF_QtyMonth1,

      det.SFDT_QtyMonth2 = tmp.TMSF_QtyMonth2,

      det.SFDT_QtyMonth3 = tmp.TMSF_QtyMonth3

    FROM OPT_SalesForecastHeader hd INNER JOIN

             OPT_SalesForecastDetail det ON hd.SFHD_SalesPlanCode =      det.SFDT_SalesPlanCode INNER JOIN

                  OPT_TMPSalesForecast tmp ON det.SFDT_PackCode =...

  • RE: reseting an autonumber

    Here is an example from Books On Line that resets the number to 30 :

    USE pubs
    GO
    DBCC CHECKIDENT (jobs, RESEED, 30)
    GO

     
    Hope this helps,
    Kathi

  • RE: Complex Stored Procedure

    You are using "  when you should be using ' .

    IF @inputUsed <> ' ' or @inputUsed <> null

    IF @inputUsed = 'InUse'

    BEGIN

    I have changed all of the " to ', and ran...

  • RE: MySQL vs SQL server comparison

    You will find that even though this site is dedicated to SQL Server, its members work and play in the real world that includes many database systems. 

    I haven't used MySQL or...

  • RE: Replication alternatives

    You can use DTS to copy data to your reporting database.  This can be scheduled as a job to run every 30 minutes.  You will have to make sure that...

  • RE: composite indexes... higher cardinality first or lowest?

    I'm not sure if it happens all of the time.  I have seen it happen, but maybe it is because I had to use > instead of =.

  • RE: composite indexes... higher cardinality first or lowest?

    Highest cardinality first is better.  Is your TimeFrom column a dateTime field?  I've noticed SQL not using the index on a dateTime field.

  • RE: Problems with simple select Statement

    Try this:

     

    Adodc1.RecordSource = "Select * from Servicereport where (employeenumber= " & CurrentEmployeeNumber & "and PrintStatus  = 'Pending') or (Department =" & CurrentDepartment & "and PrintStatus  = 'NonApproved'  ) Order By...

  • RE: Complex Stored Procedure

    Cool!   Be sure to continue to post your questions, this is a great site with lots of helpful members.

  • RE: Complex Stored Procedure

    OK, you need to test your proc and this is how I would do it.  Comment out your execute line and add a print line:

    --EXEC (@strSQL)
    Print @strSQL
    Then run your proc...

Viewing 15 posts - 451 through 465 (of 582 total)