Viewing 15 posts - 8,866 through 8,880 (of 10,144 total)
You have a statement in there for printing the SQL string
print @lstr
Have a look at the statement it generates. You will see that there are quotes missing.
January 29, 2009 at 5:33 am
When you EXEC @lstr, it's executing in a different scope and the variables created in the body of the batch are not available to that scope.
Consider using sp_executesql, which supports...
January 29, 2009 at 5:15 am
It looks simple enough to get away with this, but check your performance:
INSERT INTO TableA
(ColA1,
ColA2,
ColA3)
SELECT ColB1,
SUM(ColB2) AS ColB2,
SUM(CASE WHEN ColB4 BETWEEN 0 AND 10 THEN ColB3 ELSE 0...
January 29, 2009 at 4:30 am
You would benefit from adopting table aliases. Really.
Before
INSERT INTO
dbo.tblClients(Client_Short_Name,Client_Long_Name,CountryCode,ClientID)
SELECT LEFT
(dbo.vwImportAllNewClientIDs.Client, 30),
dbo.vwImportAllNewClientIDs.Client,
dbo.vwImportAllNewClientIDs.CountryCode,
dbo.vwImportAllNewClientIDs.
ClientID
FROM dbo.vwImportAllNewClientIDs
After
INSERT INTO dbo.tblClients (Client_Short_Name, Client_Long_Name, CountryCode, ClientID)
SELECT LEFT(c.Client, 30), c.Client, c.CountryCode,...
January 28, 2009 at 7:37 am
A Little Help Please (1/28/2009)
Could this be the problem?
It is a problem, which of course you can deal with because you've now read about the LEFT function in BOL.
So...
January 28, 2009 at 7:18 am
A Little Help Please (1/28/2009)
I think I found the issue, can you tell me how i would truncate the...
January 28, 2009 at 6:58 am
A Little Help Please (1/28/2009)
Thanks again for your time!CheckDate imports only one row one column
27/01/09
Any more suggestions?
Yes - run this:SELECT convert(char(8),date) FROM DealbookV2.dbo.CheckDate
What happens when you run the stored...
January 28, 2009 at 6:20 am
Nobody has replied to this because it was difficult to read through all of the code. I've spent a few moments reformatting it, in particular putting in table aliases, and...
January 28, 2009 at 5:48 am
It's a problem with a subquery in the stored procedure dbo.procImportAllFiles.
Best post the sproc.
January 27, 2009 at 11:15 am
David Fullerton (1/27/2009)
This works Thanks Cris
Thanks for the feedback David.
January 27, 2009 at 10:33 am
Grant Fritchey (1/27/2009)
January 27, 2009 at 10:10 am
GilaMonster (1/27/2009)
Bob Hovious (1/27/2009)
January 27, 2009 at 10:03 am
Bob Hovious (1/27/2009)
January 27, 2009 at 9:48 am
ssetzer (1/27/2009)
January 27, 2009 at 8:52 am
Use the WHERE clause instead?
DELETE b
FROM dbo.ADIM_ASSOCIATE_CONTRACTOR_RawImport b
INNER JOIN dbo.ADIM_ASSOCIATE_CONTRACTOR a
ON a.[EMPLOYEE_NUMBER] = b.[EMPLOYEE_NUMBER]
AND a.[ASSOCIATE_CONTRACTOR_FLAG] = b.[ASSOCIATE_CONTRACTOR_FLAG]
AND a.[DOM_INTL_IN] = b.[DOM_INTL_IN]
AND a.[CFC_NETWORK_ID] = b.[CFC_NETWORK_ID]
AND a.[NAME_PREFIX] = b.[NAME_PREFIX]
AND...
January 27, 2009 at 8:26 am
Viewing 15 posts - 8,866 through 8,880 (of 10,144 total)