Viewing 15 posts - 256 through 270 (of 425 total)
getdate()-1 is not "yesterday", but instead a specific time yesterday. So, if processDate is '3/31/2008' it will not be between '3/31/2008 13:01:00' and '4/1/2008 13:01:00'.
you'll need to truncate getdate()...
April 1, 2008 at 11:07 am
yeah, the phrasing of your post sounds like homework. i'm not sure what's considered an 'instance', but the employee table will indeed be referenced 3 times even if it's...
April 1, 2008 at 10:44 am
try this:
select enddate, cast((enddate * 100) + 1 as varchar),
dateadd( day, -1,
dateadd( month, 1,
cast(cast((enddate * 100) + 1 as varchar) as smalldatetime)
)
) as endOfMonth
from
(select 200812 as enddate
union...
April 1, 2008 at 10:38 am
then you should be able to import the same file into both the "rawdata" table and the 'real/parsed' table in the same load script. (you'll need a seperate fmt...
April 1, 2008 at 10:03 am
why not just create a 'real' table, bcp out the rawdata and then bcp that back in with a pipe (|) delimiter to the 'real' table?
April 1, 2008 at 9:18 am
a group by can do what you've described.
select P.pt_id, min(P.name) as name, min(P.dob) as dob,
min( case when C.sequence = 1 then C.amt else null end ) as charge1,
min( case...
March 31, 2008 at 2:09 pm
BIDS crashes when moving items in the header pane even with all the patches and SP1. Anyway, I don't want to have both VS 2005 and 2008 installed.
March 31, 2008 at 12:23 pm
if you can be sure your data has no < symbols (or can live with a character swap), the following approach will work. you can use any function that...
March 31, 2008 at 11:28 am
integer division always results in integers. cast one term to float to get a float.
select cast(3 as float)/4
March 31, 2008 at 11:02 am
well sergei, it wouldn't be the first time i've seen triggers used to try and clean up data that the front-end should handle/restrict.
i am surprised that your Great Plains install...
March 20, 2008 at 8:50 am
we all need to do what we're told, but we shouldn't immediately roll over.
sorry, but my cynicism on pointless requirements has been well honed over the past two decades. ...
March 19, 2008 at 9:36 am
i challenge pointless requirements. i want to know why a requirement exists because i've seen far too many 'requirements' turn out to be unused and unneeded.
what happens if...
March 18, 2008 at 8:57 pm
betcha $20 it's a case of "that is what was said, but this is what was meant". sergei is already spending more time on this than should be necessary...
March 18, 2008 at 7:37 pm
thaya2002 (3/18/2008)
@@FilterTablevarchar(50)= null,
@@FortnightEndDate datetime =null,
@@StartEmployeeNo varchar(50) =null,
@@EndEmployeeNo varchar(50)=null
as
...
-- Create Temporary Table
create table #tmp0 (
... )
-- Populate Temporary Table according to filter criteria
set @sql = 'insert into #tmp0...
March 18, 2008 at 7:26 pm
i think you're making a mountain out of a molehill.
if you open a word, excel, or even a text file and then click file>save, the file will get...
March 18, 2008 at 6:46 pm
Viewing 15 posts - 256 through 270 (of 425 total)