Viewing 15 posts - 2,521 through 2,535 (of 2,647 total)
GSquared (9/26/2011)
A view is just a pre-written Select statement. It doesn't store any data except the query. When you query...
September 26, 2011 at 9:20 am
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...
September 26, 2011 at 9:15 am
Place the installation disk back in and make sure you install the management tools. 🙂
Thanks,
Jared
September 26, 2011 at 7:58 am
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...
September 23, 2011 at 7:52 am
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...
September 22, 2011 at 1:23 pm
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...
September 22, 2011 at 1:20 pm
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
September 22, 2011 at 12:50 pm
I still don't understand why you are using dynamic SQL. Just create 1 temp table and insert into it.
Thanks,
Jared
September 22, 2011 at 12:49 pm
I would create a temp table and insert into it, then update it. Why would you choose to use dynamic SQL? 🙂
Thanks,
Jared
September 22, 2011 at 12:45 pm
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...
September 22, 2011 at 10:45 am
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...
September 22, 2011 at 10:38 am
abhijay.singh (9/22/2011)
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...
September 22, 2011 at 7:24 am
palash.gorai (9/22/2011)
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 *...
September 22, 2011 at 5:19 am
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,...
September 21, 2011 at 3:31 pm
Viewing 15 posts - 2,521 through 2,535 (of 2,647 total)