Viewing 15 posts - 31 through 45 (of 94 total)
This is great, SSCrazy. It is exactly what I am looking for.
Short, simple, easy to read, thus easy to maintain.
Thank you!
July 4, 2013 at 8:49 am
Thank you Elliott. That works like a charm.
June 21, 2013 at 1:09 pm
This is what I came up with. Please help optimize it. Thank you!
declare @x varchar(max)
set @x = '<?xml version="1.0" encoding="utf-16" standalone="yes"?><Schedule xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer"><StartDateTime>2013-03-25T16:05:26</StartDateTime><Timezone>CDT</Timezone><WeeklyRecurrence><WeeksInterval>2</WeeksInterval><DaysOfWeek><Sunday>true</Sunday><Monday>false</Monday><Tuesday>true</Tuesday><Wednesday>false</Wednesday><Thursday>false</Thursday><Friday>false</Friday><Saturday>false</Saturday></DaysOfWeek></WeeklyRecurrence></Schedule>'
declare @StartPos int
SELECT @StartPos= PATINDEX('%<Timezone>%', @x)...
May 23, 2013 at 5:32 pm
Looking at the column data type ( varchar max) I suppose it is safe for me to look for <Timezone> and extract what comes after it up to </Timezone>.
I don't...
May 23, 2013 at 5:16 pm
Thank you both! Point taken. I will stay away from with(nolock) hint and will look into computed column.
Personally, I like the view approach. We currently have #2...
May 22, 2013 at 5:45 pm
Thank you! That worked. Now my question is what if on the QuantityRequested is not stored on multiple rows? ( say it is stored only on 1...
April 25, 2013 at 11:20 am
Thank you! It works and is an elegant and cleaner solution.
September 8, 2009 at 8:13 am
Lutz,
Here is a sample of data. Let me know what else I should provide. Thanks!
DECLARE @ListofOrderstoFix table
(OrderID int NOT NULL,
MachineID int NULL)
create table #table1
(OrderId int...
September 7, 2009 at 4:43 pm
Hi,
Here is a simplistic sample of the two tables. Thanks
Table1
PrimaryKey: OrderID
OrderId MachineID
5000 ...
September 7, 2009 at 8:30 am
Thank you Jack for your input. I agree with you.
August 29, 2009 at 9:30 am
declare @CreateDate varchar(50) ,@RowsFound int
set @CreateDate=CONVERT(VARCHAR(30),GetDate(),21)
set @RowsFound=0
select @RowsFound=count(*) from dbo.RECON_MASTER M where
M.INSTANCE=@INSTANCE
and M.ACCOUNT_NAME=@ACCOUNT_NAME
if @RowsFound > 0
Begin
-- last column is col1 ...
May 1, 2008 at 1:08 pm
yes both columns are of data type datetime.
Thanks, I will give it a try.
May 1, 2008 at 10:54 am
Somehow when col1 has 2008-05-01 11:16:23.067 and COLA
has 5/1/2008 11:16:23 AM the equal condition fails ( I think the millisecs) got dropped.
When I did an insert into COLA I did...
May 1, 2008 at 9:41 am
Thank you both Travis and Steve. I can move forward.
April 22, 2008 at 8:03 am
Viewing 15 posts - 31 through 45 (of 94 total)