Viewing 15 posts - 3,691 through 3,705 (of 5,394 total)
If you have the right permissions, you could create a temporary table on the target server, populate it with all the data you want to update and the use a...
November 3, 2010 at 3:09 am
No worries, it's just to redirect all the people willing to provide an answer to the same thread.
November 3, 2010 at 2:37 am
Jeff Moden (11/2/2010)
Grant Fritchey (11/2/2010)
November 2, 2010 at 10:59 am
A datetime column stored as varchar(8000)?
Good luck.
Seriously, convert that column into datetime. You won't regret.
There's no safe way to query / update data stored in the wrong format.
November 2, 2010 at 10:57 am
November 2, 2010 at 10:22 am
Sorry for being late at explaining.
I see you figured it out.
Have fun!
November 2, 2010 at 8:52 am
This should do:
-- TABLE DEFINITION
DECLARE @ScriptHistory TABLE (
[CreateDate] [datetime] NULL,
[HostName] [nvarchar](50) NULL,
[HostIP] [nvarchar](15) NULL,
[Step01Result] [nvarchar](255) NULL,
[Step02Result] [nvarchar](255) NULL
)
-- SAMPLE DATA
INSERT INTO @ScriptHistory
...
November 2, 2010 at 8:20 am
November 2, 2010 at 7:56 am
You can't group results of an OUTPUT clause without storing intermediate results into a table.
In this case, it would be the same thing as re-issuing the group by query:
DECLARE @t...
November 2, 2010 at 7:40 am
With SQLExpress you don't have SQLAgent to run backups. You have to manually set up a Windows Scheduled Task to run a backup command.
A simple filesystem backup won't help in...
November 2, 2010 at 7:12 am
This is exactly what I don't get.
What do you mean with "mapping"? Should the minimum ID for each "col" be stored in an additional column in table "t"? Do you...
November 2, 2010 at 7:09 am
Scalar UDFs are generally slow.
Can you post DDL statements for your UDF and involved tables?
November 2, 2010 at 6:51 am
You mentioned two tables, but I can't understand how they come into play.
Can you post:
a) sample initial data in your tables
b) your desidered output in both tables
November 2, 2010 at 6:50 am
I don't know if I understood correctly what you're after.
Give this a try:
DECLARE @t TABLE
(
id INT NOT NULL,
col NVARCHAR(100) NOT NULL
)
INSERT INTO @T
VALUES(1,'A'),(2,'B'),(3,'B'),(4,'B'),(5,'B'),(6,'B'),(7,'B'),(8,'C')
;WITH groupedResults AS (
SELECT MIN(id) AS id, col
FROM...
November 2, 2010 at 5:14 am
Viewing 15 posts - 3,691 through 3,705 (of 5,394 total)