|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Help.!!!...Select....from....i
|
Author | Message |
---|---|
![]() Hi there, I'm vfp 6.0 novice. wing |
|
Tue, 30 Aug 2005 06:07:24 GMT | |
![]() |
|
![]() Hi Wing,
I'm not sure what kind of consolidation you want. Table1.Field1, Table1.Field2, Table2.Field1, Table2.Field2 Field1 Field2
Quote: > I'm vfp 6.0 novice. > How can I consolidate fields from 2 or more tables into > one single new table without having those empty fields ?? > Thank you in advance for your kind help!! |
|
Tue, 30 Aug 2005 06:14:39 GMT | |
![]() |
|
![]() Hello Cindy, I want a table which consolidates those non-empty fields I would like to know the SQL needed for the above Thank you Cindy, Quote: >-----Original Message----- http://cindywinegarden.adsl.duke.edu >Hi Wing, >I'm not sure what kind of consolidation you want. >Table1.Field1, Table1.Field2, Table2.Field1, Table2.Field2 >Field1 Field2 Quote: >http://msdn.microsoft.com/vfoxpro http://foxcentral.net
>. |
|
Tue, 30 Aug 2005 14:18:13 GMT | |
![]() |
|
![]() What do you mean non empty? NOT NULL ? is that what you talking about?
like source table a b c null e null g h and the resulting one looking like: |
|
Tue, 30 Aug 2005 19:57:02 GMT | |
![]() |
|
![]() Hi Iliya, Yes,non empty means Not NULL. Thanks, Quote: >-----Original Message----- >What do you mean non empty? NOT NULL ? is that what you talking about? >like source table >a b c null e null g h >and the resulting one looking like: >. |
|
Wed, 31 Aug 2005 02:20:23 GMT | |
![]() |
|
![]() SET NULLDISPLAY TO ""
-Anders
Quote: > Hi Iliya, > Yes,non empty means Not NULL. > Thanks, > >-----Original Message----- > >and the resulting one looking like: > >. |
|
Wed, 31 Aug 2005 04:12:10 GMT | |
![]() |
|
![]() Hi again Iliya, To be exact: then the resulting table: Thanks again, Quote: >-----Original Message----- >What do you mean non empty? NOT NULL ? is that what you talking about? >like source table >a b c null e null g h >and the resulting one looking like: >. |
|
Wed, 31 Aug 2005 04:25:01 GMT | |
![]() |
|
![]() Hello Anders, I tried SET NULLDISPLAY TO "" But the resulting tableD still includes the null fields. Wing Quote: >-----Original Message----- >SET NULLDISPLAY TO "" >-Anders
>> Hi Iliya, >> Yes,non empty means Not NULL. >> Thanks, >> >-----Original Message----- >> >and the resulting one looking like: >> >. >. |
|
Wed, 31 Aug 2005 05:38:05 GMT | |
![]() |
|
![]() Wing,
How do you know how many columns to have in your result? You must remove a --
Quote: > to be exact: > Like source table: > A.Fielda,b,null,d ; B.Fielde,null,g,h ; C.Fieldnull,j,null > then the resulting table: > >and the resulting one looking like: |
|
Wed, 31 Aug 2005 10:45:45 GMT | |
![]() |
|
![]() Wing,
You are making a "horizontal" table rather than a "vertical" one. I really Can you describe what you are going to do with the data? Maybe there's --
Quote: > I want a table which consolidates those non-empty fields > from N-Tables each of which has N-Fields(some of the > fields may or may not be empty) but having just one record > like > Table1.Field1.Record1 > ...Table1.FieldN.Record1 > . > Table2.Field1.Record1 > ...Table2.FieldN.Record1 > . > . > . > TableN.Field1.Record1 > ...TableN.FieldN.Record1 > I would like to know the SQL needed for the above |
|
Wed, 31 Aug 2005 10:49:32 GMT | |
![]() |
|
![]() SET NULLDISPLAY TO "" doesn't remove the NULLs, it changes the way NULL is
DISPLAYed. You can SET NULLDIPLAY TO "Unknown" or 'Missing' or "No data" You can use the NVL() function in the query itslef to replace a NULL with anything else of the correct data type for the column. -Anders
Quote: > Hello Anders, > I tried > SET NULLDISPLAY TO "" > But the resulting tableD still includes the null fields. > Wing > >-----Original Message-----
> >> Hi Iliya, > >> Yes,non empty means Not NULL. > >> Thanks, > >> >-----Original Message----- > >> >and the resulting one looking like: > >> >. > >. |
|
Wed, 31 Aug 2005 17:51:04 GMT | |
![]() |
|
![]() Cindy,
Your are right that I am making a "horizontal" table. Could you give me a procedure command for your suggestion Many thanks, Quote: >-----Original Message----- a "vertical" one. I really >Wing, >You are making a "horizontal" table rather than Quote: >don't think you can do this with SQL. The best I can think of is to step Quote: >through the FIELDS() array and test to see if the value http://cindywinegarden.adsl.duke.edu is null and then >append or not to an array where you collect the values. >Can you describe what you are going to do with the data? >-- Quote: >http://msdn.microsoft.com/vfoxpro http://foxcentral.net
>> I would like to know the SQL needed for the above >. |
|
Thu, 01 Sep 2005 03:51:08 GMT | |
![]() |
|
![]() Cindy,
I have only one (no more than one) record for each horizontal table. Any null field will be removed together with that one record and therefore the resulting table will have accountable columns at the end hopefully. Quote: >-----Original Message----- http://cindywinegarden.adsl.duke.edu >Wing, >How do you know how many columns to have in your result? >-- Quote: >http://msdn.microsoft.com/vfoxpro http://foxcentral.net
>> then the resulting table: >> >What do you mean non empty? NOT NULL ? is that what you >> >and the resulting one looking like: >. |
|
Thu, 01 Sep 2005 04:03:30 GMT | |
![]() |
|
![]() Hi Wing
If you remove fields with nulls and put all the other fields into a single record, how will you know which fields the values belong to? What is an accountable column? Are these numeric fields?. Do you know that NULL values are automatically excluded in statistical computations? -Anders
Quote: > Cindy, > I have only one (no more than one) record for each > horizontal table. Any null field will be removed together > with that one record and therefore the resulting table > will have accountable columns at the end hopefully. > >-----Original Message----- > >How do you know how many columns to have in your result? > >--
> >> then the resulting table: > >> >What do you mean non empty? NOT NULL ? is that what you > >> >and the resulting one looking like: > >. |
|
Fri, 02 Sep 2005 03:21:02 GMT | |
Page 1 of 1 |
[ 14 post ] |