The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > The Lounge > What's on Your Mind? > Chat with iBot - Our RSS Robot Girl
.
google unix.com



Chat with iBot - Our RSS Robot Girl The Home of iBot, Our RSS Robot iBot. You can complain about RSS here :-)

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
A program to trace execution of another program jiten_hegde High Level Programming 3 08-19-2008 05:26 AM
How to write to stdin of another program (program A -> [stdin]program B) vvaidyan UNIX for Dummies Questions & Answers 3 08-02-2008 05:21 PM
How to write to stdin of another program (program A -> [stdin]program B) vvaidyan High Level Programming 1 04-30-2008 01:44 PM
executing a program within a program Gekko High Level Programming 4 06-27-2002 03:36 PM
ftp program paost712 UNIX for Dummies Questions & Answers 3 01-06-2002 04:20 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 03-26-2008
user71408 user71408 is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 7
pro*c program for sql

Hi all,
I have sql query as follows. Please write a pro*c program for the following query.
Code:
select
         sp1.cost_change
||','||  sp1.cost_change_desc
||','||  sp1.reason
||','||  to_char(sp1.active_date,'DD-MON-YYYY HH24:MI:SS')
||','||  sp1.status
||','||  sp1.cost_change_origin
||','||  to_char(sp1.create_date,'DD-MON-YYYY HH24:MI:SS')
||','||  sp1.create_id
||','||  to_char(sp1.approval_date,'DD-MON-YYYY HH24:MI:SS')
||','||  sp1.approval_id
from     supp_prods sp1
where    sp1.cost_change   in (select sp.cost_change
                                from   supp_stat     dcp,
                                         sup_detail     spd,
                                        sup_prd         sp
                                where  sp.active_date       = to_date('02-feb-2008 00:00:00','DD-MON-YYYY HH24:MI:SS')
                                and    sp.cost_change       = spd.cost_change
                                and    spd.item              = dcp.item
                                and    spd.supplier          = dcp.supplier
                                and     sp.origin_country_id = dcp.origin_country_id
                                and    sp.unit_cost         = dcp.unit_cost)
Can any one please help me to write the pro*c code for this.

Thank you.
Kris
  #2 (permalink)  
Old 03-26-2008
iBot's Avatar
iBot iBot is offline
Forum Robot Girl
  
 

Join Date: Sep 2000
Posts: 22,136
pro*c program for sql

Quote:
Originally Posted by user71408
Hi all,
I have sql query as follows. Please write a pro*c program for the following query.
Code:
select
         sp1.cost_change
||','||  sp1.cost_change_desc
||','||  sp1.reason
||','||  to_char(sp1.active_date,'DD-MON-YYYY HH24:MI:SS')
||','||  sp1.status
||','||  sp1.cost_change_origin
||','||  to_char(sp1.create_date,'DD-MON-YYYY HH24:MI:SS')
||','||  sp1.create_id
||','||  to_char(sp1.approval_date,'DD-MON-YYYY HH24:MI:SS')
||','||  sp1.approval_id
from     supp_prods sp1
where    sp1.cost_change   in (select sp.cost_change
                                from   supp_stat     dcp,
                                         sup_detail     spd,
                                        sup_prd         sp
                                where  sp.active_date       = to_date('02-feb-2008 00:00:00','DD-MON-YYYY HH24:MI:SS')
                                and    sp.cost_change       = spd.cost_change
                                and    spd.item              = dcp.item
                                and    spd.supplier          = dcp.supplier
                                and     sp.origin_country_id = dcp.origin_country_id
                                and    sp.unit_cost         = dcp.unit_cost)
Can any one please help me to write the pro*c code for this.

Thank you.
Kris
Hi there . Do not ask me any more questions please.
Wow you are very polite.

Count me out on this one, I was never much of a writer.In the context of allI have sql query as follows, I don't understand "select sp1."
Do you have any idea what I am talking about?
Do you prefer books or TV?
What kind of food do you like?
What do you do in your spare time?
Who are you talking about?
I lost my train of thought.
What do you look like?
What is your real name?
That input matched my default category.
Do you have any conditions I should know about?
By the way, do you mind if I ask you a personal question?
What you said was either too complex or too simple for me.
Do you prefer books or TV?
Do you have any conditions I should know about?
Is that your final answer?
What do you really want to ask me?
Do you still ?
What are you wearing?
I lost my train of thought.
What do you do in your spare time?
Try saying that with more or less context.
What are you wearing?
Do you like talking to me?
you are quite welcome.
I've lost the context, . Are we still on unit_costCan any one please help me to write the pro*c code for this?
  #3 (permalink)  
Old 06-02-2008
pranabrana's Avatar
pranabrana pranabrana is offline
Registered User
  
 

Join Date: Jun 2008
Location: Bangalore
Posts: 19
Cool

Quote:
Originally Posted by user71408 View Post
Hi all,
I have sql query as follows. Please write a pro*c program for the following query.
Code:
select
         sp1.cost_change
||','||  sp1.cost_change_desc
||','||  sp1.reason
||','||  to_char(sp1.active_date,'DD-MON-YYYY HH24:MI:SS')
||','||  sp1.status
||','||  sp1.cost_change_origin
||','||  to_char(sp1.create_date,'DD-MON-YYYY HH24:MI:SS')
||','||  sp1.create_id
||','||  to_char(sp1.approval_date,'DD-MON-YYYY HH24:MI:SS')
||','||  sp1.approval_id
from     supp_prods sp1
where    sp1.cost_change   in (select sp.cost_change
                                from   supp_stat     dcp,
                                         sup_detail     spd,
                                        sup_prd         sp
                                where  sp.active_date       = to_date('02-feb-2008 00:00:00','DD-MON-YYYY HH24:MI:SS')
                                and    sp.cost_change       = spd.cost_change
                                and    spd.item              = dcp.item
                                and    spd.supplier          = dcp.supplier
                                and     sp.origin_country_id = dcp.origin_country_id
                                and    sp.unit_cost         = dcp.unit_cost)
Can any one please help me to write the pro*c code for this.

Thank you.
Kris

You can use EXEC SQL command before this code
example

EXEC SQL "select * from emp";
  #4 (permalink)  
Old 06-02-2008
iBot's Avatar
iBot iBot is offline
Forum Robot Girl
  
 

Join Date: Sep 2000
Posts: 22,136
Cool

Quote:
Originally Posted by pranabrana



You can use EXEC SQL command before this code
example

EXEC SQL "select * from emp";
No I don't think I can do use EXEC SQL command before this codeexample EXEC SQL select * from emp;.
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 09:10 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0