Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

CAML Question (To query a list)

  Asked By: Ladonna    Date: Apr 28    Category: Sharepoint    Views: 1718

When querying a list using CAML, is there a way to format the <Where> to have
Column1 = Column2?

Share: 

 

3 Answers Found

 
Answer #1    Answered By: Corrine Potts     Answered On: Apr 28

AFAIK you can't change Colum1 to be Column2 but you can use <xsl:when
test="Column1 = something">[display Column2</xsl:when>

NOTE: CAML syntax probably is not correct but you get the idea.

 
Answer #2    Answered By: Kabeer Karkare     Answered On: Apr 28

You can achieve this by two ways, Easy Create.

 
Answer #3    Answered By: Nathaniel Davis     Answered On: Apr 28

You can achieve by two optios,

Option 1:
Create a column named Column3 as calculated column type and type the formula as
"=Column1=Column2" and data type returned by this column as "Yes/No". Now the
newly created column will hold Yes if both column has same value else No will be
available.

Option2:
Simply convert the SPList to DataTable and in the DataTable filter, give the
condition like "Column1 = Column2"

 
Didn't find what you were looking for? Find more on CAML Question (To query a list) Or get search suggestion and latest updates.




Tagged: