How Can I Encrypt A Single Table Column
Does some know of an easy to understand way to encrypt a single table column? I have never worked with encryption before.
View Complete Forum Thread with Replies
Related Forum Messages:
Storing Comma Separated Values In A Single Column Of A Table
Hi, I have a table called geofence. It has a primary key geofence_id. Each geofence consists of a set of latitudes and latitudes. So I defined two columns latitude and longitude and their type is varchar. I want to store all latitude/longitude values as a comma separated values in latitude/longitude columns So in general how do people implement these types of requirements in relational databases? --Subba
View Replies !
Updating A Single Column On A Table SQL Server 2005 (45 Records), The Session Hangs...
Hello, I am pretty new with SQL Server 2005. I have installed SQL Server Express Edition. I have migrated a set of tables from Oracl10g (by using Microsoft's Migration Tool Kit).While I am trying the following simple update command, the session hangs and it never finishes !!!!!!!!!!!! ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// select pos_key from pos_station where staff_key = 1105 POS_KEY ======= NULL update pos_station set pos_key = 1 where staff_key = 1105 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// The table has a few constraints and a couple of indices in place. Then I create another table (but no contraints or indices), just copy the data from the problematic one and the update WORKS (in msecs) : update pos_station_new set pos_key = 1 where staff_key = 1105 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Is there any way to tell if the table (any table in SQL Server) is corrupted or not ? How can I tell if a session is waiting for something and what is that something ? Thank you very much for your help. Tom
View Replies !
Create Multi Column View From Single Column Data
I have two tables, one a data table, the other a product table. I want to perform a join on the two tables with values distributed into columns based on the value in the month field. data_table product_code month value 350 1 10 350 2 20 350 3 30 product_table product_code profit_center 350 4520 result_view product_code profit_center mon1 mon2 mon3 350 4520 10 20 30 My current query gives the following result result_view product_code profit_center mon1 mon2 mon3 350 4520 10 0 0 350 4520 0 20 0 350 4520 0 0 30 Any direction toward a solution would be appreciated. Am using SS2005.
View Replies !
How To Encrypt The Password Field In SQL Table
Hi, I have a login table with username and password as attributes. I need to encrypt the password using stored procedure and then save it in the database. And also while retrieving the password, decrypt using the same stored procedure and get the original text. I dont know how to do it in SQL server 2000. Please help me on this. Its urgent. Thanks and Regards
View Replies !
Combine Data In Single Row From Single Table
How can i combine my data in single row ? All data are in a single table sorted as employeeno, date Code: Employee No Date SALARY 1 10/30/2006 500 1 11/30/2006 1000 2 10/25/2006 800 3 10/26/2006 900 4 10/28/2006 1000 4 11/01/2006 8000 Should Appear Code: EmployeeNo Date1 OLDSALARY Date2 NEWSALARY 1 10/30/2006 500 11/30/2006 1000 2 10/25/2006 800 3 10/26/2006 900 4 10/28/2006 1000 11/01/2006 800 PLEASE HELP I REALLY NEED THE RIGHT QUERY FOR THIS OUTPUT. THANKS IN ADVANCE
View Replies !
Choosing Between Two Column Values To Return As Single Column Value
I'm working on a social network where I store my friend GUIDs in a table with the following structure:user1_guid user2_guidI am trying to write a query to return a single list of all a users' friends in a single column. Depending on who initiates the friendship, a users' guid value can be in either of the two columns. Here is the crazy sql I have come up with to give what I want, but I'm sure there's a better way... Any ideas?SELECT DISTINCT UserIdFROM espace_ProfilePropertyWHERE (UserId IN (SELECT CAST(REPLACE(CAST(user1_guid AS VarChar(36)) + CAST(user2_guid AS VarChar(36)), @userGuid, '') AS uniqueidentifier) AS UserId FROM espace_UserConnection WHERE (user1_guid = @userGuid) OR (user2_guid = @userGuid))) AND (UserId IN (SELECT UserId FROM espace_ProfileProperty))
View Replies !
Multi-column Index Vs Single Column Indexes
Hi,Would like to know the performance differenece between Multi-columnIndex vs Single Column Indexes. Let's say I have a table with col1,col2, col3 along with a primary key column and non-indexed columns.In queries, I will use col1, col2, and col3 together and some timesjust one or two of these three columns. My questions is, should Icreate one index contains col1, col2, and col3, or create 3 seperatedcolumns. I.e. each column has its own index. Any performancedifference?Thanks a lot.
View Replies !
Concatenate Column Value From Multiple Rows Into A Single Column
Hello, I need to concatenate a column from multiple rows into a single column in a new table. How can I do this? SID NAME PGROUP ------------------------------------------------------------ 3467602 CLOTHINGACTIVE 3467602 CLOTHINGDANCE 3467602 CLOTHINGLWR Need to have SID NAME PGROUP ------------------------------------------------------------ 34676 02 CLOTHING ACTIVE , DANCE, LWR THANK YOU
View Replies !
Getting A Single Per Column
I have the following table Name Score Date A 10 10/19 A 20 10/18 A 30 10/17 B 40 10/18 B 50 10/15 B 60 10/14 I need to get Name Score Date A 10 10/19 B 40 10/18 Basically I need one row per Name and that row has to be for the most recent date for that Name In Sql 2005 you could do this by with MyCTE Name,Score,Date,Rownumber as select Name,Score,Date,Row_Number() (over partition by Name order by Date desc) as Rownnumber from Table A Select * from MyCTE where Rownumber=1 Does anyone know how this can be achieved on sql 2000 as Row_number function is not in sql 2000 Thanks for any help in advance
View Replies !
AND Query In Single Column
Hi groupI have a rather peculiar question, and I really don't know how to solvethis within an SQL statement:Given a view (v), that results in:IDX-----------------1a1b2a2c3aI'd like to query the view with something like:SELECT ID FROM v WHERE (X='a' AND X='b') which would result in:ID-----------------1or in another case:SELECT ID FROM v WHERE (X='a' OR X='c')would give:ID-----------------123how can this be done?TIAbernhard--www.daszeichen.chremove nixspam to reply
View Replies !
Column Data In The Single Row
Hi, I have a table such as ID Name OS ---------------------------------- 10 Paul AIX 10 Paul SOLARIS 10 Paul NT 20 Jack NT 20 Jack SOLARIS and I have asked to create an output as ID NAME OS ----------------------------------- 10 Paul AIX,SOLARIS,NT 20 JAck NT,SOLARIS How can I get this output via sql. Also a good source for such tricky SQLs would be very fruity.
View Replies !
How To Update Single Column
hi guys i have a problem;;; i have to update table''' querey is--TABLE1 HAS A COLUMN CALLED CITY .THE RECORDS WITH CITY='DELHI' ARE IS TO BE UPDATED WITH CITY='MUMBAI' AND THE RECORDS WITH CITY='MUMBAI' ARE IS TO BE UPDATED WITH CITY='DELHI' ... i HAVE TO WRITE A SINGLE SQLSTATEMENT TO DO THIS NOT WITH THE HELP OF CURSOR
View Replies !
Single Column Parser
Looking for TSQL stored procedure code to parse a single column's value into pieces (each piece stored in a seperate variable) for a subsequent update of other columns on this row -- (generically): 1. Declare/Open cursor on TBLx where COOKIES like '%CLIENT1=' or like '%CLIENT2=%' or like '%CLIENT3=%' 2. Fetch row; initiate 3 Loops to locate the trailing values of CLIENT1=nn, CLIENT2=nn,CLIENT3=nn (eg. CLIENT1=3243, CLIENT2=11, CLIENT3=4451) 3. Save the 3 values in variables (eg @VARclient1=3245, @VARclient2=11, @VARclient3=4451) 4. UPDATE where current of cursor.. SET COL1=@VARclient1, COL2=@VARclient2, col3=@VARclient3) Caveat.. in step 2 above, the various CLIENT strings can be listed in various orders in any various start positions w/in the COOKIEs column) (eg. CLIENT3=732,CLIENT1=9,CLIENT2=32 ----- starting in a variable position) I'm familiar w/ the CHARINDEX feature... Any smaple code would be greatly appreciated.. thx in advance! BT (william.t.turner@ceridian.com)
View Replies !
Resultset To Single Column
I have a situation where I would like to take a single column resultset and convert it to a single comma delimited row within a query. The reason I need this is because the data is from a child table of a parent and my end user has requested to be able to view the data in a tabular fashion. Therefore, I want to add this child table's contents as a comma delimited column in the stored proc I am using to retrieve the data for the display.
View Replies !
Distinct On Single Column?
Hi, This is a query that joins a vouple of tables to display all the products purchased by a group of customers and the price they paid for it. SELECT DISTINCT (p.code),p.descript_1 + ' ' + p.descript_2 + ' ' + p.descript_3 as description,sol.p_sales as price,sol.q_ordered as quantity,(sol.p_sales * sol.q_ordered) as total,so.date_in as dateFROM EfasLive..debtor AS d INNER JOIN Informatica..so AS so ON so.deb_code = d.code AND so.co_code = d.co_code INNER JOIN Informatica..so_line AS sol ON sol.code = so.code AND sol.co_code = so.co_code AND sol.acc_year = so.acc_year AND sol.efas = so.efas INNER JOIN EfasLive..part AS p ON p.code = sol.part WHERE d.[grp{003}] = 'GROUP' AND p.co_code = 1 AND p.code NOT LIKE '&%' AND so.date_in > DATEADD(m,-3,GETDATE()) AND sol.q_ordered > 0 ORDER BY (p.code), datum DESC The problem with this is that it returns multiple lines for every product (p.code). Like so: code description price quantity total date 603244 description_1 17.950000 150.000000 2692.500000000000 2007-08-01 00:00:00 603244 description_1 17.950000 150.000000 2692.500000000000 2007-07-10 00:00:00 603245 description_2 17.950000 40.000000 718.000000000000 2007-07-24 00:00:00 603245 description_2 17.950000 25.000000 448.750000000000 2007-07-16 00:00:00 603663 description_3 16.890000 27.000000 456.030000000000 2007-07-20 00:00:00 603663 description_3 16.890000 150.000000 2533.500000000000 2007-07-10 00:00:00 603663 description_3 16.890000 30.000000 506.700000000000 2007-07-03 00:00:00 I'd like there to be only 1 line for every different code with it's description. The idea is that the other rows are dropped and that only the first one remains. The one with the most recent purchase. I tried with GROUP BY but that's probably wrong since you'd have to add all the other columns as well and you end up with the same one. And even with adding a HAVING at the end I can't see how this could be solved edit: There aren't any actual relationships in the tables (it's ancient you see ...) I'm using SQL 2005 though.
View Replies !
Selecting Single Sorted Row From Many Column
HiBeen at this for 2 days now.Each business has several packages which they can sort usingsort_order.I'm trying to get one package for each business(that I can do), howeverI want it to be the one with the lowest sort_order valueAs you can see below the first record has sort_order=5 when it shouldbe 1.Most of the sort_order columns will be zero by defaultAny help so i can get on with my life!CheersGary------------Current select-------------------SELECT *FROM dbo.testAccommodation_Packages T1WHERE (NOT EXISTS(SELECT *FROM testAccommodation_PackagesWHERE business_id = T1.business_id AND Package_ID < T1.Package_ID))--------------results:-----------------------Package_IDbusiness_iditem_namesort_order123rd Night FREE ...5113Donegal Town ... 0204Executive ...0--------------To recreate----------------------CREATE TABLE [testAccommodation_Packages] ([Package_ID] [int] IDENTITY (1, 1) NOT NULL ,[business_id] [int] NULL ,[Item_Name] [nvarchar] (300) NOT NULL ,[sort_order] [int] NULL CONSTRAINT[DF_Accommodation_Packages_sort_order] DEFAULT (0),)-------------------------------------------------INSERTtestAccommodation_Packages(Package_ID,business_id, Item_Name,sort_order)VALUES('1','2','3rd Night FREE when you stay 2 nights MIDWEEK (129 EuroPPS)','5')INSERTtestAccommodation_Packages(Package_ID,business_id, Item_Name,sort_order)VALUES('2','2','Selected Donegal Town Hotel Weekend Sale - 2 B&B and 1Dinner Only € 129 PPS','4')INSERTtestAccommodation_Packages(Package_ID,business_id, Item_Name,sort_order)VALUES('3','2','2 Night Specials -Jan, Feb & Mar 2 B&B and 1 Dinner 149Euro PPS','3')INSERTtestAccommodation_Packages(Package_ID,business_id, Item_Name,sort_order)VALUES('4','2','Easter Hotel Breaks in Donegal Town - 2 B&B + 1 D€169pps','2')INSERTtestAccommodation_Packages(Package_ID,business_id, Item_Name,sort_order)VALUES('5','2','2005 Bluestack Hillwalking, 2 nights B&B, 1 Dinner, 5course Lunch 159 Euros PPS (~109 Stg)','1')INSERTtestAccommodation_Packages(Package_ID,business_id, Item_Name,sort_order)VALUES('6','2','April Pamper Package - 2 Night Special ONLY€195pps','10')INSERTtestAccommodation_Packages(Package_ID,business_id, Item_Name,sort_order)VALUES('7','2','Discount Hotel Prices for 8th & 9th April Only € 119PPS','7')INSERTtestAccommodation_Packages(Package_ID,business_id, Item_Name,sort_order)VALUES('8','2','Golden Year Breaks in Donegal - 4B&B + 2 Dinner€229pps','8')INSERTtestAccommodation_Packages(Package_ID,business_id, Item_Name,sort_order)VALUES('9','2','Hotel Summer Breaks Sale in Donegal - 2B&B + 1 Dinner€169pps','9')INSERTtestAccommodation_Packages(Package_ID,business_id, Item_Name,sort_order)VALUES('10','2','STAY SUNDAY NIGHTS FOR €25PPS','6')INSERTtestAccommodation_Packages(Package_ID,business_id, Item_Name,sort_order)VALUES('11','3','Donegal Town Midweek Special 99 Euro PPS 3 Nights B&B','0')INSERTtestAccommodation_Packages(Package_ID,business_id, Item_Name,sort_order)VALUES('12','3','Bridge Weekend 2 nights B&B 79 Euro PPS (approx 55Stg) Double Room','0')INSERTtestAccommodation_Packages(Package_ID,business_id, Item_Name,sort_order)VALUES('13','3','Donegal Spring Weekend Specials 2 B&B 1 Dinner109.00euros pps','0')INSERTtestAccommodation_Packages(Package_ID,business_id, Item_Name,sort_order)VALUES('14','3','Valentines Weekend 2 nights B&B and 1 four coursegourmet dinner 99Euro PPS','0')INSERTtestAccommodation_Packages(Package_ID,business_id, Item_Name,sort_order)VALUES('19','3','Golden Years Break.40% OFF 4 nights B&B€129.00p.p.s.','0')INSERTtestAccommodation_Packages(Package_ID,business_id, Item_Name,sort_order)VALUES('20','4','Executive Celebration Offer 1 night B&B + Dinner €139 PPS','0')INSERTtestAccommodation_Packages(Package_ID,business_id, Item_Name,sort_order)VALUES('21','4','Watercolour Painting Break 3 B&B Full Board andTuition € 335 PPS','0')
View Replies !
Concatenating One-to-many Relationship Into A Single Column
Hi, I need to concatenate a field from certain number of rows. I created a function to return the concatenated value which will be a part of another view/procedure to be used for reporting purposes. Here's sample data: iIncidentID iWorkNoteID iseqNum workNoteAll 1 1 1 notes1(1275 chars) 2 1 1 notes2(1275 chars) 2 1 2 notes3(1275 chars) 3 1 1 notes4(1275 chars) 3 1 2 notes5(1275 chars) 3 1 3 notes6(1275 chars) Final output iIncidentID workNoteALL 1 notes1(1275 chars) 2 notes2 notes3 3 notes4 notes5 notes6 final woorkNoteAll will be a part of a query in another view which contains many other fields. Here's the function. I'm passing an ID and based on that ID, the function returns a string. However, when I tested the function it's giving me a null. /* --Calling syntax:: Select dbo.getIncidentNotes(187714) as 'Notes' --Function to get all the latest notes for an incident */ CREATE FUNCTION dbo.getIncidentNotes(@iIncidentID int) RETURNS varchar(8000) AS BEGIN DECLARE @allnotes varchar(8000) DECLARE @seqnotes varchar(255) DECLARE @seqnum int DECLARE @counter int SELECT @counter=1 SELECT @seqnum = max(iseqnum) from dbo.frs_weekly_prospect_status2 where iIncidentId=@iIncidentID WHILE (@COUNTER <=@seqnum) BEGIN SELECT @seqnotes = workNoteALL from dbo.frs_weekly_prospect_status2 where iIncidentId=@iIncidentID and iSeqNum=@counter SELECT @allnotes = @allnotes + @seqnotes SELECT @COUNTER = @COUNTER + 1 END --While Begin RETURN @allnotes END Can someone please tell me what's wrong with the code? I really appreciate it. Thanks in advance.
View Replies !
Concatenate Query From Single Column
I have a query that I'm stumped on. The data has about 6000 records, of which about 460 of those have distinct dealer names and ids. I am trying to condense this data so that there is only one record for each dealer, but my 3rd column has different values which is why some dealers have only 2 records, and others may have 10. I know how to select distinct values, but what I want is to return a list of comma separated values for my 3rd column which consists of all the unique values from that 3rd column for that dealer. For instance, say I have a dealer with 8 records. They have a unique ID and Dealer Name, but the 8 records appear because the dealer has 8 entries for its activity. The activities may or may not be unique. So for example I have dealer ABC who has an id of 54, their name is ABC, but for their activites they have 8 entries (apple, orange, banana, pear, apple, banana, mango, peach). I wnt to be able to select the distinct id, name, and distinct activities so that when my query is returned and displayed the record appears as such: "54","ABC","apple, orange, banana, pear, mango, peach" Does that make sense?
View Replies !
Splitting Up Of Values In Single Column
Hi, I have a table that has multiple postal codes in one of the columns. Those have to be split up one per line and stored in another table. The zip codes are comma seperated. Is there a function that can do this...? Example data in ZipCodeTable. (Name and ZipCode are 2 columns in a table) NameZipCode Area119930,19970,19971,19944 Area219934,19938,19901,19903,19904 Area319994,19838 output Table should be: NameZipCode Area119930 Area119970 Area119971 Area119944 Area219934 Area219938 Area219901 Area219903 Area219904 Area319994 Area319838 Any thoughts on this would be of much help !!.. Thanks
View Replies !
Multiple Values For Single Column In Where Clause
how does one specify multiple values for a single column in a where clause? example: SELECT fname, lname FROM tblContacts WHERE (state = 'MI','CA','AZ','TN','NJ') if my memory serves me there is an IN() value list operator but I can't remember the syntax :confused:
View Replies !
Split A Single Column Data In To 2 Columns
Hi This is probably a very basic question for most people in this group. How do i split the data in a column in to 2 columns? This can be done in access with an update query but in MS SQL server I am not sure. Here is an example of what i want to acheive FName John?Doe FName LName John Doe thanks for the help prit
View Replies !
To Alter Multiple Column With Single Statement
It is possible to alter multiple columns within a single alter table statement? I have got the following URL that tells it is not possible to alter multiple columns within in signle alert table statement. http://www.blogcoward.com/archive/2005/05/09/234.aspx[^] Does anyone know about that? Thanks, Mushq
View Replies !
Adding A Single Change To All Rows In A Column
We just changed over our phone system and the new system uses all of the old extensions except it adds a 1 to the beginning of them. I know that there is a relatively simple way to update my phone extension column to show this, but I can't for the life of me remember what I need to do. Any help?
View Replies !
Creating Trigger For A Single Column/Field?
Hi all, My code below creates a trigger that fires whenever a change occurs to a 'myTable' row, but this is not what I want. I only want to log changes made to a single field called 'Charges', when that field is changed I want to log it, can anyone tell me how to modify my code to do this, thanks Create Trigger dbo.myTrigger ON dbo.[myTable] FOR UPDATE AS Declare @now DATETIME Set @now = getdate() BEGIN TRY Insert INTO dbo.myAuditTable (RowImage,Charges,ChangeDate,ChangeUser) SELECT 'BEFORE',Charges,@now, suser_sname() FROM DELETED Insert INTO dbo.myAuditTable (RowImage,Charges,ChangeDate,ChangeUser) SELECT 'AFTER',Charges,@now, suser_sname() FROM INSERTED END TRY BEGIN CATCH ROLLBACK TRANSACTION END CATCH
View Replies !
Concatenate Values From Same Column But Different Record In Single Row
Hi, I have a difficult case that I need to solve. I will try to be the very clear explaining my problem: I have a sql query which brings me many records. This records have a column in common which have the same value (COL1) There is a second column (COL2) which has different values bewteen these records. I need to concatenate values from the second column in records with same value in COL1. And I need only one record of the ones that have the same values. If two records have the same COL1 value, only one row should be in my result. Let me give you an example: COL1 COL2 RECORD1 1-A HHH RECORD2 1-A GGG RECORD3 1-B LLL RECORD4 1-B MMM RECORD4 1-B OOO RECORD5 1-C NNN Me result should be: COL1 COL2 RECORD 1-A HHHGGG RECORD 1-B LLLMMMOOO RECORD 1-C NNN It is clear what I need? I dont know if I can solve it through sql or any function inside SSIS. Thanks for any help you can give me.
View Replies !
Report Service - Drill Down For Single Column
I need to do a drill down for single column Example , I have Managers and employees in same table . Employyes has a link to their manager. I want to display + Manager1 Employee1 I can do this by a spacing. But I need to do in a tree view.
View Replies !
Making Single Column Value To Multiple Columns
I have a table which has single column like this. REP5426 02-28-08 0592 00100028 CAFE 00205415 23.77 A O INPUT REP5426 02-28-08 0592 00100028 CAFE 00580910 475.58 A O INPUT REP5426 02-28-08 0592 00100028 CAFE 00800840 -13.32 A O INPUT REP5426 02-28-08 0592 00100028 CAFE 00205416 23.77 A O INPUT I want to put this in a new table in individual columns Col1 col2 col3 col4 col5 col6 col7 col8 col9 REP5426 02-28-08 0592 00100028 CAFE 00205415 23.77 A O INPUT REP5426 02-28-08 0592 00100028 CAFE 00580910 475.58 A O INPUT REP5426 02-28-08 0592 00100028 CAFE 00800840 -13.32 A O INPUT REP5426 02-28-08 0592 00100028 CAFE 00205416 23.77 A O INPUT How to do this. Thanks.
View Replies !
Stored Procedure To Concatenate Column Value Sin A Single Cell?
HiI want to achieve the following transformation of data using a storedprocedure.Sourcecol1 col2(varchar)-------------------------1 1.11 1.22 2.12 2.22 2.3=================Desired Resultcol1 col2(varchar)--------------------------1 1.1 | 1.22 2.1 | 2.2 | 2.3=====================Thanks in advance. :)- Parth
View Replies !
Select Comma Separated Values From Single Column
Hi, I have a table -- Table1. It has two columns -- Name and Alpha. Alpha has comma separated values like -- (A,B,C,D,E,F), (E,F), (D,E,F), (F), (A,B,C). I need to pick the values of column -- Name , where in values of Alpha is less than or equal to 'D'. I tried <=, but got only values less than 'D', but was not able to get equal to 'D'. Any suggestions??
View Replies !
How Can I Combine Values Of Multiple Columns Into A Single Column?
Suppose that I have a table with following values Table1 Col1 Col2 Col3 ----------------------------------------------------------- P3456 C935876 T675 P5555 C678909 T8888 And the outcome that I want is: CombinedValues(ColumnName) ---------------------------------------------- P3456 - C935876 - T675 P5555 - C678909 - T8888 where CombinedValues column contains values of coulmn 1,2 & 3 seperated by '-' So is there any way to achieve this?
View Replies !
How To Bring Back The Distinct Values In Single Column From Two Tables
12.) Now you have two different tables - each with two columns.Table #1Single Column2 rows with a value equal to 1 and 2Table #2Single column2 rows with a value equal to 2 and 4Construct a statement returning in a single column all the valuescontained, but not the common values.This is another question that I got in an interview, I missedit.......Thanks,Tim
View Replies !
Calculating Percenatges On Matrix Report Form A Single Column
Hi, I am sure there is a simple answer to this, but I cannot find it at the moment??? I have a simple data table in SQL which gives me Division, PL Measure and Value... SQL Table Division PL_Desc Result A Total Labour Costs 10 A Total Sales (inc Machine Income) 100 B Total Labour Costs 5 B Total Sales (inc Machine Income) 100 C Total Labour Costs 9 C Total Sales (inc Machine Income) 100 I need to report on this and calculate a ratio, so I have pushed this into a Matrix Report but cannot work out how to get the ratio column to work???... Matrix Report ??????????? Division Total Labour Costs Total Sales (inc Machine Income) New Column = Labour / Sales A 10 100 10% B 5 100 5% C 9 100 9% Grand Total 24 300 8% If anyone can help save me from my own stupidity! Cheers, Matt
View Replies !
Is There Any Solution For Dispalying String And Percentage Values In Single Column
i have a report with contains preview of percentage columns example of percentage of student marks in perticular subject like 95%. and if suppose any student not attend any test i have to dispaly like not attended statement. so i have display two fields like 95% and not attended statement in same column, i given Cstr(Fields!Data.Value), it gives two fields with contains not attended statement of perticular query and it dispalys 0.95 % . but i need 95% and not attended statement for perticular query in same column. is there any solution for dispalying string and percentage values in single column for given perticular query and those two values are disply same result compare with preview at the time of export to excel sheet plese send solutions ASAP Thanks James vs
View Replies !
Group By And Count(*) A Single Column Returing Two Counted Values
I am trying to count a column field in a single table and return two count values as one record set using group by. field1 = group by (department) nvarachar field2 = count (closed) datetime I have tried using derived tables with no luck getting the desired result. field2 is a datetime field as indicated I want a count for two conditions 1. WHERE field2 is null 2. WHERE field2 is not null End Results would like this ====== Department | OpenItems | ClosedItems Department1 | 32 | 24 Departmnet2 | 87 | 46 Department3 | 42 | 76 ======= I got it *almost* working with derived tables, but the group by function was not putting the department as one single row. I was getting multiple rows for departments. I realize this is probably a simple answer and I am making this a lot harder than it actually is.... Any suggestions?
View Replies !
How Do I Return All Rows Value In A Single Column Delimit With Comma Separation?
Dear all, I have a table like: State -- Customer TN -- AAA TN -- AAA1 TN -- AAA2 Delhi -- BBB Delhi -- BBB1 Delhi -- BBB2 Mumbai -- CCC Mumbai -- CCC1 Mumbai -- CCC2 Maharashtra -- DDD Maharashtra -- DDD1 Maharashtra -- DDD2 I want to show the output in a single query like: State -- Customers TN -- AAA, AAA1, AAA2 Delhi -- BBB, BBB1, BBB2 Mumbai -- CCC, CCC1, CCC2 Maharastra -- DDD, DDD1, DDD2 How do i do this in a single query Can Pivot query will help in this situation. Please explain with a sample query Thanks gopalan@sofist.com okugops@hotmail.com
View Replies !
|