Viewing 15 posts - 3,586 through 3,600 (of 5,504 total)
kbnyny (5/5/2010)
select t1.ACTNUMBR_1, t1.ACTNUMBR_4, t1.ACTINDX, t1.CREATDDT
from C1.dbo.AN00100 t1 union all
select t2.ACTNUMBR_1, t2.ACTNUMBR_4, t2.ACTINDX, t2.CREATDDT
from C2.dbo.AN00100 t2 union all
select t3.ACTNUMBR_1, t3.ACTNUMBR_4, t3.ACTINDX, t3.CREATDDT
from C3.dbo.AN00100 t3
WHERE...
May 5, 2010 at 3:57 pm
When you do your testing, try the following:
before running your query, add
SET DATEFIRST 1 -- set the first day of a week = Monday
The result of your query might be...
May 5, 2010 at 3:52 pm
keent (5/5/2010)
As for shops that cross over days we...
May 5, 2010 at 3:37 pm
kbnyny (5/5/2010)
ACTNUMBR_1 ACTNUMBR_4ACTINDXCREATDDT
103 6140002909612/28/2006
103 ...
May 5, 2010 at 3:30 pm
Ok, here's how I would do it (assuming it was a typo in your expected result set...)
;WITH cte AS -- transfomr the table into a more normalized structure
(
-- use...
May 5, 2010 at 3:25 pm
I'm a little confused regarding your expected result:
April 3rd 2010 was a Saturday. So the Dallas shop was open 10 till 14.
Why do you expect to see data for hours...
May 5, 2010 at 3:13 pm
Why do you want to do it dynamic?
Based on your sample data I would use a string split function to separate the names (the TallyTable article referenced in my signature...
May 5, 2010 at 2:33 pm
You should consider normalizing your table (e.g. DayOfWeek, OpenTime (DATETIME),CloseTime (DATETIME) )
What would you do with your design if one of the shops decides to open 8:30?
Regarding the DayOfWeek value...
May 5, 2010 at 2:25 pm
It is unlikely that SQL Server will "all of a sudden" display duplicate rows.
It is more likely that you have duplicate entries in one of your table leading and, based...
May 5, 2010 at 2:16 pm
Even if you can't use it in production... It might help you to figure out why the data are cosidered "bad". You could use this information to modify the SSIS...
May 4, 2010 at 5:13 pm
Glad I could help. 😀
But it was just the coded answer Jeff suggested first... (it's usually the other way around 😀 )
May 4, 2010 at 5:03 pm
Something like this?
SELECT *
FROM
(
SELECT 'abc.de' col UNION ALL
SELECT 'abd'
) t
WHERE CHARINDEX('.',col) =0
May 4, 2010 at 4:34 pm
Did you consider using BULK INSERT with an ERRORFILE specified as an option? The additional control file should help to identify the root cause.
May 4, 2010 at 4:18 pm
Why do you want to use SSIS?
I would create a stored proc to send the mail and do the update and once I have that running as expected add a...
May 4, 2010 at 4:11 pm
The query itself looks good, assuming you're either asking for data including '2009-12-31' (e.g. '2009-12-31 09:10:00') or your t1.CREATDDT column is already normalized (= not to include any time portion)
What...
May 4, 2010 at 4:07 pm
Viewing 15 posts - 3,586 through 3,600 (of 5,504 total)