Viewing 15 posts - 151 through 165 (of 2,006 total)
You've used your variable in a different context to where it is defined.
Try: -
set @SQL1 = ' Insert into [dbo].[sapINV1]
(DocEntry,
Dscription,
Currency,
LineTotal,
AcctCode,
OcrCode,
[Source]
)
select
DocEntry,
Description,
Currency,
LineTotal,
AcctCode,
OcrCode,
'+CHAR(39)+@dbname+CHAR(39)+'
from ' + @dbpath1
set @dbpath2 = '[TBX-APP01].' + @dbname...
November 5, 2013 at 4:46 am
Could do something odd like this: -
WHERE Names = STUFF(Names,1,1,'A')
That'd tell you if the "Names" started with an A.
October 25, 2013 at 6:48 am
From what I can tell after a quick look, your issue is that with the lower memory setting SQL Server decides to do a hash match, whereas with more memory...
October 25, 2013 at 6:36 am
sharky (10/24/2013)
The following is a Sample OF an XML field I want TO Modify:
DECLARE @TestTAb AS TABLE(ID INT IDENTITY PRIMARY KEY, XMLText XML)
INSERT INTO @TestTAb(XMLText) VALUES(
'
<main>
...
October 24, 2013 at 9:01 am
Rakesh.Chaudhary (10/24/2013)
I am using Drop and create table in Loop because of results I want to achieve using loop. But my question is
Is this better to use Truncate table...
October 24, 2013 at 7:11 am
kiran.rajenimbalkar (10/24/2013)
Hi Expert,thanks its worked but that was very complex.
cant we do directly with using that tmp table?
we need count of that name coulmn values
Everything is complicated to someone that...
October 24, 2013 at 7:07 am
kiran.rajenimbalkar (10/24/2013)
what is [DelimitedSplit8K] in your sql ?
Did you just copy and paste without reading what I wrote? Let me show you the relevant section that I'm talking about. ....
October 24, 2013 at 6:31 am
Not exactly sure what you're trying to do. Here's my stab in the dark: -
SELECT ID, NAME, COUNT(*) AS [COUNT]
FROM tmp
CROSS APPLY [dbo].[DelimitedSplit8K](NAME,' ')
WHERE Item LIKE '%[[]%]%'
GROUP BY ID, NAME
ORDER...
October 24, 2013 at 5:31 am
NineIron (10/23/2013)
I'm using 2008. How do I change the compatibility? What do I change it to?
SELECT compatibility_level, name
FROM sys.databases;
Execute the above. The database that you're working on will have a...
October 23, 2013 at 6:13 am
Beatrix Kiddo (10/23/2013)
October 23, 2013 at 6:08 am
ramos.ferdinand (10/17/2013)
cadavre i would really appreciate it if you can walk me through on your query. the stuff and xml path are all new to me.
Thanks...
October 23, 2013 at 5:37 am
NineIron (10/23/2013)
Msg 139, Level 15, State 1, Line 0
Cannot assign a default value to a local variable.
Msg 137, Level 15,...
October 23, 2013 at 5:33 am
Don't know if it's any better, but an alternative is: -
SELECT DateStarted, RowID, ProductID
FROM (SELECT DateStarted, RowID, ProductID,
MAX(DateStarted) OVER(PARTITION BY ProductID) AS MaxDateStarted
...
October 17, 2013 at 3:18 am
ramos.ferdinand (10/17/2013)
Cadavre, yes you hit it right! I wanted the result you've posted. But the solution...
October 17, 2013 at 3:13 am
My girlfriend wouldn't understand it if I spoke to her. She doesn't want to understand it, so no point in using analogies. At best, I'd get the smile and nod...
October 16, 2013 at 8:38 am
Viewing 15 posts - 151 through 165 (of 2,006 total)