Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

writing query in sql expression field

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
hello
should i write sql quary in sql expression field.

my problem is;
i have two table.

table1
code wt
1001 5
1001 6
1002 5
1003 12
1003 12
1003 15

table2
code wt
1001 5
1001 6
1001 5
1002 12
1002 12



i have to generate report like


code wt1(table1) wt2(table2)
1001 11 16
1002 5 24
1003 39 0

how is it possible.

if you can write sql quary in sql expression field.
then pls write me format.

pls help

 
Simply set up a relation - database menu and set the common fields (hopefully unique!) to a 1 to 1 join relation.

Otherwise you'll need unique id numbers linkin both tables,

 
Also, note that SQL expression fields are virtual columns in your results. You can't add an entire SELECT statement in there. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top