Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

HELP AGAIN

Posted on 2006-06-24
8
Medium Priority
?
275 Views
Last Modified: 2008-02-01
Both of my fields c.userid and o.userid are text fields but I keep getting a mismatched criteria error, but If i change them to number fields the form works.  But by doing that I mess up my entire site.  So how do I write this so that the text fields c.userid and o.userid work in this query

this is my query

SELECT c.*, o.userid, o.company
FROM paymaker AS c, freelance_customers AS o
WHERE c.userid = MMColParam AND c.userid = o.userid AND NXTFilter
ORDER BY c.pmdate DESC

Thank You
0
Comment
Question by:budgilbert67
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 

Author Comment

by:budgilbert67
ID: 16975164
By the way My pages are asp vbscript and my database is microsoft access
0
 
LVL 32

Expert Comment

by:awking00
ID: 16975226
>> AND NXTFilter<< what? Equals something, is null?
0
 
LVL 34

Expert Comment

by:jefftwilley
ID: 16975715
WHERE c.userid = MMColParam  <---is MMColParam text as well?
0
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 16975759
>> >> AND NXTFilter<< what? Equals something, is null?<<
It is a boolean, as in True/False.
0
 

Author Comment

by:budgilbert67
ID: 16976036
SELECT c.*, o.*
FROM paymaker AS c, freelance_customers AS o
WHERE c.userid = MMColParam AND c.company = o.customer_ID AND NXTFilter
ORDER BY c.pmdate DESC

MMColParam       29          Session("kt_login_id")
NXTFilter
0
 

Author Comment

by:budgilbert67
ID: 16976047
SELECT c.*, o.*
FROM paymaker AS c, freelance_customers AS o
WHERE c.userid = MMColParam AND c.company = o.customer_ID AND NXTFilter
ORDER BY c.pmdate DESC

MMColParam           29       Session("kt_login_id")
NXTFilter               1=1       Session("filter_tfi_listRecordset37")

You guys are great for trying to help me.   the problem is related to o.customer_ID because if I point this to another field this query works.  If I change c.userid to a number field this query works.  The problem is if I change it to a number field I will have to redo about twent pages.   I don't want to have to do that.  by the way this is my first attempt to use a link.
0
 
LVL 3

Accepted Solution

by:
cdemir earned 2000 total points
ID: 16976347
why don't you change "MMColParam"s type from integer to string like that :

 SELECT c.*, o.*
FROM paymaker AS c, freelance_customers AS o
WHERE c.userid = 'MMColParam' AND c.company = o.customer_ID AND NXTFilter
ORDER BY c.pmdate DESC


i think your problem is "data type incompatibly".

0
 
LVL 34

Expert Comment

by:jefftwilley
ID: 16976422
I think you can change them to numeric just for this query using the Val() option.

WHERE Val(c.userid) = Val(MMColParam) AND c.company = o.customer_ID AND NXTFilter

something like that.
J

0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Azure Functions is a solution for easily running small pieces of code, or "functions," in the cloud. This article shows how to create one of these functions to write directly to Azure Table Storage.
Backups and Disaster RecoveryIn this post, we’ll look at strategies for backups and disaster recovery.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

704 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question