Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I get blank rows?
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00749514
Message ID:
00749516
Views:
23
This message has been marked as the solution to the initial question of the thread.
>Here's an SQL SELECT that I'v cobbled together that gave me the results I was looking for:
>SELECT hst.order_date, bsn.store_name, hst.total, hst.earned ;
> FROM history AS hst, business AS bsn;
> WHERE bsn.vchr_code==hst.vchr_code .AND. ;
> BETWEEN(hst.order_date,{^2001-09-01},{^2002-08-31}) ;
> ORDER BY bsn.store_name, hst.order_date ;
> INTO TABLE ecrtemp.DBF
>Now, how do I get it to add a 'blank' row (a name but no date-total-earned)
>for records in the business table that do not have any matching data in history?

Does this work for you?
SET NULLDISPLAY TO ""
SELECT hst.order_date, bsn.store_name, hst.total, hst.earned ;
   FROM history AS hst ;
      RIGHT JOIN business AS bsn ON bsn.vchr_code==hst.vchr_code ;
         .AND. BETWEEN(hst.order_date,{^2001-09-01},{^2002-08-31}) ;
   ORDER BY bsn.store_name, hst.order_date ;
   INTO TABLE ecrtemp.DBF
My blog
My consulting page
My home page

Member of the Trim Your Auto-Quote Campaign!
What's another word for thesaurus?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform