Viewing 15 posts - 1 through 15 (of 19 total)
Hi,
Yes I am trying to insert rows into the Location table FROM ExternalSource.
Let me try explain it this way:
As the query selects the rows from ExternalSource, it needs to do...
July 4, 2012 at 11:44 am
Ok so here is the updated sql for the second insert into the Location table, I think this might help:
select 1 as CompanyID, max(Loc.LocationID) as ParentID, ES.locname2 as LocationName, 1...
July 3, 2012 at 11:29 am
Hi
If you look at the source table (ExternalSource) you will see there are two Floor2 under locname2.
Now, a simple distinct will only return one Floor2 I.e.
Floor1
Floor2
However, based on the previous...
July 3, 2012 at 10:49 am
Hi,
Thanks for taking the time to get back to me.
I have updated the post to make more sense and per your suggestion.
If there is anything I still missed please let...
July 3, 2012 at 12:47 am
Hi Lenny.
I've tried that still no change.
Values in the OrderId column is of int data type.
August 18, 2008 at 2:20 pm
Perhaps I should just mention that the query executes just fine when I don't use the ISNULL function. Only as soon as I add it I get the error.
August 18, 2008 at 2:08 pm
Thanks for the reply.
That that cut of my code was a bit incomplete.
Below is a more complete cut:
DECLARE @sqlScript1 VARCHAR(8000)
DECLARE @fileName VARCHAR(8000)
SET @fileName = 'C:\Book1.xls'
SET @sqlScript1 = 'SELECT *...
August 18, 2008 at 1:54 pm
Thanks for all the replies.
Thats exactly what I was looking for.
R
June 8, 2008 at 12:30 am
Gail, thank you, what you said made sense and I reworked the query accordingly.
Thanks for your help.
May 28, 2008 at 4:39 am
Hi,
You could look into OPENXML which takes a xml document as parameter
See below for an example to get you started.
DECLARE @idoc int
EXEC sp_xml_preparedocument @idoc OUTPUT, @xmlString
INSERT INTO uClient
FROM OPENXML (@idoc,...
May 21, 2008 at 1:56 am
😀 Oh YAY!!!
Thanks guys, this has been buggin me soooo much.
If I think back now I can recall that someone also showed me this technique before, a bit to...
March 20, 2008 at 8:13 am
Ahh great 🙁
I just replace the query string back into the OPENQUERY and still it give me:
Incorrect syntax near '+'.
March 20, 2008 at 7:47 am
Ok, I did that and yes the query run perfect with the output of SELECT @SQL.
March 20, 2008 at 7:36 am
Yes the query run just fine when I hard-coded the value of @month in my original OPENQUERY query.
What am I doing wrong here? :hehe:
March 20, 2008 at 7:23 am
Hi,
Thanks for getting back to me.
I did exactly as you recommended, and the sql does infact return exactly what it should.
However, the final step in which I pass the param...
March 20, 2008 at 6:55 am
Viewing 15 posts - 1 through 15 (of 19 total)