Viewing 15 posts - 2,506 through 2,520 (of 7,191 total)
You can't restore a database to a server with a lower version number. That doesn't also apply to the build number, though.
John
July 5, 2016 at 4:42 am
No CASE expression needed - change your WHERE clause:
SELECT DISTINCT [User name]
FROM MeADBA.dbo.DBUserDetails
WHERE [User name] NOT LIKE 'PERLON\%'
AND ([User name] NOT LIKE 'RMH\%' OR [User name] = 'RMH\AdminFunkdoobiest')
John
July 5, 2016 at 3:31 am
Is it as simple as this?
,CASE WHEN [>7 Days] = 1 THEN COUNT(invoiceid) ELSE 0 END AS InvoiceCount
,SUM(CASE WHEN [>7 Days] = 1 THEN 1 ELSE 0 END) as RowCount...
July 5, 2016 at 3:17 am
The snapshot is a sparse file - it starts off small, and as data pages in the source database are changed, the old version of the pages are written to...
July 4, 2016 at 8:07 am
Put a [font="Courier New"]PRINT @sql[/font] line in your code so that you can see exactly what's being executed.
By the way, you ought to use ALTER AUTHORIZATION instead of sp_changedbowner, since...
July 1, 2016 at 7:32 am
You're getting a NULL because the row doesn't exist in the other table. You'll probably want a different status for that. Try something like this
Status = CASE
WHEN TableA.Eno...
July 1, 2016 at 7:12 am
Depends on the workload on the server, whether there are any other instances, etc, etc. I would start with six, test, and adjust as necessary.
John
July 1, 2016 at 5:35 am
I'm not sure whether you can parameterise with an ADO.Net connection. Try changing it to OLE DB, or building your query into a variable and executing that instead.
John
July 1, 2016 at 5:13 am
You're attempting to restore PrismDataBillingTest from a backup of a database with a different name. Use RESTORE HEADERONLY to find out what database(s) are in your backup file. ...
July 1, 2016 at 3:46 am
Start by using PATINDEX to find the position of " admission" and " discharge" in the string. You can then work back from there to find the first instance...
July 1, 2016 at 2:39 am
Yes, and consider using a temp table instead of a table variable. The former has statistics on it and so you're likely to get a better query plan, especially...
June 30, 2016 at 9:42 am
In the last place I worked, the vendor's support team had full access to an application database. Not only that, but they also had access to remotely access our...
June 30, 2016 at 5:28 am
No, the path to the executable - something like this:
"C:\Program Files\Microsoft SQL Server\110\Tools\Binn\sqlcmd.exe" -S . -U sa -P 123 -i "C:\Temp\Plugin\SQL\script.sql
John
June 30, 2016 at 5:13 am
Please post your amended script. What happens if you run the command from a command line instead of within the batch file? Obviously you'll need to substitute parameters...
June 30, 2016 at 4:57 am
Do you still get the error if you specify the path to the executable in your batch file?
John
June 30, 2016 at 4:27 am
Viewing 15 posts - 2,506 through 2,520 (of 7,191 total)