Viewing 15 posts - 151 through 165 (of 244 total)
--oops i forgot to put the hours in there...the below should do it
create table #temp
(
id int
, utctd datetime
, produced int
)
insert into #temp
select 1, '2009-01-28 06:09:34.563', 140 union all
select 1...
January 29, 2010 at 12:45 pm
i probably should have used a cte just to get into the habit.
January 29, 2010 at 12:37 pm
--create table #temp
--(
--id int
--, utctd datetime
--, produced int
--)
--insert into #temp
--select 1, '2009-01-28 06:09:34.563', 140 union all
--select 1 ,'2009-01-28 06:49:11.261', 150 union all
--select 1 ,'2009-01-28 06:56:21.123', 160 union all
--select 1...
January 29, 2010 at 12:36 pm
so when he's running
select * into pqchildren from #pqchildren
then whatever db you are in you will see a new table called pqchildren
the below will obviously drop the newly...
January 29, 2010 at 12:02 pm
the only reason i can think he would have done that is because when he does the "into" statment he is actually creating a real table w/ that name and...
January 29, 2010 at 12:01 pm
it may also be that there are no indexes in prod or dev. just that dev has tons less data than prod.
January 28, 2010 at 3:16 pm
create table #distCats
(
CurrentCategoryArea varchar(200)
)
insert into #distCats
select distinct CurrentCategoryArea
from CurrentCompetitorCategoryArea
--then later in your join rather than having
INNER JOIN dbo.CurrentCompetitorCategoryArea CA
ON MT.categoryArea = CA.CurrentCategoryArea
--change it to
INNER JOIN...
January 28, 2010 at 2:59 pm
--this version has unique pc+profile_id's
drop table #savingstemp
--===== Create the test table with
CREATE TABLE #savingstemp
(
pc_profile_id int,
shutdown_Time datetime NULL,
hibernate_Time datetime NULL,
sleep_Time datetime NULL,
startup_Time datetime NULL,
status varchar(50),
subpolicy_name varchar(50),
building_name varchar(50),
hours_off_day int,
day_hour_rate float,
hours_off_night int,
night_hour_rate float,
pc_kwh_rate...
January 27, 2010 at 3:54 pm
now i know this may sound stupid but i'm trying to figure out what your saying your problem is. if you saying you that both result set should return the...
January 27, 2010 at 3:53 pm
when u say crazy results can you explain. Are you saying the two chunks of sql should return the same result set?
January 27, 2010 at 3:45 pm
--here is ur code w/o the two errors mentioned above
drop table #savingstemp
--===== Create the test table with
CREATE TABLE #savingstemp
(
pc_profile_id int,
shutdown_Time datetime NULL,
hibernate_Time datetime NULL,
sleep_Time datetime NULL,
startup_Time datetime NULL,
status varchar(50),
subpolicy_name varchar(50),
building_name...
January 27, 2010 at 3:38 pm
insert #savingstemp (pc_profile_id, shutdown_Time, startup_Time, status, subpolicy_name, building_name, day_hour_rate, night_hour_rate, pc_kwh_rate)
SELECT '2', '02/01/2009 11:02:08', '02/01/2009 16:03:03', 'CLOSED', 'Exempt', 'ORB', '1.2','3.9', '1.9' UNION ALL
SELECT '3', '04/09/2009 11:00:17', '04/09/2009 16:03:00', 'CLOSED', 'Exempt',...
January 27, 2010 at 3:38 pm
i cant get it to run w/o erroring. i've made a few changes and gave up
January 27, 2010 at 3:31 pm
It demonstrates that you are commited to solving your problem.
---------------------------------------------------------------------------
It also gives us all level ground to work from. When you don't provide this sort of info i think we...
January 22, 2010 at 8:45 am
Viewing 15 posts - 151 through 165 (of 244 total)