Viewing 15 posts - 226 through 240 (of 291 total)
Based on the dates I figured his interview had already passed, and based on his attempted answers he probably bombed badly and has moved on to another project. Though in...
May 17, 2007 at 8:51 am
--You need SQL 2005 for this, but the following accomplishes what you want:
--create an "in-memory" test table
declare @t1_ table (col1_ int, col2_ char(1))
--Populate the test table with your data
insert into ...
May 17, 2007 at 7:48 am
1. Are you sure there is data in the "Scheduled_Appointment" table for the date tested? (if not then where clause/join fails)
2. If #1 is true are you sure there is...
May 17, 2007 at 7:12 am
Jeff: Yep, that's simpler and better. Nice call. If he can't alter the orginal SP he shoud be able to create a second one that calls the first one and...
May 17, 2007 at 6:40 am
Since you didn't give an example of the output expected this is my best guess based on the information provided:
set datefirst 1 --1 = Monday, 2 = Tuesday, etc
select min(date_)...
May 17, 2007 at 6:36 am
Jeff: Nice! But maybe just one little cast to get the decimal to round to 2 places ![]()
May 17, 2007 at 6:11 am
It still goes back to the basics. When running the BCP command from the command line are you on your workstation or the server? the xp_cmdshell is going to run...
May 17, 2007 at 6:02 am
Using your example data, the following should work
BEGIN
set nocount on
declare @ProviderLink table (PLid varchar(10), PLworkRequestID varchar(10), PLcurrentStatus int, PLtat int, PLunworkable int)
insert into @ProviderLink values ('PL203602', 'WR27904', 90, 39, 73)
insert...
May 16, 2007 at 1:31 pm
use the CHARINDEX string function.
EXAMPLE:
BEGIN
declare @t_ table (col1_ varchar(20))
insert into @t_ values ('12345xxxx')
insert into @t_ values ('12345 xxxx')
insert into @t_ values ('1234 5xxxx')
insert into @t_ values ('12345yyyy')
select * from @t_
update...
May 16, 2007 at 12:54 pm
What is (pl.pltat + pl.plunworkable) > '75' supposed to do? That actually ends that part of the statement and the "AS DECIMAL" accomplishes nothing.
I guess I should have looked...
May 16, 2007 at 12:46 pm
Change your last line to the following:
AND (cast(((PL.Pltat + PL.Plunworkable) > '75' AS decimal) / COUNT(*) * 100) as decimal(5,2))
the "as" clause as you were using it was trying...
May 16, 2007 at 12:26 pm
First hire someone who knows how to design a database in 3rd normal form. I would hate to see what the rest of your database looks like.
If you must...
May 16, 2007 at 11:47 am
Ok, I found a work around. Instead of using osql I used isqlw with a -C option and specified a configuration file that I created with Query Analyzer (tools,options),...
May 16, 2007 at 9:50 am
I am able to replicate his problem. I created a quick SP:
if exists (select 1 from sysobjects where id = object_id('uspTest_') and type = 'P') drop procedure uspTest_
go
create procedure...
May 16, 2007 at 9:28 am
It would be helpful to see the actaul SP. Try adding -O (that is a capital O as an additional parameter to the osql call. That option prevents...
May 16, 2007 at 7:18 am
Viewing 15 posts - 226 through 240 (of 291 total)