Forum Replies Created

Viewing 15 posts - 13,411 through 13,425 (of 13,460 total)

  • RE: delete all content i all tabels in one database

    I think that due to foreign key constraints, a cursor is not the right solution.

    i would recommend adapting the Hierarchy2 script from this site.

    http://www.sqlservercentral.com/scripts/contributions/759.asp

    it returns all tables in the...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Print Query Analyzer SQL in Colour?

    Another text editor with syntax highlighting, which also prints in color is EditPlus http://www.editplus.com

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: how do I identify the calling procedure that caused a trigger to fire?

    another pointer...you should never have a trigger actually send an email; it can take several seconds for the email step to occur, and if there is a network  or other...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: need advise on how to trace deleted record from table

    offhand, i'd bet a buck on the second sql statement, which inserts into delivery_detail.

    i'd say change the 3 LEFT JOIN's to LEFT OUTER JOIN's

    if the join for those 5...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Uninstall of 2005 beta2--ISQLW lost sytax highlighting

    Found it myself;

    Query Analyzer uses the dll sqllex.dll for the definitions of keywords.

    i did the old regsvr32 "C:\Program Files\Microsoft SQL Server\80\Tools\Binn\sqllex.dll"

    and it fixed the issue; hope that helps someone else...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: need advise on how to trace deleted record from table

    Are you sure the data is being deleted, or is there an error in the code and the details never get saved in the first place?

     

    you could grab some of...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: UDF Problem

    couldn't you create a view of the table that has the results of the udf as additional columns of the table/view?

    for example create view vw_sometable as

    select col1,..colN,dbo.fn__special1(col5) as Result1,dbo.fn__special2 (col5,col6)...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: TSQL Command separators or delimiters

    the semicolon is also recognized as a command separator, if that helps.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Error 3709 The connection cannot be used to perform this operation. It is either closed or invalid in this contex

    i would bet that a connection string is incorrect when it is moved to production...

    I don't know your app of course, but if the connections string is hardcoded to look...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Error 3709 The connection cannot be used to perform this operation. It is either closed or invalid in this contex

    I typically see this when an ADODB connection has not been opened, and then you try to open a recordset with the still closed connection;

    for example:

    dim conn As New ADODB.Connection

    conn...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Save the resultant XML in server

    As far as I know, the ONLY way to save your xml is using an application stream for SQL 2000. SQL 2005, with it's more robust XML support, may offer...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Select only stand alone statistics to drop

    apparently a hind_ can be either a hypothetical index or a hypotehetical statistic; note how the tweak the dynamic sql based on the objectproperty:

    from the same MS KB article:

     

    DECLARE @strSQL...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Select only stand alone statistics to drop

    i found out that hind_ items are hypothetical indexes that are used by the index tuning wizard, they are supposed to be auto-removed when the tuning is done; see:

    http://support.microsoft.com/kb/293177

    The...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Select only stand alone statistics to drop

    Remi's knowing the nuances of allowable indid and status values lets him use that to find the drop statements; you'd still have to wrap that into a cursor to get...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Select only stand alone statistics to drop

    The script below uses a cursor nested within a cursor to get the job done.

    in this case it drops ALL statistics, leaving indexes alone.

    SET NOCOUNT ON

    --ONE OF THOUSE HORRIBLE...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 15 posts - 13,411 through 13,425 (of 13,460 total)