How do you handle temporal data?
I have requirements that suggest we need to know not just what the value of an attribute is today, but what that value was at any point in time. For example, if you get married this June 10th, queries would show your last name as it was BEFORE you were married...
Anybody work with ITIL? If so, any links to good resources would be exceptionally helpful. I have 11 days to get a decent, basic knowledge of what it is and how to implement.
Thank you,
Gooser
[CODE SQL]
SET @newsql_1 = 'INSERT INTO @egbs_1 VALUES ( ' + @newsql_1 + ' )'
EXEC sp_executesql @newsql_1
SELECT * FROM @egbs_1
[/CODE]
This project is just a thorn in my side! Okay, so the code being passed to sp_executesql here, @newsql_1 had an ORDER BY clause in it. Of course, INSERT...
I'll try to simplify here since the code is thousands of lines long and unnecessarily complex. (not my code.)
What I have is a stored procedure that builds SELECT statements based on literally hundreds of variables and then runs them. I don't wish to duplicate the logic (or even try to...
I have a stored procedure (which is overly complex and written by someone else) that I need to take the results of and put them into tables. The stored procedure uses Dynamic SQL to build and then run 5 SELECT statements based on literally hundreds of variables. I need to take the results of...
I just got my fancy-schmancy two-monitor setup set up. And I was wondering if you can un-dock the results pane in Management Studio. This'd be nice, because it could give me a whole monitor just to write code on, and everything else could be on the other monitor. I poked around in the...
OH NO!
I just tried to script out my stored procedure that I've been working on to continue work on it. I got this error message:
TITLE: Microsoft SQL Server Management Studio
------------------------------
Script failed for StoredProcedure 'dbo.RiskCheckOut'. (Microsoft.SqlServer.Smo)...
So, what if I want to be able to do a cascading delete only in a certain scenario. That is, I don't want to set the tables up with cascade delete, but I do want to be able to cascade delete when I want to.
I found this article...
I have data that includes several trailing spaces. When I run the following query against it, it says "(735 row(s) affected)", but it isn't getting rid of the spaces. Any ideas?
UPDATE [Inspections].[dbo].[ProtectionUnit]
SET [UnitNm] = RTRIM([UnitNm])
The data originated from an...
I have two tables that I want to join using the max value in one as the value in the other.
Tenants
TenantID BuildingID Combustibility
--------- ----------- ---------------
1 1 3
2 2 2
3 2 1
4 2 2
5 3 2...
I have data that is similar to this:
this_id eff_date other_columns
-------- --------- --------------
1 1/1/2000 blah, blah, blah
2 1/1/2000 yada, yada, yada
2 1/1/2004 dobe, dobe, dooo
3 1/1/2001 long, long, long
4 1/1/2005 this, that, uder
4...
Okay, I've mulled this over for quite some time and I'm just not sure how to solve this one. I have a TON of legacy data that needs to be forced into our new schema. I can figure out how to do this on a record-by-record basis, but how do I do this for all of my records at once?
I am rather...
I am MSSQL Server Database Admin for a smallish not-for-profit. Our 'data manager' is proposing that we append the letters 'Cd' to the end of any lookup table. This seems ludicrous to me, but I haven't been able to synthesize my argument against this practice. Any help greatly appreciated...
When I try to run a very simple SELECT query in SQL 2008, I get this:
TITLE: Microsoft SQL Server Management Studio
------------------------------
Failed to start debugger
------------------------------
ADDITIONAL INFORMATION:
Error HRESULT E_FAIL has been returned from a call to a COM...
SELECT a.PersonID
, a.FirstName
, a.LastName
, b.Permission
, b.PermissionGrantor
INTO dbo.Person AS a --This is the
JOIN dbo.Permission AS b --slightly strange part
ON a.PersonID = b.PersonID
FROM dbo.PersonPermission
v/r
Gooser
The Bailout We Need
Our company is builing a website that will accept applications for inspections (physical inspections of properties.)
My gut tells me we need login/password authentication for this system, but the VP of the company says we don't need it, and the users will avoid the website if they have to...
All--
I am a dba at a not-for-profit, but I feel like I am falling behind in my compliance knowledge as a result. What do I need to know about SOX? Any suggestions on good resources? Any comments greatly appreciated.
v/r
Gooser
The Universal Model
I downloaded and installed 7z (from 7-zip.org) because I want to use its command-line interface in a project I am working on. Unfortunately I can only run the 7z.exe from C:\Program Files\7-zip\7z.exe
Is there something I need to do to make an *.exe file available from anywhere in the...
Is there an easy way to output a query to a file? The query will eventually be in a stored procedure that will be run once per day and I need the results of the query to be in a file. Can I do this without using DTS? Any help greatly appreciated, as usual.
v/r
Gooser
The Universal Model
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.