I have tried this too but it returns no columns…
SELECT ID,WCID, Material_Group, MRP_Controller, Description
FROM PERF_Performance as t
cross apply dbo.perf_test(t.WCID,t.Material_Group,t.MRP_Controller,t.Description) as f
This what i’ve done so far... I create a function and it runs correctly
ALTER FUNCTION dbo.Perf_test
(
@WcId char (10)
,@MatGroup varchar(10)
,@Mrp varchar (3)
,@Descr varchar(50)
)
RETURNS @table TABLE (Type varchar(4))
AS
BEGIN
declare @Type as...
Hi all,
I have a view and i want to create a function that will return some calculated expressions as columns for each row of the view. Can someone quide me of what kind of T-Sql function am i going to use;
Thank you
In Ms Access I used to have the result of a function in an expression column. The result of the funcion I could use it to a next column.. into a next column and so far… very simply by just writing the name of the column… What I see in action with subquery is that it is not so simply as I used...
Thank's a lot for your help!! The second way is what i need..! So I have to play with subquery. I'll test it and see what am i going to catch..
Thanks!
Hi guys,
Can someone quide me how can i sum two expression collumns into a statement?
a=1
b=2
SELECT 1 AS a, 2 AS b
ok so far. The problem is when i add one more collumn to store the sum. I can't figure whow am i going to phrase into the select statement. The below returns error...
Hi guys
I need your help..
When I close the form I get the message “Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not return any key column information.” at line obj_oledb_da.Update(dataSet). Can someone provide help..?
Thank you
Private...
Thanks for your reply, I really enjoy studying with you.
1)I have a primary key and I’ve left it as is. There is no indexing strategy and I would appreciate if you could tell me a little bit more about it.
2)Yes you are right! When I create the statement I had a group by to check and view...
Hi All,
I have the below SQL Function
ALTER FUNCTION dbo.analosi
(@mmdoc varchar(10),@mmdocyear varchar (4),@UnitA varchar(3),@mmcat varchar(4))
RETURNS float
AS
BEGIN
declare @res int
set @res=0
if @unitA='KG'
select @res=SUM(QKG) FROM RPT.dbo.RPT_MMD
GROUP BY MMDoc, MMDocYear...
I am worried about the next time I may want to change my function I will have to remember all the steps I use it and replace it. My worreid about will be of the possibility to forget a step.
After a google search I couldn’t find an article about how I can make a vb.net function public in a...
Thanks once again for your help
I have a text file and a Sql Server Table. The text file has about 20 rows and the SQL table one row and always will have one row.The value of a specific column and row of text file may corresponds under circumstances to a specific field of the SQL table. So all...
Hi,
I am trying to read a text file with vb.net from SSIS package but it fails on objCom.ExecuteReader(). The error message is below
[Script Component [294]] Error: System.Data.OleDb.OleDbException: Invalid argument. at...