Viewing 15 posts - 5,026 through 5,040 (of 7,191 total)
Do you need to use dynamic SQL at all? For the example you gave, it sounds like a simple stored procedure, with parameters but no dynamic SQL, will do...
October 11, 2011 at 8:46 am
One question answered out of three, so I'm still guessing. Here's what I can tell you:
(1) Your SQL Server service account needs to have a login on the remote...
October 11, 2011 at 1:33 am
Why have you removed the -E switch? Are you running the command interactively, or is it running in a job step? Is the server you're trying to connect...
October 10, 2011 at 7:30 am
Raymond van Laake (10/7/2011)
it finishes within a second or so, with an error
The error message would assist with diagnosis of your problem. By the way, you don't need the...
October 7, 2011 at 6:29 am
L' Eomot Inversé (10/7/2011)
Now that you mention it, that certainly looks like a possible explanation. Much more likely than a spontaneous improvement.
Yes, that and the fact that Steve added...
October 7, 2011 at 6:20 am
Connecting to the wrong server? Caps lock on? Fat fingers? You're really going to have to work this one out for yourself, since none of us know...
October 6, 2011 at 8:27 am
That's worth considering. Maybe the query optimizer is smart enough to do that automatically; maybe it isn't. The only way you'll know is by comparing the two actual...
October 6, 2011 at 8:09 am
Run the SELECT statement on its own - you'll see why you can't use it to update a single column.
John
October 6, 2011 at 6:18 am
SELECT
t1.[Name]
,MAX(t2.Entry_Date) Last_Entry
FROM
Table_1 t1
LEFT JOIN
Table_2 t2 ON t1.[Name] = t2.[Name]
GROUP BY
t1.Name
John
October 6, 2011 at 5:59 am
Don't be so hard on yourself, especially as steveb also mentioned it in his post! In any case, I've seen plenty of people posting in the wrong forum, so...
October 6, 2011 at 4:41 am
L' Eomot Inversé (10/5/2011)
October 6, 2011 at 3:46 am
Test
toddasd (10/5/2011)
October 6, 2011 at 2:14 am
kevin4u06 (10/5/2011)
Enter '-?' for help
There's your clue. Run [font="Courier New"]sqlcmd -? [/font]in order to get the proper syntax.
John
October 5, 2011 at 9:26 am
sqlcmd is preferred to osql, but I agree - why not use a linked server?
You may also wish to investigate Service Broker, or create another SSIS package that runs the...
October 5, 2011 at 8:43 am
Check out the syntax by running [font="Courier New"]sqlcmd /?[/font]. I think the switch you need for a trusted connection is /E. Don't forget you must be logged on...
October 5, 2011 at 8:38 am
Viewing 15 posts - 5,026 through 5,040 (of 7,191 total)