Viewing 14 posts - 1 through 14 (of 14 total)
Kyle:
Try
select datepart(d,t1.dt), min(t1.dt) from crudefilo as t1
inner join crudefilo as t2 on t1.dt=t2.dt
Where t1.dt > DatePart(Day, DateAdd(day,-30,GetDate()))
group by datepart(d,t1.dt)
You might choose a different value to return as the base...
November 22, 2004 at 3:20 pm
Yes READ UNCOMMITTED would seem to do as you ask
BOL has this to say
READ UNCOMMITTED
Implements dirty read, or isolation level 0 locking, which means that no shared locks are...
November 20, 2004 at 8:38 pm
The null message may be because the CONFIG field is a primary key to the _SMDBA_._CONFIG_ table and thus cannot be null. When you insert into the _SMDBA_._CONFIG_ the value of...
July 16, 2004 at 6:34 pm
If the wizard always loads 50% of the file no matter the size. Concatenate the file onto itself. so your 370K file becomes 740K rows 50% of that will be the whole thing...
July 15, 2004 at 7:51 am
Try an aggregate statement using the Group By statement BOL will be great help figuring out how to use it.
June 23, 2004 at 6:32 pm
Maybe I'm a little dense, but I just can't see where your example dataset shows the linkage between part 7000-B20 and 7000-B30
June 23, 2004 at 6:26 pm
Guess what I was trying to tell you without saying it is thats not really a good to do it.
but in case that's how you really want to go....
Declare @filename...
June 22, 2004 at 2:39 pm
If you have a inventory database with the following structure
InvID int, qty real....
Make a warehouse type table that dimensions this information by date
so the new table will be InventoryByDate
RecordDate datetime,...
June 22, 2004 at 12:30 pm
I'm a little confused by the terminology of the question. As written above to actually return the value of intcount to a process outside the statement a third statement would be needed:
...
June 21, 2004 at 12:38 pm
I would recomend you trace the script yourself with and without the "getdate" and "is not null" statements. There may be many other factors that affect the performance of a...
June 18, 2004 at 6:46 pm
try:
SELECT REPLACE(CONVERT(varchar(11),@theDate,113)' ','-')
06/17/2004
becomes
17-Jun-2004
much simpler than the function above
June 18, 2004 at 6:26 pm
Business logic changes, hopefully with the business. Instead of hard coding the logic create a table that has the values you want to assign using FullOrderNumber as the primary key and...
June 18, 2004 at 6:11 pm
make sure to check out index usage in the execution plan. If the optimizer can't find an appropriate index to make the query plan it'll be forced to do a...
June 15, 2004 at 11:42 am
Try using Dynamic SQL
Define a variable @dsql as varchar(1000)
On the inside of your cursor loop
SET @dsql = 'INSERT INTO ' + @Code_tab + ' VALUES (@New_code, @seq_num,...
June 15, 2004 at 7:01 am
Viewing 14 posts - 1 through 14 (of 14 total)