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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  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...
  15. techytechy

    Sql to Find every 15th row in each group, sql server

    Thanks for the responses! The solution using rank() and partition looks clean. so will go with that. Though the above solution (@RyanEK) for 2000 works fine too. Thx
  16. techytechy

    Sql to Find every 15th row in each group, sql server

    Thanks for comments. @bborissov, @markros I got to order by Admitdate in Asc within each group PatientID and get the row at 15th Admitdate. We havent used the server specific analytical functions or temp tables yet in our queries, we have always been writing old style sql queries that return...
  17. techytechy

    Sql to Find every 15th row in each group, sql server

    Hi guys, I am Using sql server 2005 and I need to find the values at every 15th date in each group of a table. Below is the Table "Orders". I am grouping on PatientID PatientID, AdmitDate, treatment ------------------------------- 1, Date1, Treatment1 1, Date2, Treatment2 .... .... 1, Date15...
  18. techytechy

    Infering the Join Type

    Hi guys, I know that I shud use Left outer if the requirement says that I need to get all the records of the left Table(matching or nonmatching). But when such requirement is not given, then how would one infer that Left outer shud be performed? Does the table structures or cordinality or...
  19. techytechy

    finding Universe name

    Hi Guys, I opened an existing DeskI report and was not able to find the universe name that its pointing to. Please let me know how to find out the Universe name? Thanks

Part and Inventory Search

Back
Top