Forum Replies Created

Viewing 15 posts - 1 through 15 (of 48 total)

  • RE: Backup into shared folder failed - Cannot open backup device

    Thank you. Using Net Use solved the problem.
    Also here https://www.mssqltips.com/sqlservertip/3499/make-network-path-visible-for-sql-server-backup-and-restore-in-ssms/  is a...

    ___________________________________
    Computer Enterprise Masoud Keshavarz
    I don't care about hell.
    If I go there I've played enough Diablo to know how to fight my way out.

  • RE: Missing login....but still connects !

    Is there any way to disable a user in visual way?

    I cant see red arrow even if I remove all role memberships for a user.

    ___________________________________
    Computer Enterprise Masoud Keshavarz
    I don't care about hell.
    If I go there I've played enough Diablo to know how to fight my way out.

  • RE: trigger

    Sorry it had syntax error, try this:

    CREATE TRIGGER triggerName ON test.dbo.rental

    FOR INSERT

    AS

    DECLARE @VEHNO AS NVARCHAR(8)

    DECLARE @CUSTNO AS NVARCHAR(5)

    SELECT @VEHNO=VEHNO,@CUSTNO=CUSTNO FROM INSERTED

    IF

    (

    (NOT EXISTS (SELECT 1 FROM test.dbo.CUSTOMER where id = @CUSTNO))

    OR

    (EXISTS...

    ___________________________________
    Computer Enterprise Masoud Keshavarz
    I don't care about hell.
    If I go there I've played enough Diablo to know how to fight my way out.

  • RE: trigger

    I didn't test it, but it should be fine

    CREATE TRIGGER triggerName ON tableName

    FOR INSERT

    AS

    IF NOT EXISTS (SELECT 1 FROM customerTable where id = 'customerID')

    OR

    IF EXISTS (SELECT 1 FROM rentedCarsTable WHERE...

    ___________________________________
    Computer Enterprise Masoud Keshavarz
    I don't care about hell.
    If I go there I've played enough Diablo to know how to fight my way out.

  • RE: how to use switch statement to get multiple values

    It would be best if you break your table structure into 3 tables but for this particular architecture there is no way unless something like this:

    SELECT * FROM LeaveType WHERE...

    ___________________________________
    Computer Enterprise Masoud Keshavarz
    I don't care about hell.
    If I go there I've played enough Diablo to know how to fight my way out.

  • RE: Merge in stored procedure

    Sorry I think I asked my question in wrong section. I just searched for 'oracle' with ctrl + F through my web browser and I'm in here.

    I working with oracle...

    ___________________________________
    Computer Enterprise Masoud Keshavarz
    I don't care about hell.
    If I go there I've played enough Diablo to know how to fight my way out.

  • RE: connecting but no data

    This link might be helpful:

    http://webcheatsheet.com/php/connect_mssql_database.php

    ___________________________________
    Computer Enterprise Masoud Keshavarz
    I don't care about hell.
    If I go there I've played enough Diablo to know how to fight my way out.

  • RE: SQL Server developer entry level jobs

    I don't care what requirement is, I send my resume for them any way.

    And even if you fail in interview its still good, because you can research about questions they...

    ___________________________________
    Computer Enterprise Masoud Keshavarz
    I don't care about hell.
    If I go there I've played enough Diablo to know how to fight my way out.

  • RE: Need to write a select query to pull required data from 3 tables.

    kumariannapureddy (3/19/2014)


    SELECT EI.EmplID,ER.Designation FROM #EmpIDs AS EI

    INNER JOIN #EmpRoles AS ER

    ON EI.EmplID = ER.EMPID

    WHERE EI.EmplID IN (1,3)

    UNION ALL

    SELECT * FROM #LatestRoles

    ORDER BY EmplID

    You shouldnt write queries that work only with...

    ___________________________________
    Computer Enterprise Masoud Keshavarz
    I don't care about hell.
    If I go there I've played enough Diablo to know how to fight my way out.

  • RE: Need to write a select query to pull required data from 3 tables.

    WITH CTE (EmplID,previousRole,currentRole) AS

    (

    SELECT #EmpIDs.EmplID,

    #EmpRoles.Designation AS [Previous Role],

    #LatestRoles.Designations AS [Current Role]

    from #EmpIDs

    INNER JOIN #EmpRoles ON #EmpIDs.EmplID...

    ___________________________________
    Computer Enterprise Masoud Keshavarz
    I don't care about hell.
    If I go there I've played enough Diablo to know how to fight my way out.

  • RE: Data Manipulation Question

    I prefer to write this kind of queries with this technique:

    Select

    (SELECT DOB FROM [Table] WHERE DOB IS NOT NULL) AS DOB,

    (SELECT LNAME FROM [Table] WHERE LNAME IS NOT...

    ___________________________________
    Computer Enterprise Masoud Keshavarz
    I don't care about hell.
    If I go there I've played enough Diablo to know how to fight my way out.

  • RE: 17GB of data. Database is 290GB. Why???

    Try it, in SQL Server Management Studio right click on your database and choose "tasks --> shrink --> Databases"

    ___________________________________
    Computer Enterprise Masoud Keshavarz
    I don't care about hell.
    If I go there I've played enough Diablo to know how to fight my way out.

  • RE: Calculation as per Clock IN/OUT

    I don't want to do spam, but there is something misty in your table relations for me.

    You said you found a solution with cursor approach, but i can not find...

    ___________________________________
    Computer Enterprise Masoud Keshavarz
    I don't care about hell.
    If I go there I've played enough Diablo to know how to fight my way out.

  • RE: Is sp_executesql reliable?

    In my opinion there is no need to checking sys.objects for the code given in the original post 😀

    DECLARE @sql AS NVARCHAR(MAX)

    SET @sql = N'Select something from ' + QUOTENAME(@TableName)...

    ___________________________________
    Computer Enterprise Masoud Keshavarz
    I don't care about hell.
    If I go there I've played enough Diablo to know how to fight my way out.

  • RE: Is sp_executesql reliable?

    Thanks Grant Fritchey, Ill take a look at that.

    According to this:

    Now to add to my troubles:

    how QUOTENAME('abc[]def') produce [abc[]]def] ? 😀

    Well, Its a new question. Ill ask it in a...

    ___________________________________
    Computer Enterprise Masoud Keshavarz
    I don't care about hell.
    If I go there I've played enough Diablo to know how to fight my way out.

Viewing 15 posts - 1 through 15 (of 48 total)