Viewing 15 posts - 9,181 through 9,195 (of 10,143 total)
Zahran, there is an error in the provider string in your openrowset statement.
The syntax should be like this
SELECT * from OpenRowSet('SQLOLEDB', 'Server=BARENELL;Trusted_Connection=yes;', 'select SERVERPROPERTY(''MachineName'')')
where BARENELL is the name of...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
December 10, 2008 at 8:40 am
Ouch!
I don't mind working hard at a sport, taking a few risks is ok too, but getting hurt is not on the agenda.
Give me this anytime:
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
December 10, 2008 at 8:25 am
Grant Fritchey (12/10/2008)
Excellent form on the roll.I don't have a good one of flying. However, from here:
http://www.alandallessandrokarate.com/images/shihan_and_foxwoods_pictures.jpg
to here (look way off in the background):
http://www.alandallessandrokarate.com/images/shihan_and_foxwoods_pictures.jpg
Flight was involved.
They don't work, Grant,...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
December 10, 2008 at 8:11 am
GilaMonster (12/10/2008)
I do have a couple of fairly good photos...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
December 10, 2008 at 8:08 am
What values did you assign to startdate and enddate?
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
December 10, 2008 at 7:45 am
Also, why use dynamic sql for this?
SELECT @SQL= 'ALTER TABLE MARKS_SHEET ADD OPTION VARCHAR(50)'
EXEC SP_EXECUTESQL @SQL
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
December 10, 2008 at 7:03 am
Hi Mark
What you'd normally do now is use the output from this bit which you've figured out - which is "bookings" - and use it as a filter in a...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
December 10, 2008 at 6:59 am
Hi Neal
The easiest way to debug dynamic SQL is to print the content of the variable, paste it into a window and attempt to execute it.
Printing your first version gives:
[font="Courier...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
December 10, 2008 at 6:02 am
Zahran (12/10/2008)
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
December 10, 2008 at 5:49 am
Chris Morris (12/10/2008)
Can you see the database ODS in the output generated by this:
SELECT a.* FROM OPENROWSET('SQLOLEDB',
'Trusted_Connection=yes;Integrated Security=SSPI;DataSource=''10.0.172.53'';' ,
'SELECT [name] FROM master.dbo.sysdatabases') AS a
This code...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
December 10, 2008 at 5:38 am
Zahran (12/10/2008)
I get list of databases available in the local server. But I need to retrieve data from Remote server.
What is the name of the database on the remote server...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
December 10, 2008 at 5:14 am
pino_daddy (12/10/2008)
-- converts the GMT time to EST time based on the siebel S_TIMEZONE and S_TIMEZONE_TMP tables.
-- returns the datetime in EST
returns datetime
as
BEGIN
RETURN DATEADD(MINUTE, ISNULL((SELECT TOP 1...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
December 10, 2008 at 5:11 am
Zahran (12/10/2008)
ODS database is not available in the local server. It is available in the remote server. I need get data from remote server.
Thanks for your reply. When I execute...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
December 10, 2008 at 4:52 am
Zahran (12/10/2008)
Hi Chris Morris,Thanks for your reply. When I execute your code I get database available in the local server. Not the remote server(10.0.172.53).
Then you don't need OPENROWSET. Run the...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
December 10, 2008 at 4:44 am
sabarichandru (12/10/2008)
Hi chris,i need a o/p in column .
This will do it:
DECLARE @InputDate DATETIME, @DayCount INT
SET @InputDate = '01-12-2008'
SET @DayCount = 1 + DATEDIFF(dd, @InputDate, GETDATE())
SELECT DATEADD(dd, 1-N.number, GETDATE())...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
December 10, 2008 at 4:42 am
Viewing 15 posts - 9,181 through 9,195 (of 10,143 total)