Forum Replies Created

Viewing 15 posts - 2,521 through 2,535 (of 2,647 total)

  • RE: How are views stored in SQL Server?

    GSquared (9/26/2011)


    I guess I'm not clear on what you're asking.

    A view is just a pre-written Select statement. It doesn't store any data except the query. When you query...

  • RE: How are views stored in SQL Server?

    Here is a quote from BOL:

    "A view cannot have an ORDER BY clause, unless there is also a TOP clause in the select list of the SELECT statement

    Note: The ORDER...

  • RE: Error while creating a maintainence plan

    Place the installation disk back in and make sure you install the management tools. 🙂

    Thanks,

    Jared

  • RE: Updation in tables

    From my experience and the execution plan results on a table with over 4 million rows, I see much better performance with the left outer join. I guess like...

  • RE: join two OPENQUERY results

    I looked again at your code. I think you can just insert all into 1 temp table, and then join on itself to get your final outcome. Should be...

  • RE: join two OPENQUERY results

    Crud... I forgot that we cannot pass variables to openquery in this way. Your original script was the only way to do it. I suppose, though, that you could...

  • RE: join two OPENQUERY results

    You can still pass the variable being that the open query syntax is executed as such. So, no need to store it again into a variable and execute it.

    Thanks,

    Jared

  • RE: join two OPENQUERY results

    I still don't understand why you are using dynamic SQL. Just create 1 temp table and insert into it.

    Thanks,

    Jared

  • RE: join two OPENQUERY results

    I would create a temp table and insert into it, then update it. Why would you choose to use dynamic SQL? 🙂

    Thanks,

    Jared

  • RE: query help

    You say more than 2 on different dates, but do you mean within the same day? As I understand it, you want to group on your date column, but...

  • RE: unable to start new sql server 2008 instance

    Start by trying to start the services using SQL Server Configuration Manager. This should give you more detailed errors. Start with the first error it gives, as many times...

  • RE: Updation in tables

    abhijay.singh (9/22/2011)


    Thanks all for replying. I did like this.

    UPDATE e1

    SET e1.empname = e2.empname,

    e1.number = e2.number,

    e1.city = e2.city

    FROM emp1 as e1

    JOIN emp2 as e2 on e1.empid = e2.empid

    INSERT INTO emp1...

  • RE: Updation in tables

    palash.gorai (9/22/2011)


    Hi,

    You can do it by creating SProc.

    ALTER PROCEDURE UPDATE_INSERT

    AS

    BEGIN

    UPDATE EMP1

    SET EMP1.EMPANME = B.EMPANME, EMP1.EMPCODE = B.EMPCODE, EMP1.CITY = B.CITY

    FROM EMP1 A, EMP2 B

    WHERE A.EMPID = B.EMPID

    INSERT INTO EMP1

    SELECT *...

  • RE: Updation in tables

    You then do an outer join for insert.

    Jared

  • RE: Creating Unique Integer in field that is Updateable

    Another thought is to convert the GETDATE() of insertion to UNIX time (I forgot what it is called) by doing this:

    SELECT DATEDIFF(ss,'1970-01-01',GETDATE())

    and concatenating that with the part num as default,...

Viewing 15 posts - 2,521 through 2,535 (of 2,647 total)