Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
This sounds easy but I havent found an easy way to do it.
I need to load several tables from a SQL Server database. The problem is that I don´t know the number of rows in them. I would like to get a count of rows before I launch the load statement to know how log it will take.
I used the following on an Oracle database, but I gives me a ODBC Read Failed error in SQL Server
load *;
sql select count (*)
from odbc_database;
Thanks
delete old dsn for odbc and create new
then follow
as suggest by Mayil Vahanan Ramasamy
or count(*) also should work
hope this helps
HI
NoOfRows('TableName') will use in this case.
For ex:
Load NoOfRows('TableName') as NoOfRowsInTableName AutoGenerate 1;
could you modify the SQL database to have a stored proc that would do the count(*) and return the number.
then in the load statement, you use an if statement to load the records if it's appropriate.
I know that with MS SQL we can use count * without a problem using the direct MS SQL connector
Thankyou, but I only have read rights to the Data Base. I actually got the information using a different tool to read the database structure, but though the QV might have a function when selecting the table (where I can see the strucutre and the different columns)
delete old dsn for odbc and create new
then follow
as suggest by Mayil Vahanan Ramasamy
or count(*) also should work
hope this helps