Servicetype is 50 character and Billcategory is 20.  Billcategory can be a
proper subset of Servicetype but not the reverse.


At 01:09 PM 5/31/2002 -0500, you wrote:
>Ok, I've had a head cold this last week but it really shouldn't have
>affected my brain... I need someone to tell me if this should work:
>
>I have two tables in a database,
>
>ServiceTypes, containing a column, ServiceType (TEXT 50) that includes this
>list:
>    Initial Assessment
>    Lesson
>    Self-Practice
>    Typing Tutorial
>    Cancellation
>
>and
>
>BillCategories, with a column, BillCategory (TEXT 20) that includes this
>list:
>    Supplies
>    OtherExpenses
>    Self-Practice
>    Typing Tutorial
>    Mileage
>
>If I issue the statement:
>SELECT BillCategory FROM BillCategories WHERE BillCategory IN (SELECT
>ServiceType FROM ServiceTypes)
>
>It correctly returns the values,
>    Self-Practice
>    Typing Tutorial
>
>BUT, if I do the reverse of this statement and type:
>SELECT ServiceType FROM ServiceTypes WHERE ServiceType IN (SELECT
>BillCategory FROM BillCategories)
>
>I get a "No Rows Exist ..." message.
>
>If I refine it and type:
>SELECT ServiceType FROM ServiceTypes WHERE ServiceType = 'self-practice' AND
>ServiceType IN (SELECT BillCategory FROM BillCategories)
>It correctly returns 'Self-Practice'
>
>Apparently it's the difference in data length - It works if I type:
>SELECT ServiceType FROM ServiceTypes WHERE (SGET(ServiceType,20,1)) IN
>(SELECT BillCategory FROM BillCategories)
>
>It seems to me that "Self-Practice" = "Self-Practice" regardless of the size
>of the data field.
>
>Sami
>
>
>
>-----------------------------------------------------------
>Sami Aaron
>Software Management Specialists
>19312 W 63rd Terr
>Shawnee KS  66218
>913-915-1971
>http://www.softwaremgmt.com
>
>================================================
>TO SEE MESSAGE POSTING GUIDELINES:
>Send a plain text email to [EMAIL PROTECTED]
>In the message body, put just two words: INTRO rbase-l
>================================================
>TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED]
>In the message body, put just two words: UNSUBSCRIBE rbase-l
>================================================
>TO SEARCH ARCHIVES:
>http://www.mail-archive.com/rbase-l%40sonetmail.com/
>
>
>================================================
>TO SEE MESSAGE POSTING GUIDELINES:
>Send a plain text email to [EMAIL PROTECTED]
>In the message body, put just two words: INTRO rbase-l
>================================================
>TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED]
>In the message body, put just two words: UNSUBSCRIBE rbase-l
>================================================
>TO SEARCH ARCHIVES:
>http://www.mail-archive.com/rbase-l%40sonetmail.com/
>

================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: INTRO rbase-l
================================================
TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: UNSUBSCRIBE rbase-l
================================================
TO SEARCH ARCHIVES:
http://www.mail-archive.com/rbase-l%40sonetmail.com/

Reply via email to