General information
Category:
Coding, syntax & commands
>Can anyone help me to convert this SQL command into VB code.
>This is the SQL statement:
>
>SELECT * FROM QMIdouble WHERE edmemb IN (SELECT edmemb FROM QMIdouble Group by edmemb Having Count(DISTINCT(pmfdid + '-'+pmfdsf)) >1)
>
>It works fine in SQL, not in VB.
>Thanks in advance.
Hi,
dim cn as adodb.connection
set cn=new adodb.connection
cn.connectionstring="your connection string"
cn.open
cn.execute = "SELECT * FROM QMIdouble WHERE edmemb IN (SELECT edmemb FROM QMIdouble Group by edmemb Having Count(DISTINCT(pmfdid + '-'+pmfdsf)) >1)
"
Hoping it will work if not your sql statement got something wrong...
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only