By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,960 Members | 1,100 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,960 IT Pros & Developers. It's quick & easy.

probleum in running group clause query in vb 6.0

100+
P: 198
Hi
i run this query it works fine

Select Yp1VOp,count(*) as instrec into instrec from " & txttablename & " where Yp1EOp=Yp1VOp Group By Yp1EOp,Yp1Vop Order By Yp1EOp,Yp1VOp

but when i put a column name Yp1EOp = " " it produce the error the qeury like this

Select Yp1VOp,count(*) as instrec into instrec from " & txttablename & " where Yp1EOp=Yp1VOp OR Yp1EOp = " " Group By Yp1EOp,Yp1Vop Order By Yp1EOp,Yp1VOp

but i want Yp1EOp column must be empty and when i check this query in Immediate window in vb 6.0 the query looks like
Select Yp1VOp,count(*) as instrec into instrec from Master where Yp1EOp=Yp1VOp or Yp1EOp= " Group By Yp1EOp,Yp1Vop Order By Yp1EOp,Yp1VOp
it is changing the Yp1EOp = " " column into Yp1EOp= "
please give some idea so that it will not change column format

with best regards
varinder
Apr 17 '08 #1
Share this Question
Share on Google+
3 Replies


debasisdas
Expert 5K+
P: 8,127
try to use this querey in VB

"Select Yp1VOp,count(*) as instrec into instrec from " & txttablename & " where Yp1EOp=Yp1VOp OR Yp1EOp =" & "''" & "Group By Yp1EOp,Yp1Vop Order By Yp1EOp,Yp1VOp"
Apr 17 '08 #2

100+
P: 198
Hi
Thanks very much
it is working
with best regards
varinder



try to use this querey in VB

"Select Yp1VOp,count(*) as instrec into instrec from " & txttablename & " where Yp1EOp=Yp1VOp OR Yp1EOp =" & "''" & "Group By Yp1EOp,Yp1Vop Order By Yp1EOp,Yp1VOp"
Apr 17 '08 #3

debasisdas
Expert 5K+
P: 8,127
You are most welcome.
Apr 17 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.