Pro C - Select abc into :cds returns value but strcpy(cds, 'test' did not
Dear All
I have a test.pc program at Unix as follow:
varchar cds [11];
varchar xyz [30];
varchar fxo [11]
main(argc, argv)
int argc;
char **argv;
find_sp_inv ();
ins_inv();
find_sp_inv()
EXEC SQL SELECT inv_no into :cds
FROM sup_inv
WHERE REF_NO = 12 ;
cds.arr[cds.len] = '\0';
EXEC SQL DECLARE cinvno CURSOR for select inv_type from inv_types
where ref_no = 12;
EXEC SQL OPEN cinvno;
for (i=0;i<3;i++) /* max three inv_type needed only against one reference */
/* invoice types may be one, two or three against one ref_no so need loop */
EXEC SQL WHENEVER NOT FOUND GOTO notfoundd;
EXEC SQL FETCH cinvno into :fxo;
fxo.arr[fxo.len] = '\0';
strcat((char*)xyz.arr,(char*)fxo.arr);
notfoundd:
printf("%-30sn\", xyz.arr) /* prints the value .. printing fine */
return;
ins_inv()
EXEC SQL
INSERT INTO inv_reference (ref_NO, ref_types)
SELECT :cds, :xyz from dual;
return;
} /* end my program */
**So it only picks Value of :cds an did not :xyz value? why please explain me ( i mean help me out).**
**Kind regards.**
**Saeed**
Perhaps you have posted your problem in a wrong place - i guess.
Check from here ->
http://forums.oracle.com/forums/category.jspa?categoryID=18
Or,
http://forums.oracle.com/forums/main.jspa?categoryID=84
And, please close this thread by marked it as answered.
Regards.
Satyaki De.
Similar Messages
-
Parsing a selected column into multiple returned values
I have a column in a table that contains a string of variable names seperated by commas. In my Select statement is it possible to break apart the string using the commas as a delimeter and get each item returned individually?
Here's my table:
SQL> create table myvars
2 (x number(1), vars varchar2(200));
Table created.
SQL> insert into myvars
2 values
3 (1, 'varA,varS,varY');
1 row created.
SQL> edit
Wrote file afiedt.buf
1 insert into myvars
2 values
3* (2, 'varX,varU,varB,var1')
SQL> /
1 row created.
SQL> edit
Wrote file afiedt.buf
1 insert into myvars
2 values
3* (3, 'varE,varI')
SQL> /
1 row created.
SQL> set linesize 250
SQL> /
X VARS
1 varA,varS,varY
2 varX,varU,varB,var1
3 varE,varI
So, would it be possible to somehow select the a row of text where X = 2 that ends up looking like this:
X
2 varX varU varB var1
...where the column VARS is broken into 4 smaller strings of text?SQL> select ename from emp where empno = 7934 ;
ENAME
SMITH,ALLEN
1 row selected.
SQL> select * from TABLE(select cast(in_list(ename) as mytableType) from emp where empno = 7934) a ;
COLUMN_VALUE
SMITH
ALLEN
2 rows selected.
SQL>Message was edited by:
Kamal Kishore -
Data Services Designer - Function returns value, but doesnt always populate
Within my Query Transform I call a function that I pass a old Vendor code to a sql statement and it does a few lookups and cross references it returns a new value. My issue is sometime it doesnt put the value in the field. I know it has returned a value as I had the funtion print it out for me, so I can see the value that was passed and the returning value, but when I look in my table there is no value.
I have added the function call for you to see it is very simple takes one parameter, I have also added the print out from my function, does anyone have any ideas??
(This is under the field Vendor Code)
P2CMM05_Look_UP_Vendor_Code(Query.LIFNR)
6088 4800 PRINTFN 6/28/2011 9:27:48 AM @@@@@@@@@@@ Ret_Vendor_code @@@@@@@@@@@ MCI_719
6088 4800 PRINTFN 6/28/2011 9:27:48 AM @@@@@@@@@@@ $Vendor_code @@@@@@@@@@@ MUR_51Within my Query Transform I call a function that I pass a old Vendor code to a sql statement and it does a few lookups and cross references it returns a new value. My issue is sometime it doesnt put the value in the field. I know it has returned a value as I had the funtion print it out for me, so I can see the value that was passed and the returning value, but when I look in my table there is no value.
I have added the function call for you to see it is very simple takes one parameter, I have also added the print out from my function, does anyone have any ideas??
(This is under the field Vendor Code)
P2CMM05_Look_UP_Vendor_Code(Query.LIFNR)
6088 4800 PRINTFN 6/28/2011 9:27:48 AM @@@@@@@@@@@ $Vendor_code @@@@@@@@@@@ MUR_51
6088 4800 PRINTFN 6/28/2011 9:27:48 AM @@@@@@@@@@@ Ret_Vendor_code @@@@@@@@@@@ MCI_719 -
I just upgraded from my 2008 MacBook to a new Macbook Pro. How do I get my time capsule to work on my new MacBook? I did data migration, but the time capsule did not pick it up. Any ideas?
If you migrated all the info from time machine to your new MBP. The TM will usually ask to connect to the old backups.. sorry I am not sure is this what you want to do.. Personally I think you start a fresh backup.
BTW Time Capsule does not do anything.. it is a dumb hard disk in a box.. it is TM that does everything.
Look at B5 and B6 here about connecting to your backup.
http://pondini.org/TM/Troubleshooting.html -
Getting returned mail messages for emails I did not send
I've recently started getting returned mail messages for emails I did not send. Why is this happening and how can I stop it?
cadillacjoe69 wrote:
That might be tough to do. Is there a rule I can use to help. The mail messages are so varied.
I'd look at the headers (View -> Message -> Long Headers) to see if there's anything in common, then try to create a rule based on that.
By the way, welcome to Apple's discussion groups. -
Run CKMLCP already, but value in price diff account did not distributed
Hi All,
I active Material Ledger and config G/L account in OBYC. End of month, I run CKMLCP but value in price diff account did not distributed to other account.
How can I check and config again.Hi nkonnipati,
I have checked the Document after posting Miro and i checked in FB03 is it showing as same as the Material Price different account is showing in Foreign currency values i.e., USD where as in Local Currency it is showing as Zero Values for that document.
MIRO Document is displaying as:
USD JPY
Vendor A/C 30,316.32- 2352365-
GR/IR Account 30,258.72 2,659,348.00
Price Diff Account 57.60 0
Exchange Rate Gain / Loss Account 0 306983-
i have checked the Currency conversion rates it is already maintained for USD to JPY and JPY to USD.
Thanks
Sivanand KP -
My lov results into the return value instead of the display value in APEX
Hi,
For 1 of the columns I'm representing in APEX, I choose 'Display as text, based on a lov'. I'm using:
select aan.id||', '||r.naam||', '||a.woonplaats d, aan.id r
from wmo_aanvragen aan
, wmo_dossiers d
, wmo_relaties r
, wmo_adressen a
where d.avg_1_id = aan.id
and d.rel_nummer = r.nummer
and a.rel_nummer = r.nummer
and a.id = (select min(e.id) from wmo_adressen e where e.REL_NUMMER = r.nummer
and e.EIND_DATUM is null)
and d.id = (select min(f.id) from wmo_dossiers f where f.AVG_1_ID = aan.id)
But somehow it displays the 'aan.id' value instead of the display value. Does anyone know howcome?? In TOAD it works fine
Niels
Edited by: user6394263 on 10-apr-2009 1:22Hello Niels,
Your LOV Displays your concatenated value, but returns the "aan.id" (into the Form field), just as expected. If you want to show the description on your Form, use a PopUp LOV - Displays Description Return Key value
Greetings,
Roel
http://roelhartman.blogspot.com/
You can reward this reply by marking it as either Helpful or Correct ;-) -
ADF web select one choice list return value
hi
how can i make a choice list that displays a value but return another value
and then use it as a parameter in a method for a button
my problem is how to return another value to the button
thanksHi,
After creating the selectOneChoice based on the steps you followed, you will need to follow up with the steps below.
1) Open up your Page Definition file. In the Structure panel, right click on bindings --> Insert inside bindings --> Generic bindings --> attributeValues.
2) Under Data Source, select your iterator value used to bind the selectOneChoice component. The attribute should be your value ID (example: productId) that you want to be returned by selecting the selectOneChoice component.
In the backing bean, you get the actual value of the selected item in the list in step #2 by resolving the expression (example) #{bindings.productId.inputValue}.
Regards,
Chan Kelwin -
Windows 7; Wireless network; Today I installed my new Officejet Pro 8600 e-all-in-one wireless printer. When finished I was able to print, I set up e-print, and the scanner works, but could not find what used to be called the "HP Solutions Center" that I could click on to choose scanning, check ink supply, get "Help", and so on. An HP 8600 printer icon installed on the desktop, but when I clicked it, it was just a bunch of meaningless jibberish but had no function. I went to "Start", then HP, and was able to somehow get a "Scan Icon" to open. I did not get the option to set up "WEBPRINT", nor REGISTER MY PRODUCT, and so on. In other words, the installation did not finish. I tried putting the CD back in, but no additional options were available except to re-configure, etc. Thank you for your help.
This question was solved.
View Solution.PM sent about Scrubber
JonW
I work for HP -
I have recently installed VLC media player (64bit), played a movie file on a DVD+RW for 30 seconds, then decided to stop the movie. I poped the DVD out, and a minute later I reinserted the same DVD, it was ejected after 10 second. Now when ever I insert the DVD in my MBP it gets ejected. It reads my CDs but does not read my DVD. Uninstalling VLC did not fix it. I am not even sure at this if VLC caused the problem. What do I do?
Have you rebooted since uninstalling VLC?
-
Query with subquery should return value but doesn't
When I run this SQL, it returns no value:
SELECT vfn.cat
FROM vps_fishery_ner vfn, valid_fishery vf
WHERE vfn.plan = vf.plan
AND vfn.cat = vf.cat
AND vf.permit_year = 2010
AND vf.moratorium_fishery = 'T'
AND vfn.vp_num = 211652
AND vfn.ap_year = 2010
AND vfn.plan = 'MUL'
AND vfn.date_issued = (SELECT MAX(date_issued)
FROM vps_fishery_ner
WHERE vp_num = 211652
AND ap_year = 2010);
In order to test, I take out the subquery and run it separately:
SELECT MAX(date_issued)
FROM vps_fishery_ner
WHERE vp_num = 211652
AND ap_year = 2010;
Returns 02-APR-10
Then I paste this date into the original query (using the TRUNC function, of course, since I hardcode only the DDMMYY part of the date):
SELECT vfn.cat
FROM vps_fishery_ner vfn, valid_fishery vf
WHERE vfn.plan = vf.plan
AND vfn.cat = vf.cat
AND vf.permit_year = 2010
AND vf.moratorium_fishery = 'T'
AND vfn.vp_num = 211652
AND vfn.ap_year = 2010
AND vfn.plan = 'MUL'
AND TRUNC(date_issued) = TO_DATE('02-APR-10');
And this returns the required value, 'A'.
So why doesn't the full query with subquery work, if the value that is returned by the subquery is valid and works when you just paste it in?
Thanks.Hi,
Not sure about your question.
But you say when you uss 01-apr-10 you get the expected results.
So why dont you try using trunc on botht sides
SELECT vfn.cat
FROM vps_fishery_ner vfn, valid_fishery vf
WHERE vfn.plan = vf.plan
AND vfn.cat = vf.cat
AND vf.permit_year = 2010
AND vf.moratorium_fishery = 'T'
AND vfn.vp_num = 211652
AND vfn.ap_year = 2010
AND vfn.plan = 'MUL'
AND trunc(vfn.date_issued) = (SELECT MAX(trunc(date_issued))
FROM vps_fishery_ner
WHERE vp_num = 211652
AND ap_year = 2010);Rememeber if you are couting on some Index to be used you might want to recheck.
IN answer to your question why it does not return with subquery included, because the TIME PART is not the same.
You yourself proved it by using the supplying only the date part.
Regards,
Bhushan -
I have been trying import VHS video into iMovie via a Hollywood Dazzle bridge. I have been successful doing this in the past, but now it is not working. I have a mac book pro, 10.9.1, (mavericks), iMovie 10.0.2. Everything in iMovie looks like it is working. It reads "recording" in the upper left hand corner of the pane while the video is playing. When I stop the process to check on my clip it says that the file is empty. The only thing that has changed since I did it successfully is that I upgraded to mavericks from whatever I had previously. My system is about one year old. Any suggestions?
Hey, Clinton,
Thanks for your help! I was able to go to iMovie 9.0.9 and import video. I was still curious as to why it didn't work in version 10.0.2, so I contacted Apple tech support. They were't sure at first as to why it wouldn't work, so they had me delete iMovie 10.0.2 and then re-install it just to see if something had gone wrong when it upgraded. That didn't change anything. In the end, they determined that 10.0.2 doesn't support the Hollywood Dazzle DV bridge. But I have a workaround path from them that I will share so that it's possible to import to 9.0.9, then move it to 10.0.2.
1. Open iMovie 9 (finder/applications/iMovie 9.0.9
2. Import from Dazzle Bridge to iMovie 9, note which event you are importing the clips into
3. Close iMovie 9
4. Open iMovie 10 (probably in the dock)
5. File/Import Media...navigate to home(this was my name, on the left side of iMovie, under Favorites)/Movies/iMovie events. Find the event folder that contains your Dazzle clips (tip-try sorting by date modified to look at recent events.)
6. Select the clips and import. Click the blue "Import Selected" button on the bottom right.
You may get a message that some files cannot be imported. Click continue import. It's a little glitchy. It imports your clip, and also makes a copy of it, too. On the copy, the audio is normal, but the video is choppy. In any case, you would delete the copy, anyway.
Hope this additional information helps somebody else. Thanks again, Clinton for helping me! -
SQL query returns value but EXEC SQL Task fails to assign variable
I have an execute SQL task to get an identifier from an Oracle database and assign it to a variable (the variable is used in subsequent query's where clauses to transfer the data to a SQL Server database). If I copy the query from the SSIS
package to the Oracle SQL Developer interface and run the query; I get the expected single identifier. If I run the execute SQL task I get the error "[Execute SQL Task] Error: An error occurred while assigning a value to variable "VariableName":
"Single Row result set is specified, but no rows were returned."
I can create phony/simpler versions of the query that will return the wrong identifier that will successfully assign the value to the variable, so the problem isn't with the variable itself or the way the result set is set up in the task (Result
Set/Single Row in the General panel; Result Name 0/VariableName in the Result Set panel).
How can two queries that return a single value produce different results with respect to the variable assignment process?Perhaps you can trap (profile) the query in Oracle to see what it gets submitted,
thing is this query
select id from table where ProcessedStatusColumn is null and DateColumn = (sub select to get most recent date in table where ProcessedStatusColumn is null)
is not guaranteed to return a value, you need a default returned in case the search failed e.g.
select
NVL(id, 0)
from table where ProcessedStatusColumn is null and DateColumn =
(sub select to get most recent date in table where
ProcessedStatusColumn is null)
Arthur My Blog -
Result attribute's recordcount and identitycol returning values but row not inserted
This works in developement and test but does not work on live system-problem is only there.
When trying to insert a record, the result attribute of cfquery returns a 1 and the identitycol attribute seems to increment right but no record is inserted.
Any help would be really appreciated.The problem's over, someone else's program was deleting them.
Since I started using result.recordcount, I'm not checking anymore. Before using it, I had a query look for the newly inserted record.
Should I put that back in? -
Is it possible to return a HP printer that I did not order from HP?
Back story:
Ordered an HP Officejet 6500 E709n wireless all-in-one from an online retailer. It wouldn't connect wirelessy and after trying to instal it 3 times the printer itself "locked up" and none of the buttons would work --including power. So, I called HP and they sent out a replacement. This printer wouldn't connect wirelessly so I figured must be my network issues and after 4 days of trying just gave up and connected via USB cable. Voila! The printer would print. However, after I printed one document and then didn't print anything for oh, say 10 minutes, the printer "locked up" and none of the buttoms would work. No scan, no copy, nada. So to print, I have to unplu and replug the printer. I give up. I'll go back to the old Epson. Called HP support where I am still on hold with someone overseas. She is telling me I can send one printer back but the one I ordered from the online retailer is their responsibility. I can't return it to the online retailer because it has been more than 15 days since I ordered it. (Thanks to HP service which told me to return it to them after receiving the replacement refurbished printer.)
So, is there anyone at HP who will take this defective printer back? Or am I stuck with a printer that won't work? ANyone have ideas for what to do with it?I'm a little confused..your profile says home made windows, yet you're working with iMovie?
Anyway, if you can get a Mac to read your discs, try Streamclip to extract the video TS file. That also is dependent of whether the format of that camera creates a video ts file on disc.
Maybe you are looking for
-
How does one name an Archive Log file in ARC%S_%R.%T format
Hallo!I have been trying to enable Archive Log mode for the Oracle 10g database. In OEM,I went via the links Maintenance->Recovery Settings->Media Recovery There,a text box by the name Log Archive Filename Format requires one to name the Archive Log
-
Please help me figure out how to get this installed.
-
who can give an example of pagination including calculate sum and total sum using php code with sql query? thanks!
-
Need Checklist for migrating MS SQL 2005 SP2 to MS SQL 2012
Dear Member, We are in process of migrating our MS SQL 2005 SP2 db engine / SSIS/SSRS services to 2012.Need to know steps/checklist and experiences of migration. I have read on Microsoft site (http://msdn.microsoft.com/en-in/library/ms143393(v=sql.1
-
SoundBlaster X-FI Xtreme Audio: short freeze / dropouts
hi, my problem is: from time to time my audio playback stops and whatever's coming out of my speakers at that point stopps for half a second or so and then continues as it should. video output and key/mouse input freezes while this happens. it happen