Viewing 15 posts - 6,121 through 6,135 (of 7,191 total)
I'm sorry, but I still can't work out what you're trying to do. Please will you describe in words what your query should achieve?
Thanks
John
January 30, 2008 at 5:45 am
No, not unless you give us some more information. Please post DLL in the form of CREATE TABLE scripts, sample data in the form of INSERT scripts, a brief...
January 30, 2008 at 4:57 am
Then I think your original code should be OK. But check the execution plan to see whether it is using any index that you expect it to, and if...
January 30, 2008 at 4:04 am
So you're only testing for the NULLness of @Param1 and @Param2? That doesn't relate to the columns at all, and so you're either going to get all the rows...
January 30, 2008 at 3:10 am
A function will only stop an index being used if it's applied to the column, not a parameter or constant.
John
January 30, 2008 at 2:56 am
Assuming the only two values allowed in the type column are CRT and DBT, something like this:
SELECT InvoiceNumber, MAX(type), MIN(type)
FROM MyTable
GROUP BY InvoiceNumber
HAVING MAX(type) > MIN(type)
John
January 29, 2008 at 6:01 am
Debra
If you don't have more than one update in any particualr second, you could do something like this:
select datediff(s,'01 Jan 1980',getdate())
If your updates are more frequent than that, you could...
January 25, 2008 at 9:18 am
Debra
I think the simplest way to achieve what you want is with an identity column. If this is a new table, add the identity column before you insert any...
January 25, 2008 at 7:01 am
Yes, there is. Look up the sys.database_permissions metadata view.
John
January 25, 2008 at 2:36 am
If EXCEPT works for you, then go with it, although I don't think you need to waste time concatenating into a single column - just specify both in the query...
January 25, 2008 at 1:31 am
What happens if you try to assign permissions to individual tables? Choose a table and execute this:
GRANT SELECT ON dbo.MyTable to NPQuiggin
John
January 25, 2008 at 1:22 am
Nigel
According to Books Online:
The names of users that are mapped to SQL Server logins, certificates, or asymmetric keys cannot contain the backslash character (\).
What is the actual name of the...
January 24, 2008 at 9:17 am
Shouldn't be too complicated... what have you tried so far? What I'd do is use a LEFT JOIN to identify which records are to be deleted, and a RIGHT...
January 24, 2008 at 9:10 am
OK, I don't think you can just back that query out. So what you need to do is restore to a different database, then do something like this:
UPDATE d
SET...
January 24, 2008 at 6:51 am
Viewing 15 posts - 6,121 through 6,135 (of 7,191 total)