There has been a great deal of discussion around searching on encrypted columns.
Is there a way to 'disable' the fact that IVs and other info are changed for each set of clear text to be encrypted?
This would introduce a certain level of weakness, I know. but in my mind, security is all abour risk assessment, which includes the cost of implementing security.
To me, the cost of not being able to search on an encrypted string is higher than mitigating against the chance that someone could brute force decrypt AES 256 - if this makes sense.
Hi. I want to return multiple rows into a single row in different columns. For example my query returns something like thisThe query looks like thisSelect ID, TYPE, VALUE From myTable Where filtercondition = 1ID TYPE VALUE1 type1 121 type2 152 type1 16 2 type2 19Each ID will have the same number of types and each type for each ID might have a different value. So if there are only two types then each ID will have two types. Now I want to write the query in such a way that it returnsID TYPE1 TYPE2 VALUE1 VALUE21 type1 type2 12 152 type1 type2 16 19Type1, Type2, Value1, and Value2 are all dynamic. Can someone help me please. Thank you.
I’m trying to figure out a way to sum columns for similar IDs, based on the contents of a single field. For example, if I’m calculating attendance percentages for students, and codes P and T count as Present, and codes A and E count as Absent, I would want to total Present and Absent codes separately, in their own columns. I would then like to use those totals to calculate percentage, but I can do that. It’s the SUM based on column value (by ID) that is giving issue.
I’ve been playing around with nested queries, but nothing’s working. This is a glimpse of the mess that I’ve created trying to sort this out. Many errors.
I just noticed that I used a simpler example than the SQL I included, so I modified it a bit. There are additional fields that I'll need to include, but I want to get the logic working correctly. From there, I can handle the rest. So here's a more appropriate code example showing the direction I'm trying to go with this.
SELECT ID, [Last Name], [First Name], CD, Present, Absent, CAST(LEFT(Present / (Absent + Present) * 100, 5) AS varchar) + '%' AS Percentage FROM (SELECT ID, CD, TotalAHD, CAST ((SELECT SUM(TotalAHD) AS Expr1 FROM SumAHDforAttndPercentages AS p
I have a one to many relationship between Flag and StudentFlag. I'm wanting to select each Flag.FlagID that exist as a column that contains the StudentFlag.Value per StudentFlag.StudentID (or null for that column if that StudentFlag row doesn't exist).
This single column appearing multple times in a single dataset has seemed difficult in a select statement. Is it posible in T-SQL?
Tables, Keys, and Relationships
CREATE TABLE [dbo].[Flag] ( [FlagID] [int] NOT NULL , [FlagName] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ) ON [PRIMARY] GO
CREATE TABLE [dbo].[StudentFlag] ( [StudentFlagID] [int] NOT NULL , [FlagID] [int] NULL , [StudentID] [int] NOT NULL , [FlagValue] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ) ON [PRIMARY] GO
ALTER TABLE [dbo].[Flag] WITH NOCHECK ADD CONSTRAINT [PK_Flag] PRIMARY KEY CLUSTERED ( [FlagID] ) ON [PRIMARY] GO
ALTER TABLE [dbo].[StudentFlag] WITH NOCHECK ADD CONSTRAINT [PK_StudentFlag] PRIMARY KEY CLUSTERED ( [StudentFlagID] ) ON [PRIMARY] GO
ALTER TABLE [dbo].[StudentFlag] ADD CONSTRAINT [FK_StudentFlag_Flag] FOREIGN KEY ( [FlagID] ) REFERENCES [dbo].[Flag] ( [FlagID] ) GO
I want to select columns from different tables into a single table...Not sure if a temp table is suited for this and if so how I should implement it (NOTE: this query will be executed many times by different users at the same time, so I'd rather avoid temp tables!)I have:TABLE1idfirstnamedescriptioncreatedateTABLE2idcarnamespecificationsimportdateNow, I want a resultset that has the columns (columns from other tables from which the values should be retreived are behind the desired columns):id (TABLE1.id, TABLE2.id)title (TABLE1.firstname , TABLE2.carname)description (TABLE1.description , TABLE2.sepcifications)date (TABLE1.createdate , TABLE2.importdate)Thanks!
I have two tables that have no relation. However, both have a column which has a field of nvarchar(50) that I want to retrieve together in one operation and bind to a DropDownList in a sorted fashion. So, what I'm trying to achieve is this: 1. SELECT name FROM table1 2. SELECT name FROM table2 3. Join the two results together and order them alphabetically 4. Return the result set I'm not sure how to do this or even if it's possible. Ideally I'm hoping it can be done in a stored proc.
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
Is it possible in the SSRS Report Designer to rotate a textbox to run vertically, or simply to rotate the text in a textbox ? I have only seen this done within axes lables of charts, but not text boxes.
hi, i am having 2 columns in a table in a dataset. i want to add those two columns and bind the resultant total as a single column to the datagrid. is it possible. if yes, how o acheive this? please help me. thanks in advance. muppidi.
SELECT 'Type'[Type] ,CASE WHEN code='09' THEN SUM(Amt/100) ELSE 0 END ,CASE WHEN code='10' THEN SUM(Amt/100) ELSE 0 END ,CASE WHEN code='11' THEN SUM(Amt/100) ELSE 0 END ,CASE WHEN code='12' THEN SUM(Amt/100) ELSE 0 END FROM Table1 WHERE (Code BETWEEN '09' AND '12') GROUP BY Code
and the output
Column 1 Column 2 Column 3 Column 4 Type 14022731.60 0.00 0.00 0.00 Type 0.00 4749072.19 0.00 0.00 Type 0.00 0.00 149214.04 0.00 Type 0.00 0.00 0.00 792210.10
How can I modify the query to come up with output below,
I have multiple databases in the server and all my databases have tables: stdVersions, stdChangeLog. The stdVersions table have field called DatabaseVersion which stored the version of the database. The stdChangeLog table have a field called ChangedOn which stored the date of any change made in the database.
I need to write a query/stored procedure/function that will return all the database names, version and the date changed on. The results should look something like this:
I have a scenario which I am not able to figure out how to do it better for quite some time.
Assume I have a few rows of data : RunningID Date WOid 1234 1/23/2007 23 1236 1/24/2007 23 1239 1/2/2007 24 1222 1/4/2007 23 1321 2/4/2007 22
My objective is to merge all RunningID into a single cell when WOid is the same (this will most probably use a "group by" to get the different WOid out). Maybe some aggregate function that can do it as: select ReturnConca(RunningID, "#") as RunningID_str, max(Date) as MaxDate, max(WOid) as WO from tableXXX group by WOid
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?
I'm currently working on a report and have all the requirements taken care of save one. I need to flip my text 180 degrees. I have seen how to do this by making an image on the fly and then rotating the image, etc. And that is what we previously had in place.
Unfortunately the reports are getting so large (20 images on a page, 150 pages for the report) that the reports will not print in their entirety through Citrix and cuts off after about 120 pages.
I also tried using upside down fonts which won't work as they flip the letter on a X axis as opposed to rotating them along a pivot. Sadly we can't reduce the number of occurrences per page or decrease the page count. So those are not options. They were the first things I asked about.
I have multiple databases in the server and all my databases have tables: stdVersions, stdChangeLog. The stdVersions table have field called DatabaseVersion which stored the version of the database. The stdChangeLog table have a field called ChangedOn which stored the date of any change made in the database.
I need to write a query/stored procedure/function that will return all the database names, version and the date changed on. The results should look something like this:
I have a description field in a table which also stores unit of measure in the same column but with some space between them, I need to split these into two different columns.
i would like to show all Labels available in a Chart and rotate the Labels 90°. How can i do that ? I changed the Propertie "Interval" to 1, "LabelsAngle" to 90, "LabelsAutoFitDisabled" to true in my Chart Axis.
I am trying to insert values in a single table with four columns from 4 different sources. is it possible to run these 4 insertions in parallel. all these insertion are independent of each other
I have a data flow task in which there is a OLEDB source, derived column item, and a oledb destination. My source is a SQL command, that returns some values. I have some values, that I define in the derived columns, and set default values under the expression column. My question is, I also have some destination columns which in my OLEDB destination need another SQL command. How would I do that? Can I attach two or more OLEDB sources to one destination? How would I accomplish that? Thanks