group by vbs 
Author Message
 group by vbs

Hi
Does VBScript accept  "group by" ?

Because I have a message error if I insert this in a request !

My request :

req_sql3 = "select * from table001 where numchambre<>" & Ival1
req_sql3 = req_sql3 & "order by numchambre"
req_sql3 = req_sql3 & "group by numchambre"

Message error:

Microsoft OLE DB Provider for ODBC Drivers error 80040e14
Incorrect syntax towards the keyword " by "
error number : -2147217900



Tue, 31 Aug 2004 21:04:03 GMT  
 group by vbs
You probably just have a spacing problem in the sql string you are building.  Try adding a space before the words order and group

req_sql3 = "select * from table001 where numchambre<>" & Ival1
req_sql3 = req_sql3 & " order by numchambre"
req_sql3 = req_sql3 & " group by numchambre"

--
Michael Harris
Microsoft.MVP.Scripting
Seattle WA US
--

Quote:

> Hi
> Does vbscript accept  "group by" ?

> Because I have a message error if I insert this in a request !

> My request :

> req_sql3 = "select * from table001 where numchambre<>" & Ival1
> req_sql3 = req_sql3 & "order by numchambre"
> req_sql3 = req_sql3 & "group by numchambre"

> Message error:

> Microsoft OLE DB Provider for ODBC Drivers error 80040e14
> Incorrect syntax towards the keyword " by "
> error number : -2147217900



Wed, 01 Sep 2004 02:24:21 GMT  
 group by vbs
In fact, it's a different problem. As this sample, it's ok, no problem, but
If I insert other fields (select datestart, da{*filter*}d, numchambre...) I can
not use group by.

So, it become a sql problem. But I thought avoid this problem by a vbs
solution. Does exist a function like "group by" to keep value isolated ?
If not, I will use stored procedure !

Tems



Wed, 01 Sep 2004 02:37:30 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. group by in vbs

2. Creating Windows2000 groups with VBS

3. Mapping drives based on group membership using ADSI with VBS

4. Remove all users from a group with VBS

5. Determine Primary Group with vbs???

6. exchange groups and vbs, wsh

7. Mapping drives based on group membership using ADSI with VBS

8. Remove all users from a group with VBS

9. Access to TField Objects on the fly

10. SQL Server. Best and Worst.

11. DDE to Netscape in TPW !!!

12. A few TV questions

 

 
Powered by phpBB® Forum Software