|
-
Dec 19th, 2001, 05:17 AM
#1
Thread Starter
Member
Select Query
Hi,
I am fetching a Recordset from Oracle database. The Query is following:
Select to_date(date1,'dd-mon-yyyy'),count(*) from Mytable
group by to_date(date1,'dd-mon-yyyy')
This query can be executed perfectly on Oracle prompt but in VB it produces the following error:
multiple step generated errors. Check each status Value.
Can anyone help me? Why this is so?
Plz reply soon.
-
Dec 19th, 2001, 05:43 AM
#2
Fat use I am...
I believe it's something to do with the Microsoft Cursor Engine, in fact I am almost 100% sure of it. Not sure how to fix the problem though 
Sorry...
You could check this link out:
This link my help you with your query problem
-
Dec 20th, 2001, 02:01 AM
#3
Thread Starter
Member
it is still not working .
Plz reply soon.
-
Dec 20th, 2001, 04:11 AM
#4
Addicted Member
I need a little more information. Do you need one or more fields. etc
-
Dec 20th, 2001, 05:52 AM
#5
Thread Starter
Member
I want only 2 fields, the date part like '20-DEC-2001' And count of the records for that date. Ok
Now analyze again.
-
Dec 20th, 2001, 06:05 AM
#6
Addicted Member
here is your aswer and dont be so rude in future pall.
SELECT Format(date,"yyyy-mm-dd") as [Date], Count(date) AS CountOfDate
FROM Table
GROUP BY date;
-
Dec 21st, 2001, 08:24 AM
#7
Thread Starter
Member
My dear,
Sorry if I hurt your feelings. But as I have tried many combination of this query, I could not execute this query. And again as you wrote:
this query can't be executed on Oracle Prompt. Plz try on Oracle. I have already mentioned that I have to execute this query on Oracle prompt.
So plz help me if you can.
Jitendra
-
Dec 21st, 2001, 08:46 AM
#8
Lively Member
are you using ADO? could you post your vb code?
I assume you've successfully retrieved other recordsets from your oracle database using similar vb code...have you tried doing something like "select * from table"? This would verify that your connection string and other ADO settings are correct.
-
Dec 21st, 2001, 09:27 AM
#9
Addicted Member
Hi,
i dont have an oracle database. but i think your problem is in ADO or your ODBC settings. This query should work. You might want to post the code so i can have better look.
yours
D
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|