Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by techytechy

  1. techytechy

    Not filtering out Null Values from a column

    Hi Guys, I am using crystal Reports X1 r2. From a column that has null values too in some of its rows I would like to filter out some rows. In the result I dont want Null value records to be filtered out along with others in the filter criteria. For Eg: MyResult: ------------------ Col1...
  2. techytechy

    fn to split concatenated and delimited string into seperate columns

    Tried the function with the params below. Doesnt Work. My parameter will be passed exactly as in below. Its one string parameter select * from fn_split('code1-Region1, code2-region2') Appreciate your further help Thanks
  3. techytechy

    Delete records scenario

    Thanks so much
  4. techytechy

    Delete records scenario

    Though your query below works fine but I didnot understand Why it should be "delete T from @test_ab T" Why not "delete from @test_ab T" work? delete T from @test_ab T inner join (select Names, COUNT(distinct(Status)) as StatusCount, SUM(Case when Status = 'Good' then 1 end) as...
  5. techytechy

    Delete records scenario

    checked your code with cte but it doesnt work: heres the result: -------------- declare @test_ab table( code int ,Names varchar(128),status varchar(128)) insert @test_ab select * from (select 1 as Code, 'Name1' as Names, 'Good' as status UNION all select 1 as Code, 'Name1' as Names, 'Bad' as...
  6. techytechy

    Delete records scenario

    Why this doesnt work? ------------------- declare @test_ab table ( code int , Names varchar(128), status varchar(128) ) insert @test_ab select * from (select 1 as Code, 'Name1' as Names, 'Good' as status UNION all select 1 as Code, 'Name1' as Names, 'Bad' as status UNION all select 2 as...
  7. techytechy

    Delete records scenario

    Hi Guys, Need query help with this scenario. T ------------------------------------ ID Code Name status -------------------------------------- 1 1 Name1 Good 2 2 Name2 Bad 3 1 Name1 Bad ... ... -----------------------------------...
  8. techytechy

    Help with this scenario

    Hi guys, Need help with writing the query with this scenario: myTable: --------------------------- ID Name status --------------------------- 1 Name1 good 2 Name2 bad ... 3 Name1 Bad 4 Name1 worst ----------------------------- If a...
  9. techytechy

    pass multiple values in param using the lov from the Business view

    Hi guys, I know that passing multiple values in parameters using static list sends the parameter values in one comma seperated string like 'Usa, canada, mexico' to the stored procedure. But if we pass multiple values in parameters using the dynamic lov coming from the Business views, does...
  10. techytechy

    fn to split concatenated and delimited string into seperate columns

    Hi guys, Need a function to split concatenated and delimited string into seperate columns Input to the function is one string like: Fn('code1-Region1, code1-Region2, code2-region1, .....') in the above Concatenation is '-' and delimiter is ',' Need output as OutputTable1...
  11. techytechy

    passing table orcolumns as input parameters to a UDF in sqlserver2005

    I tried many times as syntax below , adding schema names etc but sql server 2005 throws error: Incorrect syntax near '.'. whats wrong with this syntax? select * from Table1 as T1 cross apply dbo.fn_test (T1.Col1, T1.Col2) F thanks
  12. techytechy

    passing table orcolumns as input parameters to a UDF in sqlserver2005

    Thanks Markros! Its not working in my case. May be the definition in the myUDF is not compatible to take in the params. Its a table-valued function. Below is my definition: CREATE FUNCTION [fn_test] ( @param1 VARCHAR(128) ,@param2 VARCHAR(128) ) RETURNS @test TABLE ( col1...
  13. techytechy

    passing table orcolumns as input parameters to a UDF in sqlserver2005

    Hi Guys, I m using sqlserver2005. Need to know the syntax to pass a table or table variable or temp table or column to a User defined function. I am not able to find a document that says we could. One document says we got to use cross apply? Thanks
  14. techytechy

    Derived table, UDF , Prompts

    Hi guys, In our company we have been using prompts in the derived tables. Derived table would return Single final select statement. Now that report requirements are complex we would have to use table variables, UDFs, and many select, delete, update statements. How should we handle many such...

Part and Inventory Search

Back
Top