Viewing 15 posts - 16 through 30 (of 60 total)
Jeff,
Michael's code worked perfectly. Many thanks to you both.
--Relevant Code
--delete from Mediawerks
SET @Cmd='BCP "select '''+'del '+'''+'+' imageName from inventory.dbo.vwInventoryImages i where datediff(dd,solddate,getdate()) between 7 and 14 and i.storeid='+cast(@storeid as varchar)+'"...
April 6, 2007 at 3:05 pm
Thank You both for your comments. Your time is appreciated.
April 6, 2007 at 7:42 am
Geez, having a bad day Michael?
I can't seem to win sometimes, I give too little info and I get jumped on, I give...
April 4, 2007 at 2:35 pm
I'm surprised nobody has any suggestions...I thought I was just being dense
April 4, 2007 at 1:43 pm
Bradley,
This works for me. Basically you just create the temp table and query it within the same exec. That keeps your temp table from dispappearing before you get the chance...
March 28, 2007 at 10:13 am
Bradley,
I found this article, about accessing temp tables created from dynamic sql:
http://www.sommarskog.se/dynamic_sql.html
"Temp tables created in the dynamic SQL will not be accessible from the calling procedure since...
March 28, 2007 at 9:54 am
Sergiy-
If you can't be polite, why even respond? Its my understanding this forum is about helping one another. Especially, when someone is new to sqlservercentral.com we should try responding with...
March 6, 2007 at 9:20 am
select tblLineItems.orderid,tblLineItems.linenumber,tblLineItems.product,
tblLineItems.reqdby,qty
from (
--for the minimum date, get the minimum linenumber
--use that to join on to pull one row
select LI.orderid,min(LI.linenumber) linenumber
from (
--Get the orderid for the minimum reqdby date
select orderid,min(reqdby) reqdby...
March 2, 2007 at 10:42 am
Hi Bradley,
Take a look and let me know if this will work for you or there is something I misunderstood. When you post try to provide create statements for tables...
March 2, 2007 at 9:43 am
Hi Ted,
Glad to hear you got things working!
Just wanted to post a note about xp_cmdshell. You can find some good info by looking at Books On Line (BOL) about the...
January 17, 2007 at 7:40 am
Hi Ted,
I had the same problem. This code below works for me (a small sample from my production code)....
-- Use BCP to output the view
declare @storeid int set @storeid =...
January 16, 2007 at 1:50 pm
Thanks, that worked!
December 22, 2006 at 6:55 am
PW,
Thanks for your response. Yes, your suggested syntax works.
Not sure why I got on the syntax I did. When I first got started I saw it in an article on...
November 17, 2006 at 3:27 pm
Thanks for the suggestion.
Yes, the table has a primary key. Here's the table definition:
CREATE TABLE [AquisitionSource] (
[AquisitionSourceID] [int],
[Description] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[SortOrder] [int] NOT NULL ,
[Active] [int]...
November 17, 2006 at 3:03 pm
Viewing 15 posts - 16 through 30 (of 60 total)