...>= DateADD(year,-@Years,GetDate()) and convert(datetime,b.dateval) <= getdate()
with
DATEDIFF(day, convert(datetime,b.dateval), getdate()) <= @Years*365)
which also has the convert date statement, it doesn't give me the error, which made me think the error message was wrong.
The following statement works in some spots and not in others: convert(datetime,b.dateval) >= DateADD(year,-@Years,GetDate()) and convert(datetime,b.dateval) <= getdate()
b.dateval is a char and @years is an int.
It works when I have it in a basic where clause, but it doesn't work if I have...
...source drop down box. Which I think what you were asking me to verify. Anyway, I went back to the query and just to be sure I wasn't missing something somewhere, I changed the select statement from select table.column1, table.column2, etc. to select *. Believe it or not that worked.
Thanks.
To create a new form, I copied and pasted from another form that was very similiar. In the new form I changed the form properties to point to the new datasource (among other changes). Now when I run and open the new form, I can't edit any of the fields. I can set focus on the fields and can...
I have a cross tab report that is rather wide and long and spans multiple pages. It exports properly to HTML and Word, but when I export to PDF the column labels, the row labels, and page numbers do not print on the pages that are too wide, but do print on the pages that are too long. Does...
Yeah, didn't work. Thanks anyway. If you have any other ideas, let me know. I may have to resort to sending the guy several files with each of the create table statements in their own file.
I'm using TOAD. I am hitting the green execute statement arrow. I am creating this file to pass along to someone else. I have no idea how they will execute it. I am just running it to make sure it runs cleanly. I assume if it doesn't work how I am running it, it won't work how this person...
I feel so stupid that I can't figure this out. I am writing a script that creates several tables. Essentially it starts out as:
create table x(
a number,
b number);
create table y(
c number,
d number);
create table z(
e number,
f number);
begin
--my variable declaration
-- a bunch of...
I am passing in a string to my report. It works if the string I pass in is less than 250 chars, but if it is greater, I get teh following error: 'Value does not fall within the expected range.' How do I resolve this?
There is a length limit option for the parameter, which I tried setting...
I have a string that contains values seperated by commas. I want to use these values in my IN clause.
This is what I mean:
to simplify
branch_string char(10);
branch_string := '1,2,3,4';
select * from branch where branch_id in (branch_string);
How can I do this?
Thanks in advance.
I am using a formula to create a string. The string is long and wraps, but I would prefer to control this with line breaks. I have looked through the functions in the formula editor, but haven't found anything. Is this something I can do? Does anybody know the syntax to do this?
Evaluate for each and reset never causes the branches to total together. I want a running total, but for each branch to have it's own running total. These were my results:
January
Branch Count YTD Count
Branch 1 4 4
Branch 2 8 12 (should be 8)
Total 12 12...
...and a report total plus all those but based on ytd. See my simplified illustration:
January
Branch Count YTD Count
Branch 1 4 4 ** (see comment)
Branch 2 8 8 ** (see comment)
Total 12 12 (is correct)
February
Branch 1 6 6 (should be 4 + 6 = 10)...
...and a report total plus all those but based on ytd. See my simplified illustration:
January
Branch Count YTD Count
Branch 1 4 4 ** (see comment)
Branch 2 8 8 ** (see comment)
Total 12 12 (is correct)
February
Branch 1 6 6 (should be 4 + 6 = 10)...
I had tried that and tried it again to be sure, but it doesn't work. Thanks for replying. I have a feeling it has to do with the bottom 3 lines where the Incident table is joined to variables.
The below sql is not bringing back the results I want. I have tried using joins, which I think are the answer, but obviously it still isn't working.
The Lookup table is suppose to bring back the different severity types ie) Catastrophic, Serious, Major, Minor. All the incidences in the...
I have read all the guidelines, but everything I have found so far is for version 9 and under. I haven't found any guidelines for .net. I am using what I found so far and trying different things, but so far none of them have worked, but I still have more things to try. All hope isn't lost yet.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.