|
hi,
Well i am using the sqlserver2000 as backend.
I have table like seatdetails and columns are
seatno,bookingdate,dateoftravel,seatstatus
the seatstatus can be 0 - rejected, 1 -pending, and 2 - accepted.
Now the issue is daily at 12:00am , i need to execute the trigger or event which should check the
dateoftravel with the date in server
if it is less then
check the status of a seat
if it is 1 (i.e status of a seat) then
the date diff of bookingdate and cureentdate
if it is equal to 3 (i.e. counter of days) then the status should be set to 0 (i.e. status of a seat) and mail sent to @mailid1 and @mailid2
regarding the changes from the sqlserver.
Thank you for helping me in advance
You can mail me the procedure suhailquadri@gmail.com
|
|
|
|
|
Set up a SQL job that executes at 12:00am every day.
As for the code, I hope you're not asking someone to write that for you. You claim to be a developer, so why can't you do it yourself? I suggest you make an attempt at it and post again if you have specific problems. Otherwise people will think you are another lazy developer who can't be bothered to do their own work and ignore your post.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
well this can be done using code behind file.
but i heard we can do it using sqlserver2000 enterprize manager
if u have any idea regarading that , please help me
|
|
|
|
|
suhailahmedmohammed wrote: well this can be done using code behind file.
but i heard we can do it using sqlserver2000 enterprize manager
if u have any idea regarading that , please help me
RTFM
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
suhailahmedmohammed wrote: hi,
Well i am using the sqlserver2000 as backend.
I have table like seatdetails and columns are
seatno,bookingdate,dateoftravel,seatstatus
the seatstatus can be 0 - rejected, 1 -pending, and 2 - accepted.
Now the issue is daily at 12:00am , i need to execute the trigger or event which should check the
dateoftravel with the date in server
if it is less then
check the status of a seat
if it is 1 (i.e status of a seat) then
the date diff of bookingdate and cureentdate
if it is equal to 3 (i.e. counter of days) then the status should be set to 0 (i.e. status of a seat) and mail sent to @mailid1 and @mailid2
regarding the changes from the sqlserver.
That's a pretty nice novel you have there. Now, what exactly is your question? I.E., where in writing the code for this are you having problems?
suhailahmedmohammed wrote: You can mail me the procedure suhailquadri@gmail.com
WHAT? Do your work yourself. This isn't rent-a-coder. This is a place where you ask specific questions when you are having specific problems. I can't wait until my device is finished.
I'm going to become rich when I create a device that allows me to punch people in the face over the internet.
"If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
|
|
|
|
|
hi
i have two columns in a single table.i want to join two columns and display data in that table..
|
|
|
|
|
table 1, empno(pk), empname , empage
table 2, deptno(pk),deptname,dept_empno(fk)
then when joinging the datea
select empname,emapage,empno,deptname from table1 inner join table2 on empno = dept_empno
|
|
|
|
|
In oracle database there is a table t, its creat table sql is as follows:
create table t
(
sno number(3,0)
check (sno >=1 and sno <=4)
);
If another person want to know the context of the check constraint within table t, How to write
this through SQL?
thanks
|
|
|
|
|
Hi there,
i have a website
Files hierarchy is
wwwroot/
Default.aspx
Login.aspx
data/
db1.mdb[MS Access database]
web.config
Register/
Signup.aspx
web.config
when i inserting a record from Signup.aspx to db1.mdb it was returning an error Operation must use an updateable query
i think i have to change the permissions of db1.mdb, if so how to change permissions. iam using windows xp operationg system.
thanks for any advice
i posted this in webdevelopment forum also, i confused where to post this message.....
|
|
|
|
|
You haven't posted any code, so it's difficult to help you. Did you try Googling the error message to find out what it means?
Also, this is a SQL question so it should be posted in the SQL forum. It has nothing to do with web development.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Is there anyway i can tell who has been deleting rows from a specific table. Our db (SQL Server 2000) is using SQL Authentication. This is what i need:
1. Queries run
2. IP that ran the query
3. SQL Authenticanted Username
4. Time query was run.
Is this possible?
|
|
|
|
|
Can be done through triggers for the most part.
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
can you give me an example or sample on how i can set this up?
|
|
|
|
|
Google search on SQL Triggers[^] turns up a bit.
Other aspects, like getting the IP address is left for a research exercise
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
Paul Conrad wrote: research exercise
I can't stop laughing...!!!
Do rate the reply, if it helps or even if it doesnot, because it helps the members to know, what solved the issue. Thanks.
|
|
|
|
|
so that I can do the following:
<br />
exec GetProcSourceCode 'myproc'<br />
to view the source code of 'myproc'?
|
|
|
|
|
Why would you need a proc to do that. You may use sp_helptext[^].
If you still would like to have a proc, you may include the above said command to a proc like the one below
Create Proc GetProcSourceCode
@pProcName VarChar(500)
As
Exec sp_helptext @pProcName
|
|
|
|
|
sp_helptext is exactly what I was looking for. Thanks.
|
|
|
|
|
You are most welcome
|
|
|
|
|
Hi All,
I have a stored procedure that is bound to a data grid.Every time there is a change of data on the stored procedure i want it to be reelected on the data grid automatically.
This can be done i think with SQL2005.Can you please adivce me on this?
In SQL Server 2005 there is native support for creating cache dependencies that expire when a change is made in the database.
How do you do it?
Please advice.
Thank you
|
|
|
|
|
Have you considered reading the documentation[^]?
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Guys i am planning to develop a system that work on Pocket PC... becoz some of my client works at field which obviously can carry a computer.. so im planning to give them a system that works on Pocket PC... but im too much confuse what does Replication, Publication and Subcriptions (SQL Server 2005 and SQL Server Mobile) can do in my system.. does any can give a clear view or give me some to start with.. thanks..
|
|
|
|
|
Replication is a bit of a black art.
There is plenty out there on google.
Really the only way to go about it is to start and experiment.
The reason I say this is that the type of replication you use is dependent on lots of factors and experimentation is the best way IMHO.
My position is that I have never used it myself, but have worked for companies that use it and have seen how complex it can get.
I am considering using it and with the dearth of practical information out there it has become apparent to me that bar having a DBA with experience in replication at your side - experimentation is the best way.
You always pass failure on the way to success.
|
|
|
|
|
Hi,
I'm working in SQL Server 2005 and I'm trying to retrieve some records from a MySQL database using:
SELECT * FROM OPENROWSET(provider, connectionString, selectStatement)
I used MSDASQL as the provider. Can anyone tell me a good connection string?
Thanks
|
|
|
|
|
http://www.connectionstrings.com/[^]
I'm going to become rich when I create a device that allows me to punch people in the face over the internet.
"If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
|
|
|
|