Forum Replies Created

Viewing 15 posts - 121 through 135 (of 142 total)

  • RE: Cascading delete in many to many

    I assume that a child is also a person. If that is not true then most of what follows will not help you.

    You should have a person table with...

  • RE: dynamic queries in sql

    Hi Abhijit,

    personally, I think it is a mistake to accept the text of the where clause from the application. First, you are opening a huge security hole for SQL...

  • RE: dynamic queries in sql

    Hi Abhijit,

    I don't think you can avoid Dynamic SQL if your intention is to have the application supply the text of the where clause as an input parameter the way...

  • RE: Indexes

    I think the answer depends a lot on the nature of your queries. I have found tables with 6 or more indexes, each on a single foreign key column....

  • RE: 2 record to 1

    I see what you are trying to do but there are several problems that stand in your way. The first one is that you don't have a primary key...

  • RE: Update using a self-join

    Your update statement needs to reference the appropriate table alias rather than the actual table name. Once you alias the table in the from clause (which I almost always...

  • RE: What Happened?

    Is there a question here?

  • RE: Need help or suggestion doing maintenance plan

    Spend some time on Paul Randal's web site and blog. http://www.sqlskills.com/default.asp

    He and Kimberly Tripp (same site) have a whole series of posts and articles on the "Accidental DBA"...

  • RE: .LDF FILE

    The T-Log is a strange and somewhat intractable thing. The log file location and property settings can have a signifcant impact on system performance. If your initial size...

  • RE: Avoiding cursor in a cumulative sum

    This link is to an article about accessing the Previous Row.

    It should help you get started. If you search this SQLServerCentral for "Previous Row" you will find a number...

  • RE: Abort SQL-Script with raiseerror

    The easiest way to pass information between batches is with a Temp Table.

    So at the beginning of the script you have something like

    If Object_Id('TempDB..#ErrorTab) is not null Drop Table #ErrorTab

    Create...

  • RE: Problem in transaction

    I see at least two paths that Begin Tran and then Return.

    In your first conditional block if the password parameter is empty string or null you do a return leaving...

  • RE: Abort SQL-Script with raiseerror

    Using the RasiError (Error Level < 20) and Return pattern works fine for the "BATCH" but if your script contains multiple batches separated by "Go" then the remaining parts...

  • RE: query to linked server fails when variable used for server name

    Hi.

    I don't know of any direct way to accomplish what you are trying without using dynamic SQL. You cannot use variables in place of table names, column names, etc...

  • RE: Identifying Queries Running Slower Than Normal

    The Code posted is tough but the attached Word document is very good. I think they just cut&pasted the Word text into the post and that just does not...

Viewing 15 posts - 121 through 135 (of 142 total)