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...
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
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...
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...
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...
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
...
...
-----------------------------------...
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...
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...
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...
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
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...
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
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...
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
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...
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...
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...
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
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.