Very Simple Question

Results 1 to 3 of 3

Thread: Very Simple Question

  1. #1
    Join Date
    Dec 1969

    Default Very Simple Question

    Not being a programer and indeed only having basic ASP experience my question may not be worded to well, however -<BR><BR>I am looking to get a value from a database, however i only need the first three characters from that value, how do i cut it down creating a variable of only the characters that i require.<BR><BR>Thank you in advance for your replies.

  2. #2
    Join Date
    Dec 1969
    Los Angeles, CA

    Default RE: Very Simple Question

    VariableName = left(Recordset("ColumnName"), 3)<BR><BR><BR>instead of doing this you could select only the first 3 char from the Db itself.......R&D the LEFT function in SQL

  3. #3
    J. Paul Schmidt Guest

    Default RE: Very Simple Question

    To get the first 3 characters from a field called MyField in a recordset called objRS, perhaps do something like the following:<BR>MyVar = Left(objRS("MyField"), 3)<BR><BR>Best regards,<BR>-Paul<BR><BR>J. Paul Schmidt, MBA<BR>Databases on the Web<BR><BR><BR>

Posting Permissions

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