I posted this problem over at [a href="http://www.sqlservercentral.com/Forums/Topic1002255-338-1.aspx"]SQL Server Central[/a] but had problems with my data and framing the problem so I try it here. I appreciate any help.
I need to bring up the "many" attribute to a single row and into a csv...
I've seen it on this (maybe) and other forums but cannot find it in search. It's a slang term used for the old syntax:
SELECT c.strReceiptNo, d.strName
FROM dbo.tblControlLog c, dbo.tblDepartments d
WHERE c.guidDepartmentID = d.guidDepartmentID
Thanks
Woody
I have the following sample data and query. The tblControl (cl) has a one to many relationship with tblControlAssociates (cla) and tblControlAssignments (cls). I need to be able to bring up all associates to the same row based on the Receipt.
Declare @Temp Table
(
facility VarChar(25)...
Hello Everyone! I'll try a slightly different approach here at Tek-Tips.
I'm dealing with employee attendance data. An employee may receive amnesty for infractions that have occurred in the past (like unapproved absences etc.) I have an amnesty table that tracks the infraction(s) for which the...
I have a query that results in the following ID, StartDate and EndDate in a Table Variable(A). How do I now exclude data (in the next step) that was added to my production table(B) during any of these date ranges. The variable numbers of date ranges is based on the ID. Some may have no date...
I need to determine the date range(s) for each given employee from the entry date of the status RC to the entry date of the next status change AND then exclude all attributes (paydates, pay, etc.) for those dates from the range of pay dates returned for that employee based on the input...
I have input parameters @SDate and @EDate for my date range. The date being compared is a date/time and so I do a conversion to (nvarchar(20),101) to get mm/dd/yyyy. The problem is sometimes the user enters the date parameters as mm/dd/yy. In this case it works fine for @SDate but the range is...
How do I include only those rows where the 'InvoiceType' is not 3 except when the Vendor is 'ABC'.
When the Vendor is 'ABC' it doesn't matter what the InvoiceType is.
The value after 'Else' must not be a valid InvoiceType.
Is there a cleaner way to do this?
Where
InvoiceType !=
case...
I have a question that I've been unable to get answered on any of the other forums.
I am using Crystal Reports v10.
The vast majority of my 300+ reports are 8,637KB. Many of the reports that also include sub-reports are much larger 17-18MB. Only a few reports are what appear to be "normal"...
I am using Crystal Reports 10. I know reports can be saved with the data. My problem is I have reports that appear to (possibly) saving the data with the report even when I specify not to in the Report Options check box (unchecked).
I have many reports that are using more space than they should...
Hi,
My problem deals with a matrix report and its column group.
My specific question is: Is there a way to specify the sort order for scan-code - either in an expression or otherwise?
Row Groups : Employee, Date, Total-Hours-Worked
Column Group : Scan-Type (sorted By Scan Code 1,2,3, or 4)...
Hi Guys,
In this problem, I need the result to be one row per work date. Employees can have multiple pay codes for each day worked. So I need to eliminate pd.intPCode in the Group By. But how?
pd.intPCode forces multiple rows per pay-code. I need to eliminate the additional rows and have one...
Hi Everyone,
I'm looking for some direction on how to go about using the queries below -- (which are currently in a .net application and are used to build a report that is rendered in Crystal) -- I need to convert the report to SSRS. So I need to figure out how to combine the queries for a...
I apologize in advance if I'm stepping back too far. Looks like it's been a while for this topic: Temp Tables or Table Variables...
I have a stored procedure that uses 6 tables that are each a unique subset of a master table. The master table is about 600K rows and each of the other tables has...
I have no problem getting "elapsed Time" like this:
CONVERT(Varchar,EndTime - StartTime ,108) As ElapsedTime
My problem is getting "Delay Time". This calculation can result in a positive hh:mm:ss but can also be negative (hh:mm:ss) as is the case when StartTime is earlier than the...
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.