Click here to Skip to main content
15,884,099 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want to combine both tables and I dnt have any relation between them.i want to check if mod(row_no,discount_number)=0 and i will calculate with discount_amount_percentage with gross_amount and tax_amount.how to do this?.If there is relationship means we can use joins but there is no relationship

//table1
row_no gross_amount tax_amount

//table2

discount_amount_percentage discount_number
Posted

1 solution

You can use below query

SQL
Select * from table1 t1, table2 t2 where --....some condition here


at place of *, you can use "case" for getting the your result.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900