Database Query... Novice Alert...No Idea Where To Turn...
Dec 18, 2006
Hello,
I'm creating a website for a student organization at my university. Basically, I have an Excel file with a list of contacts that the members of our organization need to be able to search on our website.
The only field that I need our members to be able to search is "contact location." So for example, a member might want to know if our organization has any contacts in Spain, so the member would type "spain" into the "contact location search" field" and would get results.
I really don't known where to turn... I need the easiest thing that would be manageable for a novice. It doesn't need to be an intense search function; just something to make the website functional (so it obviously needs to be uploadable to a server; the server has PHP capability...no idea if that has any relevance). I've been searching around all day and have come across potentials like PHP, SQL, XML, etc. but have no idea which way to turn... I have Office and Adobe Studio programs at my disposal.
Thank you all-powerful and all-knowing web gods! I owe you my deepest gratitude!
Mikey
:beer:
View 1 Replies
ADVERTISEMENT
Feb 19, 2008
consider the following table:
name , TaskDate
john , 01/01/2006
john , 01/03/2005
steve , 01/05/2006
i want to build a select statement that gives result like the following:
name , JanuaryTotal , FebruaryTotal
john , 150 , 110
steve , 170 , 50
so the result will be total tasks in specific month, is it doable in one select or should i turn around using hash tables ???
View 6 Replies
View Related
May 23, 2007
Good morning
In messages system i have table to store messages and another table to contain the links which the message is posted through
Now i want to delete a link but i don't want to delete the message sent through this link
The problem:
When displaying the message sent what will be found in the link field (i.e. for the deleted link)
If any one has a good idea for doing that please reply to me
I don’t want the sql code
I want just the idea
Thanks
kind regards
mohammed Al Maghraby
View 6 Replies
View Related
May 23, 2007
Good morning
In messages system i have table to store messages and another table to contain the links which the message is posted through
Now i want to delete a link but i don't want to delete the message sent through this link
The problem:
When displaying the message sent what will be fount in the link field (i.e for the deleted link)
I tried to move the deleted link data to separate table (EX: deletedLink) but if the user added new link with the same name as the deleted link? The problem mainly in when displaying the message sent i will have the same link twice one for the deleted and the other for the added one.
If any one has a good idea for doing that please reply to me
I don’t want the sql code
I want just the idea
Thanks
mohammed Al maghraby
View 1 Replies
View Related
Feb 8, 2006
we are creating a database of sales agents. Basically I have a tableof about 35,000 people, a second one with 8000 offices, and a thirdtable of around 400,000 transactions done by those 35,000 people inthose 8000 offices. We get new data everyday that just updates theexisting tables with the updated rosters and transactions.I want to build a quick website where our recruiters can look up thosepeople and keep contact info and all that fun stuff but also pullnumbers on those people. Like* How Many Transactions that Sales Agent did last year* Rosters by office showing productionThe goal is to click the users name and see all the percentages,commissions and data like that which we will get by searching thattable of transactions by the agents ID.the problems I see right away are stuff like* If I were to pull a report showing all agents in a single office withtheir number of transactions next to their name, that is a HUGE query.It would have to search the 400k worth of records for each of theagents on just that one report.A suggestions I was givenI was told by a fellow programmer a better way to do this is to have anadditional table that houses stats info and have the SQL server runautomated reports everyday at say midnight where it updates that table.This table could show stuff like** number of transactions for each user** avg sales price on all transactions for each user** avg commission on transaction for each userlet me know your thoughtsthanks in advanceMonkey Girl
View 1 Replies
View Related
Sep 25, 2006
Hi ya,
Here is the query:
if (criteria == "All")
{
SqlDataSource1.SelectCommand = "select * from [tblproperty]";
}
else
{
SqlDataSource1.SelectCommand = "select * from [tblproperty] where " + item + "" + criteria.Trim() + "'" + txtSearch.Text.Trim() + "'";
}
}
}
Now the item contains any value from a combo box, the criteria would be having (All, =, <,>, like, <>) and txtsearch would be having the exact search field value. How can i transform it into a stored procedure so that I do not have to write 2 procedure plus i would be getting all the values back when the procedure executes?
Any ideas?
View 6 Replies
View Related
Dec 18, 2007
I found in error log of my server is full of message like this
The query notification dialog on conversation handle '{9AD14600-28AD-DC11-9B36-000D5670268E}.' closed due to the following error: '<?xml version="1.0"?><Error xmlns="http://schemas.microsoft.com/SQL/ServiceBroker/Error"><Code>-8494</Code><Description>You do not have permission to access the service 'SqlQueryNotificationService-174a4df0-bac8-4a51-8564-28d750d7c11a'.</Description></Error>'.
any idea what could cause that?
thanks!
View 2 Replies
View Related
Jan 7, 2007
create from dbo.fromExampleasfrom dbo.Customers cjoin dbo.Invoices ion c.CustomerID = i.CustomerIDnow you can use it as follows:select c.CustomerID, i.InvoiceNofrom dbo.fromExampleI find I reuse FROM clauses alotand reusing a "base query" requires writing a very large and cumbersomeselect clause
View 6 Replies
View Related
Sep 18, 2014
I want to turn on the query governor cost limit option for 20 minutes so that queries do not run longer than 20 minutes but I could not find any info as if this option would also not allow database backup job or other maintenance jobs to run more than 20 minutes. We have backups (Via RedGate) run over 3.5 hours and others like rebuild indexes and integrity checks even more than 3.5 hours....
SQL Server 2012 SP2-CU1
Windows 2008 R2
View 1 Replies
View Related
Dec 18, 2007
HI all,
I have a windows application which runs a process,
I am updating database column "Status" with Processing when the application is running, and on completion I update it with Staus="Completed" or in case I close the application
I update db with Status="Interupted" .
I have problem that in case while proces is running, power supply or system turns off, the db Status="Processing", but in actual it is interupted.
How will i update?
Please help.
View 1 Replies
View Related
Jul 20, 2005
Hi!How to create an alert that responses in case of long querya. I haven'tnoticed any counters that deals with these kind of situations?Thx for your help!
View 3 Replies
View Related
Jun 21, 2015
How can I turn this query into an Email alert if one of the counts are GT 50. The Source are machines that I capture counts(Unprocessed_Cntr) from every 5 minutes and load to the Load_Time_Capture table. I also add a datetime to each capture(Unprocessed_Capture ). Â
If any individual source has a count > 50 or if the combined(ALL) GT 50 send an email to support person. Â
SELECTÂ
 CASE GROUPING([Source])
         WHEN 1 THEN 'ALL'
         ELSE [Source] END AS 'Input Source',      Â
         avg([Unprocessed_Cntr]) as 'Average Queue Past 15 Min'Â
                   Â
FROM Â Â Â Â Load_Time_Capture
WHERE Unprocessed_Capture >= Â DateADD(mi, -15, Current_TimeStamp)
GROUP BY Â Â [source] WITH ROLLUP
View 4 Replies
View Related
Sep 4, 2005
Hey all - been knocking my head on this on for awhile - perhaps someone could shed a little light.
I have 2 tables that I want to link:
Table 1:
UserID - Primary key
First Name
Last name
AuditionID - FK
Table 2:
AuditionID - PK
Description
Sing
instrument
So - I have a web form that collects the information for both tables and then insets the collected data. But, the AuditionID value in Table1 does not update. Now, I assume I am incorrect in thinking the AuditionID in Table1 will be automagically updated when Table2 creates it's key...?
If that is indeed the case, how do you update 2 tables and maintain a foreign key relationship?
I hope I am being clear enough - any help would be greatly appreciated.
Thanks all
View 2 Replies
View Related
Oct 2, 2007
Hello,
I'm running a (phpBB) forum which uses a MYSQL data base - I can access the database via a webpage through my ISP and it lets me run short scripts (through a web interface). I need to do the following (shown in psuedo code below). I would be eternally grateful if someone could translate it into pure SQL commands for me to paste into my SQL quiery input field on the web page I'm using to access my database. (I'm a complete SQL novice)
=====================
/* I need to be sure these commands will do nothing if 'jeff' does not exist in the user table */
/* extract the id value for the user called 'jeff' from the users table */
user = GET id FROM users WHERE username = "jeff"
/* remove all entries from the forums_watch and topics_watch tables that contain Jeff's userID */
REMOVE ALL ENTRIES WHERE userID = user
notify = 0;
/* insert many entries into the topics_watch table, one for each topic that exists in the topic table */
arrayOfTopicIDs = GET ALL id FROM topics
FOR EACH current_Topic IN arrayOfTopicIDs {
INSERT INTO topics_watch
(topic_id, user_id, notify_status)
values (current_Topic, user, notify)
}
/* insert many entries for jeff into the forums_watch table, one entry for each forum that exists in the forum table */
arrayOfForumIDs = GET ALL id FROM forums
FOR each current_Forum in arrayOfTopicIDs {
INSERT INTO forums_watch
(topic_id, user_id, notify_status)
values (current_Forum, user, notify)
}
=====================
I'm going to implement this with php and MYSQL as a mod for my forum application (phpBB) - but I could really do with a way of doing this immediately with pure SQL commands as a quick and dirty one shot paste into the input field of the MYSQL database web interface until I get the php mod going.
Can this be done using only SQL commands without tedious repetition?
Best Regards,
Alan
View 2 Replies
View Related
Oct 20, 2006
How do you work with an xml file that resides in a database column using IS XML related features? From what i understand so far, the path cannot point to a column within a database but only to a source outside of the database. Am I correct?
View 1 Replies
View Related
Oct 22, 2007
Hi
I have a table which has the column [itemNumber] Which contains numbers from 000 to 999. I have another table which has the UPC data for given items
I am trying to get results from my query that will show me every number in the itemNumberSet table that does not already exist (in the substring) of the UPCcode column.
By using the query below i am able to retrieve the opposite, and it works by returning results that do exist in the UPCcode column. But I cannot seem to get it to do the opposite which is what i am after. I figured it would be as simple as using NOT IN but that returned 0 results.
SELECT itemNumber FROM itemNumberSet
WHERE itemNumber IN (select SUBSTRING(UPCcode, 9, 3) FROM itemUPCtable)
ORDER BY itemNumber
Thanks for any suggestions you might have.
J
View 3 Replies
View Related
Nov 15, 2001
I'm looking for advise on how to set up or create an alert that will monitor database free space. I need to receive an alert if a database becames 85% full. I need to implement this ASAP. The servers I work with are on version 7.0.
I was just wondering if there is any system stored procedure or alert as such.
Thanks in advance.
vivek s.
View 2 Replies
View Related
Apr 18, 2008
Hi,
i want to be alerted when any of my databases is more the xxxGB.
i know one method to do that and it is with the alerts in the SQL agent Performance condition ,but with this alert i needs to created alert monitor for every DB.
do you know a better way to achieve that ?
THX
View 3 Replies
View Related
May 31, 2007
Hi All,
We having the SQL SERVER 2000 Production server. We need to cofigure the alert on the production server that if any objects schema or SP got changed then server should fire the alert to all of DBA mailid.
Is there any way to sent the alert.
Thanks in advance.
BPG
View 10 Replies
View Related
Nov 1, 2007
Hi all,
I want to have some kind of alert , when the database size reaches 100 Gb. So, what is best way to do this.
Could anyone suggest (or) provide some steps / links , how to do this.
Thanks.
View 6 Replies
View Related
Aug 10, 2007
Hello,
I am asking a question i have seen many threads on, but I am looking for an idiot's guide on how to convert my SQL 2005 database to SQL 2000 so i can get it to run on my web hosting server. I'm very new to asp.net , but have ahd years of experience in normal HTML and a year or two in the old ASP.
I was advised to learn ASP.Net 2.0 and have found it nothing but brilliant. The intergration with SQL 2005 made it a lot quicker to link up a database than using Access. Unfortunatly my hosting company is a little behind and still using SQL 2000. There isn't mch databse intergration (a few aplication forms) so I dont mind re-writing the whole database but I dont know how to set Visual web developer up with a SQL 2000 Database. I have also read from various other forums that you can convert a databse to 2000 by doing something with the scripts, but the explaination is too complicated for me to follow.
Is there anyone out there who wouldn't mind going over some old ground and explain this all in simple terms? Im using 'SQL Server Managment Studio Express' (although i dont know how to use it) and 'Microsoft visual web developer 2005 express edition' .
Thanks for reading this
Simon
View 6 Replies
View Related
Jun 4, 2007
I'm sure this problem borders on retarded for most readers of this form, but here it is:
I have table with contest and another table with user ratings on those contests.
Contests: ContestID, CreatorUserID, Title
Ratings: ContestID, UserID, Rating
If I
SELECT Contests.*, Ratings.*
FROM Contests INNER JOIN Ratings ON Contests.ContestID = Ratings.ContestID
WHERE (Ratings.UserID = '1')
This only returns the contests that User 1 has rated. But I need all contests. If the user hasn't rated one, I want the result set to show Rating = NULL. The problem is that if a user hasn't rated a contest, that ContestID does not exist in the Ratings table.
Can someone please show me how to solve this?
Thanks!
Gavin
View 2 Replies
View Related
Jan 30, 2015
which have a lot of impact to database performace since it do not fit onto memory and spill over to disks.
The question is when i ran a profiler and tried to catch a sort warning i cannot find the query which cause the alert.
View 1 Replies
View Related
Jul 24, 2015
I use below trigger to email me when a database is created or dropped.
 Â
CREATE Â TRIGGER [DDL_CREATE_DATABASE_EVENT]
ON ALL SERVER
FOR CREATE_DATABASE
AS
DECLARE @bd VARCHAR(MAX)
DECLARE @tsql VARCHAR(MAX)
SET @tsql = EVENTDATA().value
[Code] ...
Is there a way we can get notification when a table is created or altered or dropped ?
View 3 Replies
View Related
Aug 23, 2007
Hello Everyone,
I am new to connecting to databases through java and in fact have not done much database programming although I am fairly good at SQL.
I have used the MS JDBC driver to connect to a MS SQL server database but I want to update my application every time a record is added to the database and or alert the user.
From what I have read, i assume that I can create a Trigger in java but how do I get my trigger to call a method / run java code?
Thanks for your time and Help
Martin.
View 1 Replies
View Related
Aug 10, 2001
seems like it should be a simple ALTER TABLE query but im getting a 'Incorrect syntax near the keyword 'column'.' error. Trying to add a boolean column, heres the script, any help would apprectiated.
ALTER TABLE SHIPPING_ADDRESS
ADD COLUMN isUpdated bit,
thanks.
matt
View 1 Replies
View Related
Jul 20, 2005
What is the common mechanism (if any) to make the server notify aclient when some condition is met (say, upon completion of asql-transaction)? The only way to implement this feature I am aware ofnow is to set up a timer and query the server every once in a whilebut surely this technique isn't much good.
View 2 Replies
View Related
Nov 8, 2006
I have an error 14421 (database has restore threshold for 45 minutes and has not restored in more than "so many" minutes)firing for a database that no longer exists. How can I remove this alert? I have other log shipping plans that are running and so I can't delete the Log shipping alert job.
View 4 Replies
View Related
Aug 25, 2015
We have installed 2014 sql server on a stand alone VM and can create alerts without issue. We recently did a cluster install of 2014, and when trying to create alerts get the following error:
Msg 14262, Level 16, State 1, Procedure sp_verify_performance_condition, Line 52
The specified object_name ('Databases') does not exist.
Specifically, we are trying to create a database alert on percent log used that will kick off a job to back up the log.
We are on Windows 2012R2 o/s. In the drop downs in SSMS under alerts, we do not have all the options we have in the stand alone instance - they are not there. Is this a bug? Is there a CU?
View 2 Replies
View Related
Aug 13, 2015
Can you use the below query to get CPU high utilisation alert purposes for both named and default instance? or, do I need to make any changes here (@wmi_namespace=N'.ROOTCIMV2' ) ?
USE [msdb]
GO
EXEC msdb.dbo.sp_add_alert @name=N'CPU_WM_Utilization_Check',
@message_id=0,
@severity=0,
[code]....
View 2 Replies
View Related
Apr 23, 2015
We recently had a problem with DB Mail. SQL jobs that sends an email succeeded but the email in the job fail to sent. There was a problem with the email server. The error is included. We fixed the problem with the email server. How can I get an alert when a DB Mail email fails send?
Date4/23/2015 10:01:06 AM
LogDatabase Mail (Database Mail Log)
Log ID5907
Process ID13204
Mail Item ID5702
Last Modified4/23/2015 10:01:06 AM
Last Modified Bysa
Message
The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2015-04-23T10:01:06). Exception Message: Cannot send mails to mail server. (Insufficient system storage. The server response was: 4.3.1 Unable to accept message because the server is out of disk space.).
)
View 2 Replies
View Related
Mar 4, 2008
i have a table FORUM_REPLY it contain follwing fieldsquest_id,answer_id, reply_user_id.i want who is post most answer.so i need reply_user_id and max(no_of_answer).but following query given reply_user_id and no_of_answer onlySELECT reply_user_id,count(answer_id) as no_of_answer FROM FORUM_REPLY GROUP BY(reply_user_id)How to get max_no_of_answer?
View 13 Replies
View Related
May 21, 2001
Hi all,
I am new to the DTS game - or at least to trying to do anything other than transfer rows between databases with identical structures.
I now need to create a far more complex DTS package to transfer data between an SQL Server database (I am using SQL Server 7.0) and an Oracle database. I have no trouble in making the connections and performing simple DTS's beween the two.
However, my current task is more complicated.
Problem 1:
In one database I would store fifty values as 5 five records each containing 10 values (i.e. has ten fields). However, in the other database these fifty values would all be stored as one record (i.e. one row with 50 fields). How could I go about creating a DTS to transfer this information?
Problem 2:
These values should only be transfered if certain conditions are met in an another unrelated table. For example, a flag in another table indicating that transfer of the said values should occur.
Any help with either of these problems would be much appraciated.
Thanks in advance,
Ross
View 3 Replies
View Related