Viewing 10 posts - 1 through 10 (of 10 total)
I agree with Joe on the best approach, but if you have no control over the table you will need to use the substring, left and right functions of sql...
December 21, 2017 at 10:03 am
Just a guess here, but on the database there is an option called "Nested Triggers Enabled". In your situation I believe this should be set to true. Please verify the...
November 30, 2017 at 3:12 pm
Kind of an odd query, but this might help get you closer.
DECLARE @PatientIDToMatch int = 1
SELECT a.Patients_ID, Count(*)
FROM dbo.PatientTreatment a
...
November 29, 2017 at 10:52 am
Are you able to retrieve the result with the following? It works for me on SQL2016
Select Replace ('abc[def', '[','')
will return
abcdef
November 2, 2017 at 9:37 am
If you are already using Oracle for reporting purposes, then I would tend to keep the tables in Oracle and provide access to those table for the .net app instead...
October 26, 2017 at 10:31 am
It sounds like you need to rethink (as you are doing) the scalability of these applications/databases.
If I understand you correctly, you need additional tables from Oracle for reporting purposes....
October 26, 2017 at 10:20 am
Also, I noticed that your requirement was only to check if the category_id was unique.
In your query, you are checking if category_id and category_name together are unique. (Not sure...
October 11, 2017 at 10:38 am
Some best practice that I use and should help you understand your code better are as follows:
1) Be sure to indent your code blocks
2) I use verbose...
October 11, 2017 at 10:34 am
the only thing I can see is that you do not have the BEGIN/END block for the creation of the procedure: Compare my code below to yours.
[code...
October 11, 2017 at 10:29 am
If I understand your requirements correctly, this should do the job: Notice that I added the where condition to the delete
CREATE PROCEDURE delete_asset_log
@assetlog_id INT
AS
BEGIN
IF EXISTS...
October 11, 2017 at 9:40 am
Viewing 10 posts - 1 through 10 (of 10 total)