Forum Replies Created

Viewing 15 posts - 481 through 495 (of 668 total)

  • RE: Plzz help me in replacing the cursor with Normal Sql Statements

    How about using a CTE?

    ;with cte as (select Eligibility_ID, SubScriber_ID, Start_Date, End_Date,

    ROW_NUMBER() OVER (Partition by Subscriber_ID ORDER BY Subscriber_ID, Start_Date, End_Date) as Span_Num

    FROM Eam_Member_Eligibility EME1 )

    update e

    ...

  • RE: Partial Update

    sounds like homework. If it isn't then can you post DDL and what you have tried so far?

  • RE: Doubt in a SQL Server function

    Did any of this resolve your issue? Can you post your solution or point to what the solution was?

  • RE: comparative stored procedure

    I'm glad that you just started coming to this forum and have it all figured out. As an FYI, we are volunteering our time to try to help others...

  • RE: Doubt in a SQL Server function

    your code doesn't work. Need to change the dash to underscore. Since you didn't provide table layouts, I used a sys.tables and it functions as expected.

    declare @sd...

  • RE: comparative stored procedure

    Sharon, can you provide table layouts, sample data and some expected results? Check out the first link in my signature on how to post to this site

  • RE: Problem using IF EXISTS in a stored procedure

    ok, if you don't want to use truncate, then the reason your code doesn't work is because of the Go. Try this

    CREATE PROCEDURE usp_proc_d_zone AS

    begin

    IF EXISTS (SELECT *...

  • RE: MERGING TABLES - SQL QUERY .. HELP PLS

    Not sure what you want to call the last column but here goes. I think you were looking for a header record then the following detail records.

    CREATE TABLE #TEMP_MAIN...

  • RE: Store Procedure

    yes, you should look in Books OnLine

  • RE: Problem using IF EXISTS in a stored procedure

    why would you want to drop and recreate it? This will cause users running this proc to have elevated privileges on the database. Why not just truncate...

  • RE: stored procedure and parameter

    DooDoo (7/22/2010)


    If I understand your question correctly, you want to execute a specific query based upon the incoming parameter. If that's the case, sounds like you'll need to build...

  • RE: Inconsistency code

    The code that christopher gave you is probably better to use since you don't have to declare any variables, Just select the values from the table as you are...

  • RE: Stored Procedure

    Could it be as simple as this? :unsure:

    if Project = 105000 and Intercompany Loan Accounts not between 125100 - 125950

    begin

    ...

  • RE: GET MAX- MIN VAlUES

    Here's one way

    declare @t table (AppID int, AppName varchar(10), Version int, AppCount int)

    insert into @t

    select 1,'Access',2000, 12 union all

    select 2,'Access',2001, 34 union all

    select 3,'Access',2002, 7

    select a.AppID, a.AppName, a.Version, a.Appcount,...

  • RE: how to call sql function in stored procedure

    I'm not sure how big your tables are, but the following will perform a table scan instead of using an index which will cause huge performance issues on larger tables

    WHERE...

Viewing 15 posts - 481 through 495 (of 668 total)