Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
2 SQL's in Single statment & write NULL values in the record set also to Excel sheet
#1
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi,

How to execute 2 SQL statments in single resultset & i need to write the RS values to excel including NULL's
like
set rowcount 10;
select * from emp where deptno = 10 order by empno;

such that i need top 10 records only.

Thanks in advance ....
Reply
#2
Solved: 11 Years, 3 Months, 3 Weeks ago
use top(n) in your SQL statement

select top(10) from emp where deptno = 10 order by empno;

Reply
#3
Solved: 11 Years, 3 Months, 3 Weeks ago
You can use row number <11 in the where condition.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Convert the single to an integer Mozza 2 1,408 09-27-2018, 12:36 PM
Last Post: Ankur
  Trying to create List box in excel sheet at Run time with values yes No JACKSPARROW 0 1,707 01-17-2017, 11:05 AM
Last Post: JACKSPARROW
  How to write reports from scripts into excel anushreebehura 1 2,239 10-04-2016, 09:29 PM
Last Post: venkatesh9032
  How to Delete Rows with duplicate values in 1 columns in excel thru QTP. arpan 0 2,805 02-09-2015, 08:47 PM
Last Post: arpan
  Custom sort -Excel Sheet kiran 1 3,857 01-28-2014, 09:23 AM
Last Post: supputuri

Forum Jump:


Users browsing this thread: 2 Guest(s)