[Solved] String or binary data would be truncated when using it in a stored procedure

You are trying to insert 5 length character(‘dfdfg’) into your 1 length column [Access] [nvarchar](1). Increase the value of your column in Table type. CREATE TYPE [dbo].[AccessLevel] AS TABLE( [RoleId] [int] NULL, [Access] [nvarchar](25) NULL, [IsDelete] [bit] NULL ) GO solved String or binary data would be truncated when using it in a stored procedure

[Solved] Oracle : YEAR Keyword invalid

Oracle doesn’t have a year() function. You seem to have got that syntax from a different database (like MySQL). You can use the extract() function instead: select * from MIS_PERMAL.MV_INDEX_PERFORMANCE where index_id = 1045 and EXTRACT(YEAR from PRICE_DATE) = 2014 1 solved Oracle : YEAR Keyword invalid

[Solved] SQL Query – Need some assistance with a query [closed]

One way of doing this is to filter your select by using a subselect in the where clause. I did this really fast just to demonstrate: select * from manufacturer m inner join manufacturer_has_product mhp on m.manufacturer_id = m.manufacturer_id inner join product p on mhp.product_id = p.product_id where m.manufacturer_id in ( select m.manufacturer_id from manufacturer … Read more

[Solved] have multiple columns need to display column type with other column in rows

Your data does not match your desired results. Here is what I believe you want: create table deleteme_tbl(department int, title varchar2(20), mydate date); insert into deleteme_tbl values( 1,’One’, date ‘2016-01-01′); insert into deleteme_tbl values( 1,’Two’, date ‘2016-04-01′); insert into deleteme_tbl values( 1,’three’, date ‘2016-02-02′); insert into deleteme_tbl values( 2,’five’, date ‘2016-04-04’); insert into deleteme_tbl values( … Read more

[Solved] multiply and SUM() MS SQL

@fia Maybe you should do your calculation elsewhere first for example on paper or in Excel to ensure you know exactly what you should get. It would also help you figure out the order of the calculation before writing it in SQL. According to the figures shown the values you’ve stated seems to be correct … Read more