Hi
I am trying to create a trigger on a database called dbo.DHCPReport, which has a column called "returneduserclass nvarChar(128)". I want to have the trigger send a email when the returneduserclass column is populated with the following "NACDeny".
the trigger I have is below, currently all this does is email when any "insert" occurs
...
I have a SQL table containing train schedules. The table looks something like this:
Schedule
TrainNumber
LegID
DepartureTime
DepartureStation
ArrivalTime
ArrivalStation
My real database contain several tables, but for this question only the one above is relevant. Different trainNumber can have different amount of legs. Based on a dep...
Hi,
I'm trying to join two SQL tables, parent (which I have complete design control over) and child (which I cannot change). I have changed the parent table so that it has a varchar column, containing a CSV list of the ids of the child records. I would now like to do a select returning one row per parent, and some counters re. the child...
The data in my dabatase comes from an external source and where ever there is no data passed, I keep NULL in those places. Can anyone tell me if there are any implications in using NULL to represent empty value?
Should I follow some other convention like 'data_not_available'? or something like that?
Can anyone suggest?
...
In my code I have three classes as follows: Forum, Forum::Thread and Forum::Post
What I want to do is create a belongs_to-relationship from the Forum::Post class to the Forum class and vice versa with a has_many, preferably without creating a custom function for it. (This is admittedly more of an intellectual exercise than a technical l...
whether the 'identity' used in sql server has been used twice inside same table.
ex: i need to insert some set of records with the identity column starting from 0,1,2....
and when i insert some another set of records again the identity must start with 0,1,2..
is there is any possiblity to achieve that using the identity seed.
...
I'm trying to create an XML document from a complex result set, i.e. a result set with multiple joins, so a competition has a bunch of questions, and a question has a bunch of answers.
So the document would end up looking something like:
<competitions>
<competition id="12">
<question id="3">
<answer id="34">
The ans...
Is there a way of finding out when the data was last entered into a table? I'm trying to find obsolete tables within my database and would like to know if there is a simple script(s) that I can run?
...
Hi, I need help with a problem regarding data saved in a parent-children model table and a report I need to build upon it. I've already tried searching for topics about parent-children issues, but I couldn't find anything useful in my scenario.
What I have
A Microsoft SQL Server 2000 database server.
A categories table, which has four...
Apologies if this is a duplicate question, but is there a real difference between executing a SQL statement in Linq2Sql compared to executing a Stored Procedure?
What are the benefits? (if any)
...
...@Sort bit)
AS
SELECT
..............
and I want to Order only if Sort = true
How can I realize it ?
Thank you.
...
Hi all,
I'm using MS SQL 2000, VS2008, MVC and C#.
I'm trying to insert and update some data using stored procedures.
Some columns are of type datetime.
Regional settings on both server and client are set to Dutch (Belgium)
This means the default date format is dd/mm/yyyy.
When i try to insert or update with a date of eg. 28/03/2009,...
How can I update a complete data row by using a data row from another table.
Example:
Table A
ID | NAME | ... |
----------------------------
1 | Test | ... |
2 | Test2 | ... |
Table B
ID | NAME | ... |
----------------------------
1 | Test97 | ... |
So I want to copy the con...
I've got the design habit to have a SqlConnection object populated by a child form, showing the child form, establishing the SqlConnection object and having the populated object passed back to the parent form where execution continues. .NET 2.0 and up 0 as follows:
Parent form:
public SqlConnection sqlcon; //should be property but mad...
I'm in the middle of amending our data export process and was wondering whether to create an SSIS package in order to export the data, or whether BCP is the "preferred" method?
...
Is there a way to automatically create javax.persistence.Entity classes from an existing database (or from the SQL statements that created them)?
I am just reading through the persistence part of The Java EE 5 Tutorial and creating all these annotations by hand seems rather wasteful considering that all (or most) of the necessary knowle...
Hi,
I need a DOS command or a batch (.bat) file I can execute to run all the *.sql script in a directory and it's subdirectories.
Any ideas?
...
i accidentally deleted some huge rows from a table..
How can i rollback it?
I executed the query using the putty ...
I'll greatful if any of me guide me safe out this hole..
...
Please be gentle, as I'm still new to web programming and -very- new to Ajax!
I've created a C# function which extracts data from an mssql database, formats it to a json string and returns that. Now I need to make a call from my javascript (jQuery) slider through an aspx page that is related to the C# code file.
I have actually never d...
I am extracting data from multiple tables. mt query is as follows:
SELECT p.Record_Num as RecordNum
,p.GCD_ID as GCDID
,p.Project_Desc as ProjectDesc
,p.Proponent_Name as ProponentName
,st.Station_Name as StationName
,p.OpCentre as OpCentre
,s.Sector_Name as SectorName
,p.PLZone as PLZone
,f.Feeder_Desc as FeederDesc
,d.DxTx_Desc as DxT...