Viewing 15 posts - 46 through 60 (of 79 total)
No way to handle that in sql.
use xp_cmdshell to exec procedure using osql or isqlw. capture results of xp_cmdshell. parse the text.
create #t(t varchar(255), ln int identity)
insert #t...
November 12, 2004 at 1:29 pm
You probably weren't running from the tempdb database. Just use a full path to the table: tempdb.dbo.syscolumns.
November 12, 2004 at 12:49 pm
Keep tblStage2. Add an identity column and make that the primary key. Add indexes on the columns you will need for querying - probably ip, username, division, code, date/time.
If...
November 12, 2004 at 10:37 am
Use openrowset and syscolumns.
select *
into #t
from openrowset('SQLOLEDB','server';'login';'password','exec tempdb.dbo.test')
select number_of_columns = count(*) from syscolumns where id = object_id('#t')
Assuming procedures always return only one resultset.
November 12, 2004 at 9:39 am
It's not clear, but maybe you're asking for a simple join?
select T1_ID, T1_COL, field1, field2, field3
from T1 inner join F1 on (T1.T1_ID = F1.F1_ID)
November 11, 2004 at 6:29 pm
I see your point and it's a good one. Do you need that functionality for date, time, and bytes?
If you are just reporting, I'd say just use the "select...
November 11, 2004 at 6:20 pm
The actual data and how it is used really determines how to structure it. Unfortunately, I'm familiar with neither.
Just looking at the tblStage2, I see no reason to split it...
November 10, 2004 at 8:28 pm
Your "normalized" table structure looks whacky.
November 9, 2004 at 4:20 pm
I haven't heard of anything to automatically do that type of transformation. Forget the trigger; it just makes the work more complicated. Add some additional steps to copy data in...
November 9, 2004 at 4:17 pm
I've done mass updates like that by using smaller batches and explicit transactions. You just need to figure out how to break up the big query into a bunch of...
November 9, 2004 at 4:06 pm
If your search is returning a huge resultset, I can see why the union would take so much longer than the three individual selects. The union has to get rid...
November 9, 2004 at 3:40 pm
You need some other unique identifier in the table. An identity column is best because no one can change it.
If you expect only one row is updated at a...
October 27, 2004 at 6:04 pm
select
col1,
col2 = case col2 when 'INP' then col2 end,
col3 = case col2 when 'OVL' then col2 end
from Table1
October 27, 2004 at 1:27 pm
Need a unique key on CustomerInfo. I'll assume it's CustInfoID. I'll also assume that the "first" record means the one with the lowest CustInfoID.
select *
from Customer
left join CustomerInfo
on (CustomerInfo.CustID =...
October 27, 2004 at 9:50 am
Your question is too general. There are a great many ways to do what you ask. Specify your client environment, where do the images come from and where will they...
October 25, 2004 at 8:18 am
Viewing 15 posts - 46 through 60 (of 79 total)