Viewing 15 posts - 766 through 780 (of 1,554 total)
Your problem is CASE and implicit conversions..
A CASE expression can only return one datatype. Which datatype to be returned is determined by the datatype presedence. If you have multiple datatypes within...
November 9, 2005 at 5:41 am
Not an answer - sry - but I'm curious. What's wrong with the securitymodels already in place?
Why not use either windows authentications or SQL logins security models? Seems to me this...
November 9, 2005 at 5:34 am
Noone has yet asked the obvious question...
Why? Why, why, why... Why do you have to use dynamic SQL..?
Have you read this? http://www.sommarskog.se/dynamic_sql.html
It's...
November 9, 2005 at 5:27 am
Carl is correct. For your example with CUSTNO, where that column is the first column declared in the composite index on table2, a separate index on CUSTNO would not grant...
November 9, 2005 at 5:19 am
You have two options without a cursor, one for SS2000, the other for SS2005.
SQL Server 2000: You have to use a while loop (or cursor) and a temptable.
SQL Server 2005:...
November 9, 2005 at 5:11 am
Here's a snippet of something old I had lying around for automating a 'batch-delivery-thingy' to a given set of servers that implements the 'loop from a list' idea. It shouldn't...
November 9, 2005 at 2:58 am
Yes, if you don't have bcp.exe (which is a commandline exe) on your machine, and you cant remote exec it from the server (where I'm sure it is to be...
November 9, 2005 at 2:48 am
Mmm yes think it makes sense. Don't have any packaged solution, though.. But some thoughts.. (I'm sure you're aware of all already...)
Being able to run from any instance requires that...
November 8, 2005 at 3:27 am
Actually, there's no need to check for existing rows on an update, since if rows do exist, they update, and if not, nothing happens. Updates doesn't risk causing pk violations...
November 8, 2005 at 3:17 am
Well, it's not very complicated at all. For each sheet, just choose 'save as' and choose a suitable format (personal pref is semicolon-separated - in office 2003 that's the .csv...
November 8, 2005 at 3:13 am
To add new rows:
INSERT db1.dbo.Emp (col1, col2) SELECT col1, col2 FROM db2.dbo.Emp
To update existing rows:
USE db1
UPDATE a
SET a.col1 = b.col1
FROM db1.dbo.Emp a
JOIN db2.dbo.Emp b
ON a.primaryKey = b.primaryKey
Also, there is more info to...
November 7, 2005 at 8:59 am
You can solve this kind of problems with multiple agregates by nesting derived tables. The idea is that you first find one of the MAX values for the group, then...
November 7, 2005 at 3:10 am
The question is: manual or automagical? Onetime or scheduled?
For manual singleton jobs (I do this pretty often) I just save the Excel sheet as a skv file and bcp it...
November 7, 2005 at 2:52 am
So, what kind of 'flexibility' are you looking for..? There are several 'problems' or 'tasks' within your general description of what you want to do.. (ie find users or find...
November 7, 2005 at 2:27 am
If the problem is 'how do I enter dates', then you shouldn't use '01/11/2005 20:00:00' at all.
This format only leads to confusion and problems (is it november 1st or january...
November 3, 2005 at 3:15 am
Viewing 15 posts - 766 through 780 (of 1,554 total)