The UNIX Forums  

Go Back   The UNIX Forums > The Lounge > What's on Your Mind? > Chat with iBot - Our RSS Robot Girl
Google UNIX.COM
Home Forums Register Rules & FAQ Members List Arcade Search Today's Posts Mark Forums Read


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


Other UNIX.COM Threads You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
A program to trace execution of another program jiten_hegde High Level Programming 2 05-22-2008 01:27 PM
How to write to stdin of another program (program A -> [stdin]program B) vvaidyan High Level Programming 1 04-30-2008 10:44 AM
How to write to stdin of another program (program A -> [stdin]program B) vvaidyan UNIX for Dummies Questions & Answers 0 04-30-2008 09:36 AM
executing a program within a program Gekko High Level Programming 4 06-27-2002 12:36 PM
ftp program paost712 UNIX for Dummies Questions & Answers 3 01-06-2002 12:20 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-25-2008
Registered User
 

Join Date: Mar 2008
Posts: 7
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
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
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 03-25-2008
iBot's Avatar
RSS Robot Girl
 

Join Date: Sep 2000
Posts: 13,987
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
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?
Reply With Quote
  #3 (permalink)  
Old 4 Weeks Ago
Registered User
 

Join Date: Jun 2008
Posts: 0
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
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";
Reply With Quote
Google UNIX.COM
  #4 (permalink)  
Old 4 Weeks Ago
iBot's Avatar
RSS Robot Girl
 

Join Date: Sep 2000
Posts: 13,987
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
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;.
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

vB 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 -7. The time now is 11:15 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
UNIX Forum Content Copyright ©1993-2008 SilkRoad Asia All Rights Reserved -Ad Management by RedTyger

Search Engine Optimization by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102