Viewing 15 posts - 12,016 through 12,030 (of 13,461 total)
I think something using BETWEEN would be my suggestion:
AND d2.trade_date BETWEEN getdate() -730 AND getdate()
or
AND d2.trade_date BETWEEN '01/01/2007' and '01/01/2008'
September 18, 2008 at 3:39 am
i had a similar issue with an Oracle provider; the provider would strip out/replace CrLf and tabs with a space in a statement being executed...
so a statment like this:
SELECT STUFF,
MORESTUFF...
September 17, 2008 at 12:08 pm
you'll get better responses if you can post what you are actually doing...theoretical questions get loosy goosy answers...the more detailed your question, the more detailed an answer you can receive.
you...
September 17, 2008 at 11:55 am
the trick is to use the REVERSE function and charindex.
I've broken it down step by step so you can see what's happening, along with a final long formula:
[font="Courier New"]
DECLARE @str...
September 17, 2008 at 10:29 am
what you want to do is look at the books online examples for sp_executesql; look specifically at the OUTPUT parameters.
here's an example directly modified from BOL: I'm selecting an arbitrary...
September 16, 2008 at 11:09 am
well the KB article mentions it might take a long time for a trigger to compile, depending on the trigger.... since it just takes a while, but still works, i...
September 15, 2008 at 8:52 am
ok, I'm making a lot of assumptions, like ther emust be 3 more items added for EVERY item that's in your sample table. if an item overlaps where id_3, you...
September 12, 2008 at 12:30 pm
I'm watching this thread because others more knowledgable than me might throw something out there.
As far as I know, you can capture the print messages from an application, but not...
September 12, 2008 at 10:41 am
i can emulate the same error if the payments table has a row with nulls in the REFERENCE column.
other than that, maybe it's a difference in coallation between the two...
September 11, 2008 at 8:21 am
two things i see...can reference be null in the payments? also i prefer to use a left join syntax instead..
1a - select * from import_cc_requests where reference not in (select...
September 10, 2008 at 6:30 pm
yeah i think we need to see the trigger code itself...it might not be designed to handle multiple rows on insert or something basic like that.
show us the code so...
September 5, 2008 at 9:30 am
that's actually a good question.
It kind of depends on your data...
I'm still playing with Jeff Moden's awesome example, but with the openrowset function, I think you need to know the...
September 4, 2008 at 5:27 am
here's just a couple of things that I see wrong with your on-the-fly code:
1. SET "@TblName = (your code) would return null if a full part tablename wasn't passed...
September 3, 2008 at 10:47 am
make sure your data fields are NVARCHAR, not plain old varchar.
after that, make sure when you are inserting the data that you specifically cast them as nvarchar...selecting a varchar into...
September 1, 2008 at 9:11 pm
it looks like you are just trying to make a single procedure return a variety of different values...sort of a do-all proc.
I would suggest getting rid of the case...
August 30, 2008 at 5:57 am
Viewing 15 posts - 12,016 through 12,030 (of 13,461 total)