Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MyGeneration DAL help

Status
Not open for further replies.

baden100

Programmer
Apr 26, 2006
10
US
I'm having trouble creating a query that compares values in the same table, ie:

Code:
SELECT [fields]
FROM

WHERE column1 = column2


It's simple to compare a field value to another value, ie
WHERE column1 = 332.55;

But having issues with the first one:
Code:
entCards.Where.AprCashNUM.Value = 10;
entCards.Where.AprCashNUM.Operator = WhereParameter.Operand.LessThan;
entCards.Where.BalTransFee.Conjuction = WhereParameter.Conj.And;
entCards.Where.IntroductoryRateNUM.Value = entCards.Where.AprPurchNUM.Value;


Something like this. So in this query I want all values less than 10 (which works) and vwhere IntroRate = AprPurch.


Can someone help me with this?


Thanks.
 
thats strange, that query must work. do u have sample data???

Known is handfull, Unknown is worldfull
 
That code looks strange. That IS for Microsoft SQL Server isn't it? (That's what this forum is for).

-SQLBill

Posting advice: FAQ481-4875
 

Hey guys... yeah, I know this is for SQL Server, and I'm using MyGeneration's d00dad's DAL architecture for SQL Server.

Thought someone here may be able to lend a hand to this.
 
I'm having trouble following your WHERE code. I'm not at all familiar with MyGeneration.

But, isn't that code in the wrong order? Shouldn't it be:
Code:
entCards.Where.AprCashNUM.Operator = WhereParameter.Operand.LessThan; 
entCards.Where.AprCashNUM.Value = 10;
entCards.Where.BalTransFee.Conjuction = WhereParameter.Conj.And; 
entCards.Where.IntroductoryRateNUM.Value = entCards.Where.AprPurchNUM.Value;
(remember, I don't know MyGeneration code. So I could be wrong)

Why don't you think it's working? Are you getting an error? Are you getting wrong data results? If you are getting an error, please post it. If you are getting wrong data results, can you provide 1)sample data, 2)what you are getting returned, and 3) what you want returned?

-SQLBill

Posting advice: FAQ481-4875
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top