• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

where two column match one column

Guest
Mar 05, 2007 Mar 05, 2007

Copy link to clipboard

Copied

hi in my where clause i need to match 2 column to 1

ie
session.CODE = 33
SN.code45= 5555

So what i need is session.CODE and SN.code45 (together with no space) = from

335555 = from
TOPICS
Advanced techniques

Views

264

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Deleted User
Mar 05, 2007 Mar 05, 2007
right(myString, len(myString)-2)

Votes

Translate

Translate
LEGEND ,
Mar 05, 2007 Mar 05, 2007

Copy link to clipboard

Copied

If these are cold fusion variables you can simply concatonate them.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 05, 2007 Mar 05, 2007

Copy link to clipboard

Copied

depending on the type of db you are using you may have some
concatenation functions available to you - check the sql language
reference for your db.

otherwise, if you form value you are checking against is of fixed format
- i.e. first 2 characters (to be checked against session.CODE) + other 4
characters (to be checked against SN.code45) - you can use:
session.CODE = #left(formvalue, 2)# AND SN.code45 = #right(formvalue,
len(formvalue)-2)#

--

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Mar 05, 2007 Mar 05, 2007

Copy link to clipboard

Copied

hi tried that but with no success, so i will go another way and input the number to the table, but drop the first 2 number off

ie 446666

so i need to input 6666, how would i drop the 2 numbers off, before i do my insert?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 05, 2007 Mar 05, 2007

Copy link to clipboard

Copied

LATEST
what exactly did you try? can you post your code that did not work?

--

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Mar 05, 2007 Mar 05, 2007

Copy link to clipboard

Copied

right(myString, len(myString)-2)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation