Forum Replies Created

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

  • RE: RDP into server - queries run slow

    Hello,

    This is happening with all queries. Same user windows login used to connect to server.

    Thanks,

    Vasu

  • RE: RDP into server - queries run slow

    Thank you all for responding. Below are the details all of you asked for:

    1. Dataset returned is 1.75 million rows. The query is a simple SELECT query, but aggregating (SUM)...

  • RE: RDP into server - queries run slow

    Thank you for the response. I am sorry for not giving out the SQL box specifications. It has 256 GB RAM, of which 200 GB is dedicated to SQL Server...

  • RE: Dead lock issue

    1. Select statement : owner id=processc59288 is a 'SELECT ... FROM dbo.mtListPrice_view

    ' statement taking a shared lock on BASE table [dbo].[mtListPrice]

    2. Insert statement on BASE table [dbo].[mtListPrice] is taking an...

  • RE: Compare the data in two tables, If Different, Update

    Did you look at EXCEPT operator...may be of use to you.

    ms-help://MS.SQLCC.v10/MS.SQLSVR.v10.en/s10de_6tsql/html/b1019300-171a-4a1a-854f-e1e751de3565.htm

  • RE: I Think This Join Statement is Making Me Crazy(er)

    Hello,

    Please try below query...may be you have to tweak it to suit your requirement....hope this helps

    SELECTdbo.salesExport.businessDate, dbo.salesExport.rvcID

    , dbo.employee.employeeID, dbo.employee.employeeFName, dbo.employee.employeeLName

    , dbo.salesExport.chargedReceipts, dbo.salesExport.grossReceipts - dbo.salesExport.chargedReceipts AS otherReceipts

    ...

  • RE: Index question

    Could you please Provide column Data Types?

    You could could build a nonclustered index as...

    CREATE NONCLUSTERED INDEX <INDEX NAME> ON <Table Name> (<10 col names>)

    Keep in mind, if you have column...

  • RE: computed column in view

    Could you please recheck the CASE statement...I think it should be..

    -- [Jourprod] AS

    CASE WHEN heure_passage BETWEEN '00:00:00' and '05:59:59' THEN day(jour_passage) -2

    ELSE day([date_passage]) -1

    END AS [Jourprod]

  • RE: How to compare parent child data in SQL

    Here is the raw form of the query using CTE's. Please tweak it to suit your requirement....I hope this helps

    ;WITH tblCTE_1

    AS

    (

    SELECT T2.MeterID AS CMeterID, T1.MeterID AS PMeterID, Amount

    FROM dbo.T2

    LEFT JOIN...

  • RE: need to get 12 consecutive presents for last 30 days

    HEllo,

    Not sure whether you recd any help for this. In case you have a solution, ignore this...else try this out and let me know whether it works for you.

    ;WITH DATA...

  • RE: Order by While inserting

    select Name,Two into #temp2 from #temp1

    order by Name

    alter table #temp2

    add <NewColumn ID> int identity(1,1)

    Add ID column later.

    Vasu

  • RE: How do I drop temp tables in Store Procedure?

    In the procedure, add below syntax to drop temp tables if existing...

    IF OBJECT_ID('tempdb..#TempTableName') IS NOT NULL

    DROP TABLE #TempTableName

    After this statement, put in the create temp table...

  • RE: Input Parameter Validation..

    Did you look up ISNUMERIC function. Please look up in BOL. As suggested by Gianluca, I would pass a valid value from the app, validating the value in app itself.

    Thanks,

    Vasu

  • RE: finding Structure of the table

    Hello,

    You can get the last modified date from sys.Tables.

    Select * from sys.Tables.

    As for previous structure, I am not sure whether you could get it back unless you have a source...

  • RE: active users and concurrent users

    Hello,

    Please look up sys.dm_exec_sessions.

    Run the query below to get all active users spid, their login names and other information.

    SELECT * FROM sys.dm_exec_sessions

    WHERE is_user_process =1

    AND session_id <>@@SPID

    Hope that helps.

    Thanks,

    Vasu

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