Recordcount

Jun 8, 2008

I have one Table i.e Transaction. I want to display the recordcount of particular user for current date. I have written qury for this but it return only one record as recordcount But the table contain 5 record for that particular user. Pls help me .

Query: CD store the current Date
CD = Text5.Value

Sql = "SELECT DISTINCTROW DummyTran.*FROM DummyTran"
Sql = Sql & " WHERE ((DummyTran.AssignedTo = ""SSS001"") And (DummyTran.Date = ""CD"")); "
Set rs = db.OpenRecordset(Sql)

T = rs.RecordCount

View 1 Replies


ADVERTISEMENT

RecordCount In SQL CE??

Sep 12, 2007

Does somebody know how to obtain the recordcount from a SqlCeResultSet ?

Thanks in advance!

View 8 Replies View Related

RecordCount With Datareader

Apr 22, 2006

I am very disappinted where Datareader have no RecordCount where I can get the total records it read. I guess I found a way:
 
sql = "SELECT *, ROW_NUMBER() OVER (ORDER BY id DESC) AS c FROM ACCOUNTS  ORDER BY c DESC"Dim command As SqlCommand = New SqlCommand(sql, New SqlConnection(_DBConnectionString))            command.Connection.Open()            _ReturnDataReader = command.ExecuteReader(CommandBehavior.CloseConnection)            command.Dispose()            _TotalRecord = _ReturnDataReader.GetInt64(_ReturnDataReader.GetOrdinal("c"))
Have SQL Server 2005 count for me....
 

View 1 Replies View Related

Select Top N Where N &> Recordcount

Feb 16, 2006

Charlie writes "The query below returns the date of the 3rd deposit due in a recordset, but if there are only 2 deposits due this query returns the second deposit due as the third. How can I force a null or blank on the third deposit if ther isn't one.


SELECT top 1 recordid, convert(varchar,deposit_due_on,107) AS DueDate
FROM (SELECT TOP 100 recordid,deposit_due_on FROM (SELECT TOP 3 recordid,deposit_due_on FROM TABLE_NAME
WHERE recordid=2)a order by a.deposit_due_on desc ) b


regards

Charlie"

View 1 Replies View Related

Check Table Recordcount Before Run Of DTS Pkg

Sep 12, 2006

Hi,

Could someone shed some light on the best way to check a table recordcount before run of DTS pkg.

We have a table that is populated in MS SQL from an Oracle database, and the contents of that table are the basis of a DTS package that we run.

Sometimes Oracle transfer bombs out and the table is empty but our process runs anyway. It screws everything up.

Can we check the recordcount of a table on the server, and if the recordcount > 1 then the process runs, if not, then the process aborts?

Thanks,

Dominic

View 1 Replies View Related

Calculate Update Time Based On Recordcount

Apr 10, 2008

I have a number of databases with large tables. I need to update them from time to time. I want to get the recordcount of the table and calculate based on that the amount of time it would take to update the table. Any idea who I can do this? I'm using coldfusion 8 with sql to do this. Any advice would be appreciate!

Thanks
Shuvi

View 2 Replies View Related

Get Recordcount From Oracle And Update Sql Server Table

Aug 29, 2007

I posted this question a little while ago but was not able to implement it. Now I am back to the same issue. Basically I want to get a recordcount from a table in Oracle and update an existing record in sql server with the value.

I am trying to accomplish this using a Execute SQL Task. In this task I am pointing to a Oracle DB that I am able to query from SSIS so connectivity is not an issue.

I have defined a variable EmpRC of type int32.

I have a following the the SQL Task:

query: select count(*) from emp;

result set=single row.

and on result set tab ResultName =0 and variable name is same defined above : User::EmpRC

I get an error when I run this:
[Execute SQL Task] Error: An error occurred while assigning a value to variable "EmpCompRC": "Unsupported data type on result set binding 0.".

I have tried using different data types for EmpRC but having no luck. any ideas?

View 7 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved