SQL Concatenation

Results 1 to 2 of 2

Thread: SQL Concatenation

  1. #1
    Tony H Guest

    Default SQL Concatenation

    I have a rather long insert statment that I want to concatentate on multiple lines so it&#039s easier to read. What is the syntax for this? <BR>Thanks!

  2. #2
    Join Date
    Dec 1969

    Default RE: SQL Concatenation

    I assume you mean that in your ASP page you want to break up a SQL statement on several lines? Here is how you can do it:<BR><BR>Dim strSQL<BR>strSQL = "INSERT INTO TableName (Name, Age, Location) " & _<BR>"VALUES(&#039Scott&#039,21,&#039Missouri&#039 )"<BR><BR>Just use the string concatenation character (&) and then the underscore (which, in VBScript, means that the line of code is continued on the next line)...<BR><BR>Happy Programming!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts