Computer problems,Computer help
*AX SOFT>>>Programming & Design

Can I do this in TSQL?


I'm trying to write a T-SQL script that involves cursors.
I'm getting errors. Is this code ok?
(all variables are varchar(20))

if @PhoneID=@PrevPhoneID and @PhoneType=@PrevPhoneType
Begin
Set @Phonetype=@Phonetype & "2")
End

you dont need the ) after the "2"
you also might want to put parentheses around each part of the if like:

If (@PhoneID = @PrevphoneID) and ()

Where does the ")" come from?

Are you getting compile errors, run time errors, or logical bugs?

Tags
  General - Computers & Internet   Software   Security   Programming & Design   Facebook   Flickr   Google   MSN   MySpace
Related information
  • PLEASE HELP! How do you add a comment box and have the comments sent to your email in Dreamweaver 8?

    First of all WARNING! DANGER! A properly designed comment box is a highly complex piece of software. Why? A comment box is two parts. (1) The web form that you design in Dreamweaver, along...

  • I need serious help with Java!?

    Flow charts for programming are usually a graphical representation of objects. (Sorry about the spacing problems, it seems I can't give you cleaner code with indentions and what not - ignore ...

  • I'm having problems making a calculator with Javascript?

    If you want to you can copy and paste your code into an email and i can try and help you out

    ...
  • What about CSS file size?

    30KB is pretty large. Try to separate your stylesheets into sections, and only make the browser call them when it's needed (e.g., only call the "search" stylesheet when a user perfo...

  • How do i do this in ms word?(#ing the pages?)?

    Go to Insert, and Page Numbering. Another window will come up and you pick how you want the pages numbered. At the bottom, top, right hand side or left.

    ...
  • I'm looking for the website that help me to learn better abuot c++...?

    just check these link i google c++ tutorials and results:442,000

    ...
  • Graphic Designers: Illustrator VS In Design?!?

    Hey! You are mastering the graphic design tri-fecta. The rule i go by is Illustrator for cartoons/illustrations/vecter work, photoshop for photos/web/multi combo documents, and indesign for text la...

  • How to check if PHP was installed properly?

    First, how exactly did you install these? Did you use the MSI installers? If so, that should have configured everything for you properly. Also, I notice that you didn't get Apache from the ...

  •  

    Categories--Copyright/IP Policy--Contact Webmaster