Forum Replies Created

Viewing 15 posts - 136 through 150 (of 1,216 total)

  • RE: Return first record of each key

    Hi Jeff,

    I'm glad you posted this, because I was trying to explain it several times, but it seems that Rich didn't understand (or understood differently than I meant it).

    Let's hope...

  • RE: Pull data from one Column for a report

    Alex Barefoot (10/2/2008)

    I'm wanting to create a report that looks like this:

    State State_County State_County_City

    TX TXSAN ...

  • RE: Problem with Tsql script

    That's because you need to qualify view with schema (owner in SQLS 2000) every time you mention its name... or use an alias.

    select 'EXEC sp_dropextendedproperty

    @name = ''MS_Description''

    ,@level0type =...

  • RE: Return first record of each key

    Rich96 (10/2/2008)


    Fortunately the records will always be in sequential order based on the key column. I verified with the programmer that same question you had and it will never...

  • RE: Creating Database Objects from a Trigger-invoked stored procedure....

    If you put USE into dynamic SQL, you switch the database just for the duration of EXEC of dynamic SQL, because it runs in a different scope. Next execute (with...

  • RE: Return first record of each key

    Hi,

    there are 2 main problems in what you were trying. First, COUNT(*) < 2 means that there are no duplicates (given the used GROUP BY)... not that it is the...

  • RE: Problem Joining to Table UDF

    I agree with Daryl, it is not possible to return different table for each row... which the poster was trying to do. But the entire query is written in such...

  • RE: Problem Joining to Table UDF

    Could you please describe what are you trying to do? I suspect that this can be done a lot easier without the table function - it seems to me it...

  • RE: SQL IF Statement

    Oh 🙁 I'm sorry. Thanks Gail for catching that, I found the ELSEIF already in your first post and edited my post, but forgot to delete THEN. Well, that happens...

  • RE: SQL IF Statement

    What you are trying is not proper SQL syntax - you have to use SET, and @ with the variables... like this:

    DECLARE @newvar varchar(8)

    IF @APRIORITY = 1 THEN

    SET @newvar...

  • RE: Can't understand the problem with this SP

    I've noticed that column MRN is defined as varchar, while parameter @MRN is defined as nvarchar. In the procedure execution plan, you can see CONVERT IMPLICIT in the first step....

  • RE: A case with GROUP BY

    Sprocking,

    the use of DATEADD and DATEDIFF functions looks a bit strange at first, but is more efficient - and also more flexible. Once you learn how it works, you may...

  • RE: insert values in to table and and save using storedprocedue

    What do you mean by "invisible in the backend"? Maybe you are looking for some encryption, so that if someone runs a query, that person will not see actual data...

  • RE: stop a script

    I'm glad it helped :-).

    Another possibility - in case that you need to run start and end of the code, skipping the middle part, you can use GOTO label:

    select...

  • RE: RBAR update/inserts

    My opinion is that size matters :-). I would recommend doing large scale data modifications in batches. But not Row-by-row! That is the opposite extreme, what you should try to...

Viewing 15 posts - 136 through 150 (of 1,216 total)