I have a tricky problem that has had me scratching my head for a little while. I have some data that represents the delivery of "widgets" over a variable number of days, broken down into half hourly slots.
For example (apologies for formatting - haven't quite got to grips with it):
Date Time NoOfUnits
01-Mar-2010 00:00...
We have a database with hundreds of tables.
Is there some kind of meta data source in SQL Server that I can programatically query to get the name of the last changed table and row?
Or do we need to implement this ourselves with fields in each table called LastChangedDateTime, etc.?
...
I need to write a generic procedure that set value for one column or no of a columns in a table depending on parameters. Any idea how to do it.
...
There is a one value 15000000.00 with Numeric datatype in SQL server.
How can i get or convert the value 15000000.00 to 15,000,000?
...
Using ASP.NET 3.5, Linq to SQL, SQL Server 2005 on Windows Server 2003. Running VS 2008 on XP SP3 locally.
We need to be able to wrap inserts, updates, and deletes in a transaction. When we first tried this by wrapping code blocks with using(var trans = new TransactionScope()) { ...; trans.Complete(); }, we got an appropriate exception ...
Geetings, Stackers.
I have a huge number of data-points in a SQL table, and I want to summarise them in a way reminiscent of RRD.
Assuming a table such as
ID | ENTITY_ID | SCORE_DATE | SCORE | SOME_OTHER_DATA
----+-----------+------------+-------+-----------------
1 | A00000001 | 01/01/2010 | 100 | some data
2 | A00000002 | 01...
Does the sync framework allow me to synchronise (download only) the Store Procedures on a sql server 2008 server with the Stored procedures on the SQL Server 2008 client?
i.e. overwrite the SP on the client when the server SP's have been modifed or new ones created?
Thanks
...
I created a trigger on a table for updates. If any update happens, I want to store the old value in separate table. I am trying to get the old value from "inserted" table, but this table is not populated with old values after update.
Here is the sample code:
CREATE TRIGGER [dbo].[Logs_Update]
ON [dbo].[Logs] AFTER UPDATE
AS
DE...
how do i convert my sql server management studio express to server authentication mode.. please help regarding this..
...
Hello,
I am missing this DLL reference in c:\program files\SQL Server\90\Tools\Binn. I'm assuming that this is because I didn't install the 2005 client. I installed all of the services for 2005, the database instance, reporting services instance, SSAS and SSIS. I installed the 2008 client though, not the 2005 client, and 2008 databas...
I need to display a list of dates, which I have in a table
SELECT mydate AS MyDate, 1 AS DateType
FROM myTable
WHERE myTable.fkId = @MyFkId;
Jan 1, 2010 - 1
Jan 2, 2010 - 1
Jan 10, 2010 - 1
No problem. However, I now need to display the date before and the date after as well with a different DateType.
Dec 31, 2009 - 2...
Hello All,
In one of the ASP .Net site we are currently working we have a bulk load of SSRS reports. We have forms authentication for the site and reports have already been created and deployed in the report server. We are having so many problems with authentication when we set the report viewer control to access the server report.
I...
We have a table set up as follows:
|ID|EmployeeID|Date |Category |Hours|
|1 |1 |1/1/2010 |Vacation Earned|2.0 |
|2 |2 |2/12/2010|Vacation Earned|3.0 |
|3 |1 |2/4/2010 |Vacation Used |1.0 |
|4 |2 |5/18/2010|Vacation Earned|2.0 |
|5 |2 |7/23/2010|Vacation Used |4.0 |
The business ...
Hello,
I'm getting the error "Invalid URI: The format of the URI could not be determined" when customizing it. I've made several changes to the configuration files and UI, but I keep getting this error. It isn't logging it too in the event log nor the log files, which makes it very annoying to debug. So how do I figure out where the ...
Greetings -
I have a table of Articles and a table of Categories.
An Article can be used in many Categories, so I have created a table of ArticleCategories like this:
BridgeID int (PK)
ArticleID int
CategoryID int
Now, I want to create constraints/relationships such that the ArticleID-CategoryID combinations are unique AND that th...
DECLARE @table table(XYZ VARCHAR(8) , id int)
INSERT INTO @table
SELECT '4000', 1
UNION ALL
SELECT '3.123', 2
UNION ALL
SELECT '7.0', 3
UNION ALL
SELECT '80000', 4
UNION ALL
SELECT NULL, 5
Query:
SELECT CASE
WHEN PATINDEX('^[0-9]{1,5}[\.][0-9]{1,3}$', XYZ) = 0 THEN XYZ
WHEN PATINDEX('^[0-9]{1,8}$',XYZ) = 0 THEN CAS...
When you get this error, the first thing you ask is, which column? Unfortunately, SQL Server is no help here. So you start doing trial and error. Well, right now I have a statement like:
INSERT tbl (A, B, C, D, E, F, G)
SELECT A, B * 2, C, D, E, q.F, G
FROM tbl
,othertable q
WHERE etc etc
Note that
Some values are modifi...
We currently have in production SQL Server 2005 and we use it's full text search for a eCommerce site search of a million product database. I've optimized it as much as possible (I think) and we're still seeing search times of five seconds.
(We don't need site scrawl or PDF (etc.) document indexing features... JUST "Google" speed for s...
Is there a way to copy View output column headers along with the data? There is a setting in Options to include column headers with query results, but that only works with "New Query" and Stored Procedure output.
Looks like SSMS 2008 has this functionality built in to the contextual menu when you right click on results, but I only have...
i want to know, how to write subquery in between SELECT and FROM as
SELECT Col_Name,(Subquery)
From Table_Name
Where Some_condition
...