I have a table containing user-account permissions and I\'m trying to write a query to return one row for each user-account combination.
I have a one row table returned from a query that looks something like this [Date1] [Date2] [Date3] [Date4] [Date5] [Date6]
My base table is like: ColumnA|ColumnB --------------- A|C1 A|C2 A|C3 B|C1 B|C3 C|C4 I want to read records from the base table and write开发者_运维问答 it into the below table:
Need help with the pivot clause in sql server 2008. I have a table with this info: WeeknoDayOfWeekFromTimeToTime
I want to display rows as column in SQL Server. My table looks like this: images_iditem_idimages_name -------------------------------
i have a table with the following information CREATE TABLE [dbo].[HR_DEPENDENTS]( [PARENT_ID][bigint]NOT NULL,
I am trying to truncate dates to only get year/month as opposed to the form they are in which is year/month/day.time
Could you help me to check as below: DECLARE @tblCity TABLE (CityID INT, CityName VARCHAR(100)) DECLARE @tblHotel TABLE (HotelID INT, HotelName VARCHAR(100))
Been trying to put together an SQL query that sorts data into financial years (which I\'ve sorted) and then SUMs it according to each distinct value in the开发者_JS百科 claim_id column
I have this XML in T-SQL: <Elements> <Element> <Index>1</Index> <T开发者_Python百科ype>A</Type>