Viewing 15 posts - 5,191 through 5,205 (of 7,191 total)
Joy Smith San (7/29/2011)
Problem is we can't create function or any other objects in client's DB.
If this is a one-off, you can create the function in tempdb. Or...
July 29, 2011 at 6:54 am
If you want to join to the results of a table valued function, use CROSS APPLY or OUTER APPLY. Please post DDL, sample data, results and expected results if...
July 29, 2011 at 4:39 am
Please can we have a CREATE TABLE statement for Table1, sample data in the form of INSERT statements, and what results you expect to see.
Thanks
John
July 29, 2011 at 4:20 am
You could wait for Jason to come back to you... in the meantime, have you tried my solution?
John
July 29, 2011 at 4:15 am
Right, you should be able to solve that one yourself. Look at the function definition - how many arguments are required?
You call a table valued function like this:
SELECT <column...
July 29, 2011 at 2:50 am
Does it work if you change the last line something like this?
Select * From Table1 where level IN (SELECT Item FROM dbo.DelimitedSplit8K(@Level))
John
July 29, 2011 at 2:35 am
The function definition is there in Lowell's second block of code. You need to create the function before the first block of code will work. By the way,...
July 29, 2011 at 2:21 am
Unfortunately you can't do it as simply as that. You could use dynamic SQL, but that has many pitfalls. The best thing to do is use a splitter...
July 28, 2011 at 9:42 am
I'd apply directly if you have that option. That way, you don't have to undergo screening by a recruiter who may not understand the technical specifications of the position....
July 28, 2011 at 9:13 am
It's because you're grouping on the duration. Quick fix: remove that item from the GROUP BY statement. Proper fix:
(1) Remove NOLOCK, unless you don't mind the possibility of...
July 28, 2011 at 6:29 am
What didn't? You've been provided with at least two solutions. Please post an error message if there was one, otherwise sample data and expected results.
John
July 28, 2011 at 4:47 am
kotteesh (7/28/2011)
Hope I answered your question
Unfortunately not. It's difficult to visualise when you describe it in words. Please will you take the result set I posted, and change...
July 28, 2011 at 2:31 am
Jason, your code will no doubt work in most circumstances, but consider the following sample data - it produces strange results:
SELECT 1, '1000000.1.55.3366'
UNION
...
July 28, 2011 at 2:00 am
Here's one that doesn't use a WHILE loop, and should work a version component of any size (up to the int limit). It does assume that there will be...
July 27, 2011 at 10:20 am
Thanks. Here are the results I get with your query:
personnumpersonfullnamestore_numberregionhoursACCRUALPRFLNAMEaccrualprofileidAPPLYDATE
100242589Will Smith0523MIDSOUTH REGION1.0000000US PT HOURLY207/27/2011
100244250Adam Sandler4759MIDSOUTH REGION4.5000000US FT HOURLY107/27/2011
100325669Daniel Grower0121MIDSOUTH REGION4.3333333US PT HOURLY207/27/2011
100536236Russell Crowe0123MIDSOUTH REGION3.5000000US PT HOURLY207/27/2011
100549823JOHN SMITH0523MIDSOUTH REGION4.3333333US PT...
July 27, 2011 at 6:43 am
Viewing 15 posts - 5,191 through 5,205 (of 7,191 total)