Forum Replies Created

Viewing 15 posts - 541 through 555 (of 1,124 total)

  • RE: How to find ConnectionString

    Connections are not specific to or dependent on client machines. All they need the connection information (i.e. provider, data source, credentials etc.) to access the server.

    Here is a few...

  • RE: Connecting to Reporting Services using Management Studio

    Yes, you can connect to a report server from SSMS....

  • RE: with out using the cursor/while

    There are many articles on this forum that solves the running total problems....

    Here is one of the article by Jeff Moden on Solving the "Running Total" & "Ordinal Rank" Problems...

  • RE: How To Save Unicode Data in SQL server

    SQL Server supports Unicode data for the data types nchar, nvarchar & ntext, so you might be missing something in the front end application or in the procedure...

  • RE: Make the stored procedure to run daily

    What is the problem in using a JOB to execute? After all, jobs are meant to there for this type of actions.

    Well, other option I know, is to create...

  • RE: Remote query

    You can try using the SQLOLEDB provider....

    SELECT a.*

    FROM OPENROWSET('SQLOLEDB.1',

    'SERVER=10.4.51.55;UID=energymeter;PWD=readhouse',

    'SELECT * FROM rais.dbo.energy_meter_house') AS a

    ORDER BY a.emp_no, a.empname

  • RE: case statements to insert/update

    You can't do this using CASE statement, you can to handle this using 2 DML statements....

    INSERTmytable( SomeColumn )

    SELECTSomeColumn

    FROMtest_table

    WHEREisnew = 1

    UPDATEmt

    SETmt.SomeColumn = tt.SomeColumn

    FROMmytable mt

    INNER JOIN test_table tt ON tt.isnew = 0...

  • RE: Multi-Part Identifier Cannot be Found error message

    This is because you are mixing using the old-standard non-ansi method of joining, i.e. relations are added to WHERE clause instead of ON clause. So, in this query, the...

  • RE: better solution than using the full outer join index

    Can you re-do the test with the same update applying on my version of the query & post back the results? 'Cause I've a strong feelin' that it should...

  • RE: insert rows to other table

    How about doing this with DELETE & OUTPUT clause???

    DECLARE@iRowCount INT,

    @iBatchSize INT,

    @sdtCurrentDate SMALLDATETIME,

    @sdtDeleteAfterDate SMALLDATETIME

    SELECT@iRowCount = 1,

    @iBatchSize = 5000,

    @sdtCurrentDate = CONVERT( VARCHAR(8), GETDATE(), 112 ),

    @sdtDeleteAfterDate = DATEADD( YEAR, -2, @sdtCurrentDate )

    WHILE (...

  • RE: Sql Server 2000 Enterprise Manager

    Do you see the created logins in syslogins table?

  • RE: better solution than using the full outer join index

    Sander A. (2/9/2009)


    Interesting solution. But i don't see this working in my situation. In real world the columns of the statistics table and the kpi table are very different. So...

  • RE: Can't store results from EXEC into variable

    Assuming that the procedure returns a resultset, in which case, the results can only be stored in a temporary/permanent table or a table variable. So, you have do something...

  • RE: delete duplicates

    Here is a CTE based solution....

    ; WITH EmployeesCTE

    AS

    (

    SELECTROW_NUMBER() OVER( PARTITION BY EmpID, EmpName ORDER BY EmpID ) AS RowNumber,

    EmpID, EmpName

    FROMEmployees

    )

    DELETE

    FROMEmployeesCTE

    WHERERowNumber != 1

  • RE: multiple insert

    How about a set based approach?

    INSERT@state( stateid, userid, userstate, date )

    SELECTm.stateid, u.userid, m.userstate, m.date

    FROM@users u

    INNER JOIN SomeUserAndStateMapping m ON u.userid = m.userid

Viewing 15 posts - 541 through 555 (of 1,124 total)