Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5987635
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T22:50:37+00:00 2026-05-22T22:50:37+00:00

Hello All I would like to see an example how to check if pappssn

  • 0

Hello All I would like to see an example how to check if pappssn exsist in database before the update is complete. If so to raise an error record exsist. My front end is VB however i would like to handle this within SQL in my stored procedure if possible. Any Ideas?

ALTER Procedure [dbo].[usp_insertmemapp](
@pappfname nvarchar(50),
@pappmname nvarchar(50),
@papplname nvarchar(50),
@pappwedding nvarchar(50),
@pappstateresidence nvarchar(50),
@pappstreet nvarchar(50),
@pappcity nvarchar(50),
@pappstate char(2),
@pappzip char(6), 
@papphomephone nvarchar (13), 
@pappfax nvarchar (13), 
@pappaltstreet nvarchar(13), 
@pappaltcity nvarchar(25),
@pappaltstate char(2),
@pappaltzip char(6), 
@pappalthomephone nvarchar (13),
@pappaltfax nvarchar(13), 
@pappssn char(11), 
@pappdob nvarchar(50), 
@pappcell nvarchar(13), 
@pappemail nvarchar(50),   


BEGIN TRY
BEGIN TRANSACTION

INSERT INTO [a_abacus].[dbo].[primaryapplicant]
VALUES(
@pappfname,@pappmname,@papplname,@pappwedding,@pappstateresidence,@pappstreet,@pappcity,@pappstate,
@pappzip,@papphomephone,@pappfax,@pappaltstreet,@pappaltcity,@pappaltstate,
@pappaltzip,@pappalthomephone,@pappaltfax,@pappssn,@pappdob,@pappcell,@pappemail,


Commit Transaction
END TRY
BEGIN CATCH
ROLLBACK
END CATCH
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T22:50:37+00:00Added an answer on May 22, 2026 at 10:50 pm
    ALTER Procedure [dbo].[usp_insertmemapp](
    @pappfname nvarchar(50),
    @pappmname nvarchar(50),
    @papplname nvarchar(50),
    @pappwedding nvarchar(50),
    @pappstateresidence nvarchar(50),
    @pappstreet nvarchar(50),
    @pappcity nvarchar(50),
    @pappstate char(2),
    @pappzip char(6), 
    @papphomephone nvarchar (13), 
    @pappfax nvarchar (13), 
    @pappaltstreet nvarchar(13), 
    @pappaltcity nvarchar(25),
    @pappaltstate char(2),
    @pappaltzip char(6), 
    @pappalthomephone nvarchar (13),
    @pappaltfax nvarchar(13), 
    @pappssn char(11), 
    @pappdob nvarchar(50), 
    @pappcell nvarchar(13), 
    @pappemail nvarchar(50),   
    
    
    BEGIN TRY
    BEGIN TRANSACTION
    
    -- this is the important change...
    IF NOT EXISTS (SELECT pappssn FROM a_abacus WHERE pappssn = @pappssn)
    
        INSERT INTO [a_abacus].[dbo].[primaryapplicant]
        VALUES(
        @pappfname,@pappmname,@papplname,@pappwedding,@pappstateresidence,@pappstreet,@pappcity,@pappstate,
        @pappzip,@papphomephone,@pappfax,@pappaltstreet,@pappaltcity,@pappaltstate,
        @pappaltzip,@pappalthomephone,@pappaltfax,@pappssn,@pappdob,@pappcell,@pappemail,
    
    Commit Transaction
    END TRY
    BEGIN CATCH
    ROLLBACK
    END CATCH
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Update the question Hello All, I would like improve my email address validation code.
Hello I create jquery ui dialogs dynamically and would like to close them all
update: I would like to pass the var value to the server hello, same
On user click I would like to get a list of all elements that
I have some .doc binary files stored in my database and i would like
Hello all, I need to create a query for house search, that would match
Hello all you helpful folks @ stackoverflow! Best resources for Java GUI's? Looking at
NOTE: Using .NET 2.0, and VS2005 as IDE Hello all, I'm working on logging
$('div.box').html(hello) puts the word hello inside all my div's of class 'box'. They all
All of my codes fail. They should print he, hello and 5 \n 3,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.