rahul,
Connect by cluse for print number(1-10) is best answer.
but one more way of printing 1-10 no is make function and than use it in query.
============CREATE OR REPLACE function ENAGARMITRA.printnum(i in number,endnum in number) return varchar2 as
dtstr varchar2(1000) :='';
begin
for idx in i..endnum
loop
if dtstr is null or dtstr = '' then
dtstr := to_char(idx);
else
dtstr := dtstr || ',' || to_char(idx);
end if;
end loop;
return dtstr;
exception when others then
return null;
end;
/
=====================
select printnum(1,10) from dual;
=====================
sandeep,rajiv,
Yes, I agree on that. The use of connect by clause is best.
Jim Irvine,
Yes, I tried the other queries too. And with function, the one more to generate 1-10 number. It can be though, but I enjoy Oracle functions. I just try on other solutions.
rajiv. and I provide the function too. Please check the posted reply.
Well Abhay Kumar Singh's solution is the best I would say!!! Minimum it
had made the whole tensions at work evaporated for a while :D. Rahul
didn't state whether he needs the results in one line or in 10 lines.
Usually it is highly discouraging to see once the desired results are in
place, most the requestors never bother to post a thank you message,
which confirms the time spent was useful L
Flashback: February 15, 1995: Computer hacker Kevin Mitnick is arrested (Read more HERE.)
Security News:
• New Qbot malware variant uses fake Adobe installer popup for evasio...
Spark! Pro series - 15th February 2024
Spiceworks Originals
Today in History: 1950 Disney’s “Cinderella” opens in theaters
On February 15, 1950, Walt Disney’s animated feature Cinderella opens in theaters across the United States.
The Chicago-born Disney began his career as an advertising cartoonist in Kan...
Asus, Dell or Lenovo laptops and computers
Hardware
For the last couple of decades I have been buying Fujitsu computers, laptops and servers here in the UK. I have found their reliability to be fantastic. Sadly, Fujitsu are abandoning the European market and after April you will not be able to buy Fujitsu ...
Users cannot change password since July 2023
Windows
Hello all,I just started a new job and am relatively new to IT in general. My current job has had an issue with their domain since July 2023.Essentially, all users have a permanent password only IT can change because if they try, they receive the message ...
Snap! -- Cultured Beef-Rice, Sarcasm Detection, Digital Memory, Free ESXi Axed
Spiceworks Originals
Your daily dose of tech news, in brief.
Welcome to the Snap!
Flashback: February 14, 1946: Unveiling of the ENIAC (Read more HERE.)
Security News:
• Romantic AI Chatbots Fail the Security and Privacy Test (Read more HERE.)
• Ubuntu ...