Viewing 15 posts - 14,056 through 14,070 (of 14,953 total)
I just tried this:
CREATE TABLE [dbo].[tblA](
[pk] [int] IDENTITY(1,1) PRIMARY KEY,
[col1] [varbinary](8) NULL,
[col2] AS (CONVERT([varchar](18),[col1],0)),
[col3] AS ([sys].[fn_varbintohexstr]([col1])),
[col4] AS (CONVERT([varchar](max),[sys].[fn_varbintohexstr]([col1]),0)),
[col5] AS (CONVERT([varchar](18),[sys].[fn_varbintohexstr]([col1]),0)),
[col6] AS (upper(CONVERT([varchar](18),[sys].[fn_varbintohexstr]([col1]),0))))
Then:
insert into dbo.tbla (col1)
select...
April 23, 2008 at 12:30 pm
select (column list)
from dbo.Table
where len(column) > 8
April 23, 2008 at 12:16 pm
The problem is the colum in the Order By. Needs the table alias on it.
The difference is that 80 (SQL 2000) can't order by a column alias, while 90...
April 23, 2008 at 12:14 pm
My point is that, done correctly[/b], high performance code will always have the correct integrity.
(Emphasis added.)
Totally agree with you, so long as that statement is included. But that...
April 23, 2008 at 12:09 pm
Jeff Moden (4/22/2008)
GSquared (4/22/2008)
I would definitely avoid that "speed at all cost" methodology.
Heh... then why have you posted so much on this thread about speed? 😉 The real answer...
April 23, 2008 at 11:54 am
Leo Nosovsky (4/22/2008)
April 23, 2008 at 8:59 am
Grant Fritchey (4/23/2008)
April 23, 2008 at 8:52 am
I just ran a simple test:
create table #NullTest (
ID int identity primary key,
Date datetime)
insert into #nulltest (date)
select
case
when number%10 > 0 then dateadd(day, number, '1/1/2000')
else null
end
from common.dbo.bignumbers
set statistics io...
April 22, 2008 at 3:13 pm
First, I recommending looking into getting SQL Server Integrations Services (SSIS) to import the files into a flat table. Same columns as the files you're importing.
If you're dealing with...
April 22, 2008 at 3:01 pm
If you actually mean DTS, I'm not sure what to do. If you mean SSIS (which I'm assuming because of the forum you posted this in), then take a...
April 22, 2008 at 2:48 pm
I haven't tried this, but would it be possible to drop the identity column from the temp table before you do the insert into the primary table?
Theoretically, that might work....
April 22, 2008 at 2:31 pm
When you query the data, add "Order By display_id desc". The "desc" at the end makes it go from highest to lowest.
That should do what you need.
April 22, 2008 at 2:27 pm
It's a display option. Access "double" = SQL "float". Same storage, same format.
If you're viewing the number on a form, set the display options for the field to...
April 22, 2008 at 2:26 pm
Instead of an after/instead of insert trigger, would it be possible to add a default value to the column?
For example:
alter table MyTable
add constraint DF_Date default (getdate()) for DateColumn
That would make...
April 22, 2008 at 2:23 pm
Piper Skip (4/22/2008)
April 22, 2008 at 2:16 pm
Viewing 15 posts - 14,056 through 14,070 (of 14,953 total)