Showing posts with label city. Show all posts
Showing posts with label city. Show all posts

Monday, March 19, 2012

E-mail notifications

Hi,
..I have 4 tables:
Users
userid(PK) username pass addr
Offer
offerid(PK) userid(FK to Users) estateid(FK to Estates) price
rooms
Estate
estateid(PK) city phone addr date ...
Search
searchid(PK) userid(FK to Users) estateid(FKto Estates) min price
max price min rooms maxrooms
In the Search table I store information about every user which wants to
receive automatically information about Estates. I don't know how to
accomplish that. With trigger or something else. In Search could be stored
info from 300-400 users which wants to receive e-mail notifications about
estates by their
criteria everytime when a estate is inserted and it is what they want. .
Could someone gives me a solution for that problem?
Thank you!
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.721 / Virus Database: 477 - Release Date: 16.7.2004 a.
Check Notification Services for SQL Server, that would help i think.
"Viktor Popov" wrote:

> Hi,
> ..I have 4 tables:
> Users
> --
> userid(PK) username pass addr
> Offer
> --
> offerid(PK) userid(FK to Users) estateid(FK to Estates) price
> rooms
> Estate
> --
> estateid(PK) city phone addr date ...
> Search
> --
> searchid(PK) userid(FK to Users) estateid(FKto Estates) min price
> max price min rooms maxrooms
>
> In the Search table I store information about every user which wants to
> receive automatically information about Estates. I don't know how to
> accomplish that. With trigger or something else. In Search could be stored
> info from 300-400 users which wants to receive e-mail notifications about
> estates by their
> criteria everytime when a estate is inserted and it is what they want. .
> Could someone gives me a solution for that problem?
> Thank you!
>
> --
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.721 / Virus Database: 477 - Release Date: 16.7.2004 a.
>
>

Sunday, February 26, 2012

Eliminating Duplicated

I have 3 tables Employee (empno,name,city) , Emp-Pl (empno,noofleaves) , and
Emp-Cl (empno,noofleaves). Now i require the report in the following format
Sample Data
employee
1 ravi kumar rajahmundry
2 ravindra kakinada
emp-pl emp-cl
empno noofleave empno noofleave
1 2 1 4
1 3 1 2
2 4 1 3
2 1 2 1
2 1
EMPNO NAME CL PL
1 ravikumar 4 2
2 3
3
2 ravindra 1 4
1
1
"venkataramarao" <venkataramarao@.discussions.microsoft.com> wrote in message
news:AC5F930E-5EE5-41B2-AB7B-C809082EF5C7@.microsoft.com...
>I have 3 tables Employee (empno,name,city) , Emp-Pl (empno,noofleaves) ,
>and
> Emp-Cl (empno,noofleaves). Now i require the report in the following
> format
> Sample Data
> employee
> 1 ravi kumar rajahmundry
> 2 ravindra kakinada
> emp-pl emp-cl
> empno noofleave empno noofleave
> 1 2 1 4
> 1 3 1 2
> 2 4 1 3
> 2 1 2 1
> 2 1
> EMPNO NAME CL PL
> 1 ravikumar 4 2
> 2 3
> 3
> 2 ravindra 1 4
> 1
> 1
I don't understand your requirements. Why does data from the CL table appear
in both the CL and PL columns? What determines this output?
Please post DDL and post sample data as INSERT statements rather than
sketches of tables.
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx