Viewing 15 posts - 271 through 285 (of 413 total)
Been to Montreal twice, nice city
This should deal with your table
create table Lines
(
Seq int,
Line nvarchar(4000)
)
go
declare @Query...
September 8, 2005 at 4:14 am
You're welcome. I'm from Denmark.
lviv must be a column in table @tbl, that may be why GilaMonster's code isn't working... Replacing
SELECT lookupvalue
by
SELECT lookupvalue, lviv
may fix the problem...
September 7, 2005 at 4:59 am
Kenneth's solution may be faster than mine, I have absolutely no idea, but please let us know what you find out...
September 7, 2005 at 4:09 am
Whoups
I guess it should have been
SET NOCOUNT ON
DECLARE @lvido nvarchar(125)
DECLARE @tbl nvarchar(125)
DECLARE @sql nvarchar(1000)
SET @tbl='(SELECT lookupvalue, lvid FROM fieldtable WHERE...
September 7, 2005 at 4:04 am
Beat me there... My solution:
SET NOCOUNT ON
DECLARE @lvido nvarchar(125)
DECLARE @tbl nvarchar(125)
DECLARE @sql nvarchar(1000)
SET @tbl='(SELECT lookupvalue FROM fieldtable WHERE fieldname=''Department'')'
September 7, 2005 at 3:52 am
You should probably do it the other way round (as someone pointed out to me eariler on SSC )
select value1,value2,value3 from table...
September 6, 2005 at 8:38 am
Got me there
You are from Quebec, I guess (changing the subject )?
September 6, 2005 at 7:12 am
I think I can live with the 8000 character limit
Especially if it means that my code is easier to read... I still...
September 6, 2005 at 7:01 am
I think my solution is faster than Roelof's solution... The cursor part of my solution will take less than 1 second, and after that there is "only" a single update statement...
September 6, 2005 at 6:49 am
Thanks, David, not the first time I have learned something from you
September 6, 2005 at 6:38 am
I guess that studentID should be recordID in your table(s) I also assume the databases are on the same server.
I haven't tested anything,...
September 6, 2005 at 5:18 am
I like Roelof's solution But instead of building and executing an update statement for each text column of the table, it's probably faster to...
September 6, 2005 at 3:10 am
Last attempt for now, I think
create table DataTable
( company char(1) not null,
ordernum int not null,
sku int not null
)
go
create clustered index DataTableIndex on DataTable(company,...
September 6, 2005 at 2:37 am
Smruti, it's a bit hard to follow you now that you have changed the column names of your tables
You have stated 3 tables...
September 6, 2005 at 2:18 am
Been doing some more thinking Try this:
create table #x
( company char(1) not null,
ordernum int not null,
sku int not null
)
create table #y
( company char(1)...
September 5, 2005 at 7:54 am
Viewing 15 posts - 271 through 285 (of 413 total)