Column Head

Feb 13, 2007

Hello
Is there a way to get the column head in query output.
Thanks

View 3 Replies


ADVERTISEMENT

Column Head On A Matrix Report.

Jan 24, 2008

Hi
I have a huge matrix with 8 columns and then all the data that's generated when choosing a date span. These 8 columns are Topic, Salesperson, Company and so on and then the right part of the matrix grows with values for each month.

My problem is that there are no column headers for the first 8 columns!! How come?
What I did to resolve this was to put in a table in the top left cell and then write in the corresponding column header. This works €¦ in IE but not in PDF or Excel. And I really need it when I export it to Excel.

Any ideas?

Kind regards.

View 5 Replies View Related

Contains Not Working Or Probably It's My Head......but Anyhow I Need Help

Jan 25, 2008

Hello!
 
I try to execute the below statement on a column, I've been trying on a row where subType3 contains this string ",31,32,34,23,55,54,39,44,51,52," without the ",. The column is declared as varchar(MAX)
SELECT subType3 FROM aTable WHERE CONTAINS(subType3, '32')
The above statement executes and returns the result as expected, BUT if I execute this:
SELECT subType3 FROM aTable WHERE CONTAINS(subType3, '55')
then nothing is returned. I can't see any real pattern, 32, 34 and 54 returns the row. If I try with any of the others nothing is returned....Why is this? 
I sort of need to use contains, if I dont wan't to start chopping up the string and patindex or something like that. Patindex works by the way, but when I have many values then it gets a bit cumbersome using anything else than contains.
Thanks for any and all help,
Cheers!
/Eskil
 
 

View 2 Replies View Related

Row Size Over Head

Apr 25, 2000

Hi all !
I have a table where there are a number of columns with varchar(20) and varchar(255).
I am looking at a table with 4 varchar(255) and 10 varchar(20) 's.
I have to estimates the size of the table.I can do that given the rowsize and the number of rows in the table.
My problem is what is the kind of over head that I need to take into account when I am dealing with a table with soo many variable length columns when calculating the row size?
What is the over head difference between char datatye and varchar datatype?
I can't go for char datatypes now.
Help and info regarding this is very much appreciated.

regards
Sush.

View 1 Replies View Related

A Query That Is Over My Head...

Dec 8, 2005

Question:
How do I return a list of items that matches one or more criteria that I pass in?

Background:
A user enters a sales lead (a company is looking for a place to have their event). That lead has a number of
criteria elements (start date, end date, city, region, maximum room rate, one or more amenities, etc. - more
details below) that should be used when trying to find Hotels that match that criteria. Obviously, some
criteria is more important than others (city, start and end date are more important than the maximum room
rate) - and it's unlikely that many (if any) of the Hotels will match *all* of the criteria entered by the
user. So, I'm looking to return a list of Hotels that match at least one of the criteria - if possible,
ordered by how many criteria elements match.

What makes this query particularly difficult, is that some of the criteria to match are stored in multiple
tables. For example, each Hotel has "Amenities" (Golf, Spa, etc.) - that are stored in a seperate table.
When a user enters a lead, they select which amenities they want to match. Also, a lead specifies a number
of rooms to block for each day between the Arrival and Departure date - these numbers can change from day
to day - but for this query - I think it's acceptible to get the largest number of rooms needed from any of
the days and compare that one number against the "MaxDailyRoomBlock" field of a Hotel (represented by the
"Property" table). Also, since a Hotel has different rates defined for each season, the query will have to
match the "MaxRate" against the rate of the correct season based on the Arrival and Departure dates. Also,
the rate can be within 20% of the stated "MaxRate".

Here are the following variables that will be passed into the query as criteria items:
RequestCity, RegionINDEID, ArrivalDate, DepartureDate, MaxRate, MaxTheaterSeating, MaxBanquetSeating,
MaxSchoolSeating, MaxBreakoutRooms, MaxRoomBlock

I know this is a huge post - and I sincerly appreciate any help you can provide.

DDL for Tables:
*In the DDL.txt attachment

Sample Data:
* In the data.txt attachment

Previous Attempts:
Unfortunately, I don't even know where to begin, so I haven't tried anything yet.


Expected Results:

PropertyIDNameNumOfMatches
-----------------------------------------------
1Marriot San Diego5
2Hilton San Diego3
3Hilton San Diego Downtown2



Thanks in advance, again...

View 3 Replies View Related

In Over My Head And Need Guidance

Aug 24, 2007

I am the IS manager for a medium business. I am also the DBA and the programmer and help desk and trainer etc etc.

In 2003 I embarked on a project which went live in 2005. We contracted to have our order processing system rewritten into SQL. I went from a character based 4GL language called Progress running in a UNIX enviroment to a knock down, drag out, full blown microsoft solution. I have been operating this new system for two years making modest enhancements and improvements as my skills with microsoft are increasing and improving (retraining my brain to think objects)and hiring contractors to do the really cool fun stuff.

I have to learn Server 2003, SQL Server 2005, SQL Express, T-SQL, Replication, Reporting Services, SSIS, IIS, DTS, Visual Source Safe, Visual Studio, VB, C#, ADO.NET and the .NET Framework fits in here too although I don't really know where.

I hope you are starting to understand my feeling of being 'in over my head'. Right now everything is running perfect. I do backups, restore them and create new reports. Basic stuff.

On top of this our company has merged with a larger one and this bigger company does not have a microsoft solution. They have an AS400 home grown application that I do not want to learn. I will not go backwards!!!!! I will loose my job/position in the next couple of years. I want certifications (to get that interview).

I just don't have the skills to back up the certification (I don't want to be one of those exam cram people) I do a plethora of unrelated taks all day long. Not because I have to do them I choose to do them. I like both DBA and Programming.

So, if you were me, and could get certifications and have experience to back them up what would you do first?

View 4 Replies View Related

This Is Making My Head Spin

Dec 18, 2007



I have a table that contains categories, users, modifydates . All three of those fields may be repeated many times.

I need to build a table that contains user, modifydate, oldcategory, newcategory, duration (number of days between modifydates when there is a category change)

I can use the min(modifydate) to get the 1st occurrence of each new category, but I am having trouble populating the oldvalue and then also getting the duration.

Adding to the complexity, I have to take the last entry of a null category prior to category being populated the first time and populate it with the first occurrence of category, Likewise, I have to populate the first occurrence of null after the last occurrence of a popoulated category. In other words, this simulates populated categories prior to first occurrence and after the last occurrence.

Any help would be great.

View 6 Replies View Related

How To Find The Head Of A Blocking Chain?

May 1, 2002

I'm trying to write a script that will go against sysprocesses (I think) and find the head of a blocking chain, and how many SPIDs it is blocking on down the line.

I found a reference to a script called head_blockers.sql in the Swynk Scripts database (posted March 2000), but the script appears to no longer be available for download.

Any help would be appreciated!

Thank you,
Susan Jones

View 2 Replies View Related

Function To Return Head Of Parent

Jan 19, 2014

I have an existing function and need to alter function to give result of the parent-description until its parent is reached.

--CREATE TABLE

CREATE TABLE [dbo].[CityData](
[Id] [int] NULL,
[ParentID] [int] NULL,
[City] [nchar](20) NULL,
[Location] [nchar](50) NULL,
[Amt] [int] NULL
) ON [PRIMARY]

[Code] ....

View 3 Replies View Related

Time Spans, Tricky SQL, My Head Hurts

Apr 8, 2006

Data apx (5 million rows):

Span example:
-------------M---------------
___________-------------Rx-------------

Needs to b converted to this (ignore the underscore, used for spacing):

---M-------|-------M & Rx----|---Rx--

The time spans can slide either way.

Data example:

MemberID Eff_Date Term_Date Med_COB Rx_COB
1 20050101 20050912 Y N
1 20050310 20051120 N Y
1 20060101 <null> Y N
1 20060101 <null> N Y

Resulting Records need to be in this format:

MemberID Eff_Date Term_Date Med_COB Rx_COB
1 20050101 20050310 Y N
1 20050311 20050912 Y Y
1 20050913 20051120 N Y
1 20060101 <null> Y Y

Any help with this problem would be greatly appreciated. We are running SQL2K. I like most people,would like to stay away from cursors and loops if possible.

Thanks,
nemesis01

View 8 Replies View Related

Need To Replicate Sales Info To Head Office

Aug 21, 2007

Here's My scenario,

I am using SQL2k5 with sp2. In have three branch stores in my site each with SQL 2k5 and a master server at headoffice also with SQL 2k5. The sales transactions for each store goes to a table called sales transaction. What I need is that the info from the sales transaction of each branch populate the sales transaction table at the head office, but not vice versa. That is to say the sales transaction table at each branch must have their information alone and no information from any other branch. Only the head office must have sales transactions from all branches in it's table. What type of replication do i use and how do i implement it?

Muchas muchas gracias.

View 3 Replies View Related

Get 1 Record Out Of SQL Express And Use Info In &<head&> And &<body&> Areas, Not In A Grid.

Jan 1, 2008

 Hi
Just started using Visual Studio Express 2005 (Web) with Server 2005 Express and I am trying to extract the data from a SQL but cannot find how to connect to and open a SQL recordset so as to use the values of a single record dotted around a page.  I would be using the values in the <Head> and <body> areas of the page.  The body of the page would utilise standard data grids for sub and sub data, this being no problem.
Below is how I would have retrieved the "EndDate" value from an Access databse under asp.

 Set Conn=Server.CreateObject("ADODB.Connection") Set rs=Server.CreateObject("ADODB.RecordSet") Conn.Open "DBQ=" & Server.MapPath("../private/Drapers.mdb") & ";Driver={Microsoft Access Driver (*.mdb)};"   rs.open "SELECT * FROM Products where ID = 44", Conn, 3, 3     rs("Metta1") rs("Metta2")
The following is from the Web.config file

<connectionStrings><add name="ConnectCB" connectionString="Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|CBBasic.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient"/></connectionStrings>
I have tried lots of things that were either code that was superceeded  or just plainly didn't work.
Any help would be appreciated.
      John

View 3 Replies View Related

Failed Assertion = &#39;m_activeSdesList.Head () == NULL&#39; (in Combination With Error: 1203)

Jun 6, 2000

On our datawarehouse server we are regularly having a 1203 error, causing the sql-server to hang. We get this message in the errorlog: Failed Assertion = 'm_activeSdesList.Head () == NULL'. In the knowledgebase I found a bug description that is very lookalike to our problem.

Article: Q240853 FIX: Lock Escalation With Parallel Query May Cause 1203 Error And Server Shutdown

*** part of the article ***
SYMPTOMS
If a lock escalation occurs while running a parallel query, it is possible to encounter error message 1203 as follows:

spid7 Process 7 unlocking unowned resource: KEY: 13:117575457:2 (35010560ebcd)
spid7 Process 7 unlocking unowned resource: KEY: 13:117575457:2 (35010560ebcd)
spid7 Error: 1203, Severity: 20, State: 1
spid7 Process ID 7 attempting to unlock unowned resource KEY: 13:117575457:2 (35010560ebcd).
spid7 Error: 1203, Severity: 20, State: 1
spid7 Process ID 7 attempting to unlock unowned resource KEY: 13:117575457:2 (35010560ebcd).

The error message included in the error log probably mentions the same lock resource in several of the error messages.

Once the error is printed, an assertion message similar to the following is also printed:
1999-08-09 13:15:26.79 kernel SQL Server Assertion: File: <proc.c>, line=1866 Failed Assertion = 'm_activeSdesList.Head () == NULL'.
After a dump of the stack for all threads, the server initiates a shutdown of the SQL Server process.
...
*** end ***

You can find the complete article on: http://support.microsoft.com/support/kb/articles/q240/8/53.asp?LN=EN-US&SD=gn&FR=0

We can't use the workaround, because that would shut out parallelism, which is necessary for the project.

There is a fix, but in the article Microsoft says: "A supported fix that corrects this problem is now available from Microsoft, but it has not been fully regression tested and should be applied only to systems experiencing this specific problem.".
You understan,d this is not one of my favorite type of fixes...

Does anyone have already installed the fix mentioned? Had any problems with it, or did it cause some other troubles?

Thx,
Kurt De Cauwsemaecker
Database Administrator
Telepolis Antwerpen

View 1 Replies View Related

Integration Services :: Add New Column Based On Existing Column Using Derived Column Task?

Jul 28, 2015

I have a excel file which has a column called "Code" and their values are A,B,C,D,E,F,G,H.  I want to create a new column called "status" based on the values of "Code".

Code:

A
B
C
D
E
F
G
H

If A,C,E,G then "status" = "Active" else if  B,D,F,H then "Status" = "Inactive". I like to do it using "Derived Column".

View 4 Replies View Related

Transact SQL :: Calculate DateTime Column By Merging Values From Date Column And Only Time Part Of DateTime Column?

Aug 3, 2015

How can I calculate a DateTime column by merging values from a Date column and only the time part of a DateTime column?

View 5 Replies View Related

How To Refer A Column When The Referencing Column Is An Identity Column

Oct 16, 2006

Hi all,

The requirement is to have a table say 'child_table', with an Identity column to refer another column from a table say 'Parent_table'..

i cannot implement this constraint, it throws the error when i execute the below Alter query,

ALTER TABLE child_table ADD CONSTRAINT fk_1_ct FOREIGN KEY (child_id)
REFERENCES parent_table (parent_id) ON DELETE CASCADE

the error thrown is :
Failed to execute alter table query: 'ALTER TABLE child_table ADD CONSTRAINT
fk_1_ct FOREIGN KEY (child_id) REFERENCES parent_table (parent_id) ON DELETE
CASCADE '. Message: java.sql.SQLException: Cascading foreign key 'fk_1_ct' cannot be
created where the referencing column 'child_table.child_id' is an identity column.

any workarounds for this ?

View 3 Replies View Related

TSQL - Using ALTER TABLE - ALTER COLUMN To Modify Column Type / Set Identity Column

Sep 7, 2007

Hi guys,
If I have a temporary table called #CTE
With the columns
[Account]
[Name]
[RowID Table Level]
[RowID Data Level]
and I need to change the column type for the columns:
[RowID Table Level]
[RowID Data Level]
to integer, and set the column [RowID Table Level] as Identity (index) starting from 1, incrementing 1 each time.
What will be the right syntax using SQL SERVER 2000?

I am trying to solve the question in the link below:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2093921&SiteID=1

Thanks in advance,
Aldo.

I have tried the code below, but getting syntax error...



ALTER TABLE #CTE
ALTER COLUMN
[RowID Table Level] INT IDENTITY(1,1),
[RowID Data Level] INT;


I have also tried:

ALTER TABLE #CTE
MODIFY
[RowID Table Level] INT IDENTITY(1,1),
[RowID Data Level] INT;







View 18 Replies View Related

Alter Table Add Column - How Do You Add A Column After Say The Second Column

Jul 11, 2007



When you use "Alter Table add Column", it adds the column to the end of the list of fields.



How do you insert the new column to position number 2 for instance given that you may have more than 2 columns?



Create table T1 ( a varchar(20), b varchar(20), c varchar(20))



Alter table add column x varchar(20)

so that the resulting table is

T1 a varchar(20), x varchar(20), b varchar(20), c varchar(20)



Can this be done programmatically?













View 33 Replies View Related

ALTER TABLE DROP COLUMN LastUpdated Failed Because One Or More Objects Access This Column.

Mar 7, 2008

Hi I’m trying to alter a table and delete a column I get the following error. The object 'DF__Morningst__LastU__19EB91BA' is dependent on column 'LastUpdated'.
ALTER TABLE DROP COLUMN LastUpdated failed because one or more objects access this column. I tried deleting the concerned constraint. But the next time I get the same error with a different constraint name. I want to find out if I can dynamically check the constraint name and delete it and then drop the column. Can anyone help.IF EXISTS(SELECT 1FROM sysobjects,syscolumnsWHERE sysobjects.id = syscolumns.idAND sysobjects.name = TablenameAND syscolumns.name = column name)BEGIN EXECUTE ('ALTER TABLE tablename DROP CONSTRAINT DF__SecurityM__DsegL__08C105B8')EXECUTE ('ALTER TABLE tablenameDrop column columnname)ENDGO
 

View 1 Replies View Related

Exclude Records From A Table Where ID Column Is Same But Mail Code Column Is Multi-valued

Nov 12, 2012

I am trying to exclude records from a table where the ID column is the same but the Mail code Column is multi-valued.For Example: (the table looks like....)

ID Mail_code
111111 XNT
111111 N11
111111 XNC
222222 XNC
222222 XNL
333333 XNC

So, if there is any ID that has a value of XNC, I want to exclude the ID all together from my output regardless of the other values.

View 3 Replies View Related

SQL Server 2008 :: Display A Column Alias As Part Of The Result Set Column Labels?

Feb 26, 2015

Is there a way to display a column alias as part of the result set column labels?

View 9 Replies View Related

Cast/Convert Mmddyy In String To New DB_DATETIMESTAMP Column In Derived Column Transformation

Mar 5, 2007

Hi,
I have dates in "mmddyy" format coming from the sources and they are older dates of mid 80s like 082580 for instance.

When I cast it this way (DT_DBTIMESTAMP) Source_Date , It says ok but throws a runtime error.

When I hardcode a date in same format, (DT_DBTIMESTAMP) "082580" , It becomes red (an indication of syntax error) . Please note that we use double quotes in expressions in Derived Column Transformation; So an anticipation that using double quotes over single ones would be the syntax problem would be wrong.



Any help in this will sincerely be appreciated.


Thanks

View 7 Replies View Related

Reporting Services :: Change Column Size Dynamically Depends On Content Of The Column?

Jun 4, 2015

How to change column size dynamically depends on content of the column.

View 2 Replies View Related

Reporting Services :: Add A Variance Column Into SSRS Report Where Column Headers Are Non-static?

May 13, 2015

I am creating a report in SSRS which has the following criteria:

- Row 1 (parent) is 'Product'

- Row 2 (child) is  'Feed'

- Columns are date.  I have 5 dates showing at any one time across the top.  The date field is set up as a parameter so depending on the date the user selects, the report will show that date on the end column and then the 4 days prior to that in the other columns.   

 - Data is the number of records.

I have a sub total on the Product and the report is collapsed on Product as default.

What i'm stuck on is trying to insert a column at the very end that will show the variance between the last two dates.  So the difference between the date the user selected (@date parameter) and the day before that. 

View 6 Replies View Related

Reporting Services :: Get Computed Current Row Closing Balance Column Value In Next Row Opening Value Column

Nov 17, 2015

I have a Table Having Date,Opening,Addition,Sale values where opening value comes in the very first row other times it is zero.

In ssrs how can i have a report showing closing value = Opening+Addition-Sale  in current row (it is simple for 1st row ). this closing be the opening value in next row and same formula to be continued...

Date Opening AdditionTotalTank saleClosing Stock
01-11-15 14435 0 14435 8243 20627
02-11-15 0 15000 15000 9433
03-11-15 0 9000 9000 9436
04-11-15 0 12000 12000 8392
05-11-15 0 6000 6000 8157
06-11-15 0 12000 12000 8456
07-11-15 0 15000 15000 10903
08-11-15 0 6000 6000 8485
09-11-15 0 6000 6000 9413
10-11-15 0 21000 21000 6413

View 7 Replies View Related

Error Invalid Column Name (In Sqlserver 2005) While Giving Alias Column Name

Jan 15, 2008

ALTER procedure [dbo].[MyPro](@StartRowIndex int,@MaximumRows int)
As
Begin
Declare @Sel Nvarchar(2000)set @Sel=N'Select *,Row_number() over(order by myId) as ROWNUM from MyFirstTable Where ROWNUM
Between ' + convert(nvarchar(15),@StartRowIndex) + ' and ('+ convert(nvarchar(15),@StartRowIndex) + '+' + convert(nvarchar(15),@MaximumRows) + ')-1'
print @Sel
Exec Sp_executesql @Sel
End
 
--Execute Mypro 1,4        --->>Here I Executed
 Error
Select *,Row_number() over(order by myId) as ROWNUM from MyFirstTable Where ROWNUM
Between 1 and (1+4)-1
Msg 207, Level 16, State 1, Line 1
Invalid column name 'ROWNUM'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'ROWNUM
Procedure successfully created but giving error while Excuting'.
Please anybody give reply
Thanks
 

View 2 Replies View Related

SQL Server 2012 :: Subtract / Exclude Value Items From A Column And Add It To Another Column In Same Table

May 26, 2014

I got a sales cost and cost amount table for my budget. the sales cost table is getting updated with FOBB items which makes the total incorrect . the FOBB values needs to be moved from the sales cost column to the cost amount column. how can i do it with an SQL script.

View 1 Replies View Related

T-SQL (SS2K8) :: Cannot Define Primary Key Constraint On Nullable Column But Column Not Null

Sep 30, 2014

We have a database where many tables have a field that has to be lengthened. In some cases this is a primary key or part of a primary key. The table in question is:-

/****** Object: Table [dbo].[DTb_HWSQueueMonthEnd] Script Date: 09/25/2014 14:05:09 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[DTb_HWSQueueMonthEnd](

[Code] ....

The script I am using is

DECLARE@Column varchar(100)--The name of the column to change
DECLARE@size varchar(5)--The new size of the column
DECLARE @TSQL varchar(255)--Contains the code to be executed
DECLARE @Object varchar(50)--Holds the name of the table
DECLARE @dropc varchar(255)-- Drop constraint script

[Code] ....

When I the the script I get the error message Could not create constraint. See previous errors.

Looking at the strings I build

ALTER TABLE [dbo].[DTb_HWSQueueMonthEnd] DROP CONSTRAINT PK_DTb_HWSQueueMonthEnd
ALTER TABLE [dbo].[DTb_HWSQueueMonthEnd] Alter Column [Patient System Number] varchar(10)
ALTER TABLE [dbo].[DTb_HWSQueueMonthEnd] ADD CONSTRAINT PK_DTb_HWSQueueMonthEnd PRIMARY KEY NONCLUSTERED ([Patient System Number] ASC,[Episode Number] ASC,[CensusDate] ASC)
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]

They all seem fine except the last one which returns the error

Msg 8111, Level 16, State 1, Line 1
Cannot define PRIMARY KEY constraint on nullable column in table 'DTb_HWSQueueMonthEnd'.
Msg 1750, Level 16, State 0, Line 1
Could not create constraint. See previous errors.

None of the fields I try to create the key on are nullable.

View 2 Replies View Related

Importing Data From Oracle9i CLOB Column To MS SQL Server Text Column

Jul 20, 2005

Hi everyone,I encountered an error "Need to run the object to perform this operationCode execution exception: EXCEPTION_ACCESS_VIOLATION" When I try to import data from Oracle to MS SQL Server with EnterpriseManager (version 8.0) using DTS Import/Export Wizard. There are 508 rowsin Oracle table and I did get first 42 rows imported to SQL Server.Anyone knows what does the above error message mean and what causes therest of the row failed importing?Thanks very much in advance!Rene Z.--Posted via http://dbforums.com

View 1 Replies View Related

Master Data Services :: Filter Column Based On Other Column In Same Entity

May 12, 2015

Using MDS 2012: I have an entity "XYZ_Entity".  In "XYZ_Entity" entity I have 2 domain based Columns "DealerGroup" and "Dealer".

While inserting information into "XYZ_Entity" entity user can select the required dealer group from domain base Dealer Group values. Now for selecting Dealer he wants the dealers to be filter based on selected dealer group and he can select from the filtered list. reason to do that is he don't want to go through thousands of dealers and select an incorrect one.

Is it possible, if yes then how?

View 2 Replies View Related

Cannot Insert The Value NULL Into Column SnapshotDataID, Table ReportServerTempDB.dbo.SessionData; Column Does Not Allow Nul

May 3, 2007

I receive this message when I try to run any report. The reportserver and reportservertempdb databases were upgraded using backup/restore from SQL2000 to SQL2005 on a separate server which is running RS2005 . Please help. Thanks

View 1 Replies View Related

Transact SQL :: SUM Of Two Table Column Base On Another Column Value And SUBTRACT And Join Tables

Oct 14, 2015

I have the following table

Table Name EmployeeInformation
EmployeeID EmployeeFirstName EmployeeLastName
    1             |John                       |Baker
    2             |Carl                        |Lennon
    3             |Marion                    |Herbert

Table Name PeriodInformation
PeriodID PeriodStart PeriodEnd
    1        |1/1/14      |12/30/14
    2        |1/1/15      |12/30/15

[code]...

I want a query to join all this tables based on EmployeeID, PeriodID and LeaveTypeID sum of LeaveEntitlement.LeaveEntitlementDaysNumber based on LeaveTypeID AS EntitleAnnaul and AS EntitleSick and sum AssignedLeave.AssignedLeaveDaysNumber based on LeaveTypeID  AS AssignedAnnaul and AS AssignedSick and subtract EntitleAnnaul from AssignedAnnual based on LeaveTypeID  AS AnnualBalance and subtract EntitleSick from AssignedSick based on LeaveTypeID  AS SickBalance

and the table should be shown as below after executing the query

EmployeeID, EmployeeFirstName, EmployeeLastName, PeriodID, PeriodStart, PeriodEnd, EntitleAnnual, AssignedAnnual, AnnualBalance, EntitleSick, AssignedSick, SickBalance

View 4 Replies View Related

How Can I Set Constant Padding Between The Columns Of The Column Chart(stacked Column Sub-type)?

Aug 2, 2006

Hi All,

I am working on a column chart type (stacked column sub-type) report.

Our customer requires us that the space(padding) between the columns should be a constant(including the space between the Y-axis and the first column). I know how to set the width of the columns, but I really don't know how to set the width of the space between them. The columns just varies the space between them automatically according to the number of the columns (the number of the columns is not certain).

Thanks a lot in advance!

Danny





View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved