f



About LONG data type: How to read LONG fileds when link two same tables?

Hi, all
I'm developping an application. I have a table which has a "LONG"
column. I need to run such sql by OCI:

SELECT "TEST_LONG"."CONTENT", "TEST_LONG_1"."CONTENT"
FROM "GUEST"."TEST_LONG" "TEST_LONG" INNER
JOIN "GUEST"."TEST_LONG" "TEST_LONG_1"
ON "TEST_LONG"."ID"="TEST_LONG_1"."ID"


The TEST_LONG_1 is an alias of TEST_LONG. The CONTENT is a "LONG"
datatype column.
However, after executed the sql, I found that when reading rowset, the
data returned is not correct.


For example, the TEST_LONG has such data:
ID CONTENT
1  A
2  B


I get such result after execute:
CONTENT CONTENT
A B


It seems after I read out "A" for first column of rowset, I can not
read "A" again. The first read of second column return "B" directly.
I don't know how to process this case. The problem is very urgent !
Would you like to give some advises? Thank you! Thank you very much!

0
kiluyar
12/19/2006 7:54:28 AM
comp.databases.oracle.tools 4963 articles. 0 followers. art (172) is leader. Post Follow

2 Replies
300 Views

Similar Articles

[PageSpeed] 48


On Dec 19, 8:54 am, "kiluyar" <kilu...@gmail.com> wrote:
> Hi, all
> I'm developping an application. I have a table which has a "LONG"
> column. I need to run such sql by OCI:
>
> SELECT "TEST_LONG"."CONTENT", "TEST_LONG_1"."CONTENT"
> FROM "GUEST"."TEST_LONG" "TEST_LONG" INNER
> JOIN "GUEST"."TEST_LONG" "TEST_LONG_1"
> ON "TEST_LONG"."ID"="TEST_LONG_1"."ID"
>
> The TEST_LONG_1 is an alias of TEST_LONG. The CONTENT is a "LONG"
> datatype column.
> However, after executed the sql, I found that when reading rowset, the
> data returned is not correct.
>
> For example, the TEST_LONG has such data:
> ID CONTENT
> 1  A
> 2  B
>
> I get such result after execute:
> CONTENT CONTENT
> A B
>
> It seems after I read out "A" for first column of rowset, I can not
> read "A" again. The first read of second column return "B" directly.
> I don't know how to process this case. The problem is very urgent !
> Would you like to give some advises? Thank you! Thank you very much!

Please do not post this in every newsgroup you can spell.
You should stop using LONGs! They have been deprecated.
If you don't know what deprecate is, look it up in a dictionary!

--
Sybrand Bakker
Senior Oracle DBA

0
sybrandb
12/19/2006 11:44:30 AM
"sybrandb" <sybrandb@gmail.com> aaaaarghed in 
news:1166528670.403523.217430@73g2000cwn.googlegroups.com...
>
>
> On Dec 19, 8:54 am, "kiluyar" <kilu...@gmail.com> wrote:
>> Hi, all
>> I'm developping an application. I have a table which has a "LONG"
>> column. I need to run such sql by OCI:
>>
>> SELECT "TEST_LONG"."CONTENT", "TEST_LONG_1"."CONTENT"
>> FROM "GUEST"."TEST_LONG" "TEST_LONG" INNER
>> JOIN "GUEST"."TEST_LONG" "TEST_LONG_1"
>> ON "TEST_LONG"."ID"="TEST_LONG_1"."ID"
>>
>> The TEST_LONG_1 is an alias of TEST_LONG. The CONTENT is a "LONG"
>> datatype column.
>> However, after executed the sql, I found that when reading rowset, the
>> data returned is not correct.
>>
>> For example, the TEST_LONG has such data:
>> ID CONTENT
>> 1  A
>> 2  B
>>
>> I get such result after execute:
>> CONTENT CONTENT
>> A B
>>
>> It seems after I read out "A" for first column of rowset, I can not
>> read "A" again. The first read of second column return "B" directly.
>> I don't know how to process this case. The problem is very urgent !
>> Would you like to give some advises? Thank you! Thank you very much!
>
> Please do not post this in every newsgroup you can spell.
> You should stop using LONGs! They have been deprecated.
> If you don't know what deprecate is, look it up in a dictionary!
>
> --
> Sybrand Bakker
> Senior Oracle DBA
>

Sybrand,

you're in a good mood today! (But ok, it seems like Silly-Question-Day 
today... ;-)

Shakespeare
(what's in a mood?) 


0
What
12/19/2006 11:53:00 AM
Reply: