Viewing 15 posts - 136 through 150 (of 162 total)
Let's make sure I have this right. You have an "OriginalFact" table and you want to populate data into a "DerivedFact" table, using the "prior" month's data if "this"...
January 17, 2012 at 1:28 pm
Celko: Are you saying we should be able to do the following?
DECLARE@OneVARCHAR(20),
@TwoVARCHAR(20),
@ThreeVARCHAR(20)
SET(@One, @Two, @Three) = ('One', 'Two', 'Three')
SELECT@OneAS One,
@TwoAS Two,
@ThreeAS Three
I get an error when using paretheses after the SET...
January 17, 2012 at 12:51 pm
Another possible way to accomplish what you need is to use subqueries to get the parts and left join them to the main table:
SELECT e.emp_id, e.emp_name, e.join_date,
...
January 9, 2012 at 7:21 am
I enjoyed the look at the various method of data access you compared. Thanks for taking the time to put this together.
I do want to comment on your assessment...
December 26, 2011 at 10:40 am
This is a very helpful script. Thank you for posting it.
I am getting several blank lines in the output. It occurs when the "class" column of table "database_permissions"...
December 13, 2011 at 11:11 am
The downside to the methods described is that they require a query to be run on every table. The downside to my method below is that it uses the...
August 24, 2011 at 6:41 am
@Randall: Understand that this is using the sys.sysindexes view that may not be supported in future versions.
SELECTLEFT(OBJECT_NAME (i.id), 50)AS TableName,
LEFT(ISNULL(i.name,'HEAP'), 50)AS IndexName,
CASE WHEN u.object_id IS NULL THEN 'No Data' ELSE...
August 23, 2011 at 9:19 am
It is also helpful to know how much space is used by the index. Here is how I did that:
CONVERT(DECIMAL(8,2), i.dpages / 128.0) AS MBUsed
EDIT: I should note that...
August 23, 2011 at 8:41 am
I use the querying capability built in to Excel to import from SQL Server rather than push things to Excel:
xlApp = GetObject(, "Excel.Application")
xlQueryTable = xlApp.ActiveSheet.QueryTables.Add(Connection:=psConnectString, Destination:=xlApp.ActiveSheet.Range(psCurrentCell))
With xlQueryTable
...
June 23, 2011 at 10:24 am
I've tested it using 36014 characters (list of email addresses) and the response time is under 1 second:
-----------------------
2011-05-25 12:46:54.640
2011-05-25 12:46:55.253
For the few times that I will be using this, that...
May 25, 2011 at 11:53 am
Thanks for the great article and the code that goes with it.
Is there a reason why you chose a VARCHAR(8000) instead of a VARCHAR(MAX)? I modified the provided...
May 25, 2011 at 9:01 am
Thanks for the script. It seems to cover most cases easily. I do have a suggestion. I recently worked on importing data from a similar script and...
May 17, 2011 at 4:36 pm
Thanks for the great series of articles. I started using the extended properties when I got a tool that would create database documentation based on those properties.
I found that...
April 10, 2011 at 12:27 pm
I agree that the UI layer should be passing the correct combination, and there is a problem if it is not. From a defensive programming standpoint, you have created...
February 9, 2011 at 11:29 am
The original code updates every record for the person, irrespective of whether it changes or not. I think updating only the rows that change makes up for any inefficiency...
February 8, 2011 at 2:55 pm
Viewing 15 posts - 136 through 150 (of 162 total)