I am doing multiple joins and pushing that information into a temporary table. There is a where condition on that.. like the events should happen between so and so date and then the results are copied to this temp table. Now If there are no events between
those dates, I shoudl create a new record with some details like where the events not happenned etc...
When there are no events, that means there are no records, so how I create this new record with the event place and other details?
nissan
Participant
1065 Points
618 Posts
Creating a row whenever there are no records
Feb 22, 2013 07:46 PM|LINK
Hello,
I am doing multiple joins and pushing that information into a temporary table. There is a where condition on that.. like the events should happen between so and so date and then the results are copied to this temp table. Now If there are no events between those dates, I shoudl create a new record with some details like where the events not happenned etc...
When there are no events, that means there are no records, so how I create this new record with the event place and other details?
I don't know if I explained it correctly...
AZMatt
Star
10652 Points
1898 Posts
Re: Creating a row whenever there are no records
Feb 22, 2013 07:55 PM|LINK
Look at NOT EXISTS...
http://www.techonthenet.com/sql/exists.php
Matt