Thanks for responding so quickly, however, is there a way to automatically calculate the number of projects for a specific timeframe without actually entering dates....like a month at a glance? Thanks.
I am using SQL 2005 and I would like to count the number of projects (records) between two dates keeping the current date (getdate) in mind. I am trying to find out how many projects exist between these two dates. I have searched the forum and I cannot find anything pertaining to it.
Thanks for...
That worked with a little tiny tweak:
County =
case when Cty1 IS NULL or len(ltrim(Cty1)) = 0 then '' else ltrim(rtrim(Cty1)) + ', ' end +
case when dbo.Cty2 IS NULL or len(ltrim(.Cty2)) = 0 then '' else ltrim(rtrim(Cty2)) + ', ' end +
case when Cty3 IS NULL or len(ltrim(Cty3)) = 0 then ''...
Hello,
I am still new to this so I apologize for my ignorance. Null would be if it actually had the word "Null" in the field? Blank is if nothing showed in the field at all? They are blank if the above scenario is true. Does this help?
Thank you.
Hello,
It still does not suppress the commas:
PAS, , , , ,
When there are null values for the five additional county fields, it still adds the commas. I used exactly as follows:
rtrim(COALESCE(County_Code_1+',','') + COALESCE(County_Code_2+',','') + COALESCE(County_Code_3+',','') +...
Hi Everyone,
I have the following in a view that I created in SQL 2005:
RTRIM(County_Code_1 +', '
+ County_Code_2 +', '
+ County_Code_3+', '
+ County_Code_4 +', '
+ County_Code_5) As County,
While it serves the purpose of joining all of the fields into one single string, it does not suppress...
PS. I forgot to mention that I would also like to know which table the DeptID and Dept_name would be extracted from since it does exist in tblAppr as well as the newly created table(not listed above).
Thank you.
No, I still have not been successful. I am pasting my query below, maybe this will provide some insight into exactly what I am trying to accomplish:
SELECT tblProjs.ProjID, tblProjs.Perc, tblAppr.DeptID, tblAppr.Dept_name, tblAppr.Budgeted_hours, tblActuals.Spent_Hours
FROM (tblProjs INNER JOIN...
I wrote this in a hurry. I am very capable of writing correct english, however, when I attempt to explain a problem I am encountering, it doesn't always come up the way I want.
Excuse me for attempting to get help.
I have 3 tables. The first table is the one side that contains project specific information with a primary key (Indexed, No Dups). The second table has the same primary key as a foreign key, however, it contains duplicate information (duplicate primary keys) so it is a many table that contains...
Just make sure the table is shared with the proper permissions. Whoever links to the table must have select, insert, update, etc. rights in order to write back to the SQL table.
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.