Hi!
Because alltrim(a.cname) cannot match to (select alltrim(sem_Names)). Just because second select causes 'padr' of all valuse to the length of first value. Do not use alltrim for both sides. Use padr instead, so you'll be sure that lengths of all strings at both sides of comparison are the same.
>I created a cursor and trying to apply it to a select staement.
>
>select all a.cid, a.cname, b.csemester, b.ccourse, b.ccouroff, b.cstudent from sys_mast a, enroll b where alltrim(a.cname) in (select alltrim(sem_Names) from SQL_Sem) into dbf c:\attend\temp
>
>after I run this, I get all the values to the temp table, but cid, cname fields are empty.
>
>I have spent a lot of time for this, I am going crazy.
>Why am I not getting cid, cname field values?
>
>I got so many reply for my previous questions and you guys have been very helpful. I appreciated it.
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.comICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs
It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.