If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > Query, showing sequence returned !

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-20-09, 08:14
dicipulofer dicipulofer is offline
Registered User
 
Join Date: Oct 2007
Posts: 55
Query, showing sequence returned !

Hello,

I'm facing one easy problem, but I don't know how to solve it in informix. I want do one query that return one to count in one column:

Select nom_cliente,num_row from table;

I wanna get the result

Fernando 1
Fernando 2
Joao 3
Maria 4
John 5
James 6


Could someone help me ???
Reply With Quote
  #2 (permalink)  
Old 03-20-09, 09:51
dicipulofer dicipulofer is offline
Registered User
 
Join Date: Oct 2007
Posts: 55
Solved.

begin work;
create sequence myseq;
select myseq.nextval,s.firstName,s.lastName from students s;
drop sequence myseq;commit work;


I got that way to solve it

Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On