Viewing 15 posts - 5,101 through 5,115 (of 7,191 total)
I see what the issue is here, but I havn't got time to give it much consideration at the moment. The issue is that you have the same person...
September 1, 2011 at 8:23 am
Something like this?
SELECT
ID,
COALESCE(Field1-Field1+1,0)+COALESCE(Field2-Field2+1,0)+COALESCE(Field3-Field3+1,0)+COALESCE(Field4-Field4+1,0)
FROM
(
SELECT 'A' AS ID,1 AS Field1,2 AS Field2,3 AS Field3,4 AS Field4 UNION
SELECT 'B' AS ID,NULL AS Field1,2 AS Field2,3 AS Field3,NULL AS Field4 UNION
SELECT 'C' AS ID,NULL...
August 31, 2011 at 8:25 am
Pratap
You may find that you can't drop a user if it already owns objects. But there's a good way of finding out - try it, preferably on a test...
August 31, 2011 at 3:33 am
Pratap
Are there any objects named MyUser.ObjectName, where MyUser is the user you want to delete? If so, consider using sp_changeobjectowner.
John
August 31, 2011 at 2:08 am
foxjazzG (8/30/2011)
So table variables can only be used in cursor functions.
Not as far as I know. What are you trying to do?
John
August 30, 2011 at 7:59 am
Possibly. It works for the sample data you supplied. Please will you supply some data for which it won't work, and I'll take a look?
John
August 30, 2011 at 1:45 am
Sushant
What is PLU_NUM(float)? Do you just mean float? If you need to compare numbers in a character column with numbers in a numerical column, you will need to...
August 26, 2011 at 8:56 am
Reindex those tables regularly, depending on how much job, backup and maintenance plan activity you have. Here is what I do:
-- Try this on a test server before unleashing...
August 26, 2011 at 8:14 am
What is the relationship between RecNum and RecInd? I've left out RecInd in the solution below because it looks redundant.
The first thing to do is to group by RecNum...
August 26, 2011 at 8:03 am
Or use one of the INFORMATION_SCHEMA views and avoid the need to join at all:
SELECT TABLE_SCHEMA, TABLE_NAME
FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME = 'ItemInsertedWhen'
John
August 26, 2011 at 7:21 am
In that case, you have the risk that tables will be updated between when your SELECT statement starts and when it finishes, possibly causing dirty reads. Using NOLOCK may...
August 26, 2011 at 6:21 am
Henk
I don't know of any way to change the order in which the derived columns are displayed. However, I can't think of any reason why it would be important...
August 26, 2011 at 2:47 am
You can use CURRENT_USER to get the name of the user doing the insert, and then you can look up that user in sys.database_principals to find the default schema for...
August 25, 2011 at 8:56 am
Data_God (8/25/2011)
Could someone explain why the script below allows...
August 25, 2011 at 5:52 am
This problem is not related to just presentation.
Please will you expand on that? What else is it related to?
And i m not having knowledge about VB Macro in...
August 25, 2011 at 1:56 am
Viewing 15 posts - 5,101 through 5,115 (of 7,191 total)