Viewing 15 posts - 91 through 105 (of 109 total)
Arr... now the light is shining. You want
SELECT DISTINCT zzoordrh.BILL_NUM
,zzoctnph.DIVISION
,zzoordrh.CARTON AS NoCartons
,zzoordrh.ORD_NUM
,zzoordrh.PO_NUM
,zzoordrh.STORE
,zzoctnph.carton_num AS UCC128
,SUM(zzoctnpd.total_qty) AS CRTNQty
,zzoctnph.CARTON_WGT
,zzoctnph.CARTON_SEQ
,zzxdistr.center_name AS DC
,zzxdistr.address1 AS DCaddress1
,zzxdistr.address2 AS DCaddress2
,zzxdistr.city AS DCcity
,zzxdistr.state AS DCstate
,zzxdistr.zipcode AS DCzip
,zzxshipr.scac_code
,zzxstorr.store_name...
November 21, 2012 at 9:01 pm
Try this...
declare @date datetime
set @date = round(cast(getdate() as float),0,1)
SELECT
A.a_id,
C.c_id,
B.b_id,
D.d_id,
E.e_id,
F.g_id
FROM table_G G
INNER JOIN
table_A A
ON A.a_id = G.a_id and a.Created <...
November 16, 2012 at 5:56 am
select
case ELEMENT
when '18' then
case when SEGMENT='SLN' AND QUALIFIER='PL'
then Value
end
end as Line_no,
case ELEMENT
when '05' then
case when ...
November 12, 2012 at 4:21 pm
insert into table_that_needs_number (number) select a.Client1Number from (update controlfile set Client1Number = Client1Number +1 output inserted.Client1Number ) a
gets it all into one statement which will even work with implicit transactions...
November 7, 2012 at 5:24 am
Well, now I'm completely confused. I know how to do what you want to do, I just have no idea why you want to do it. If you want to...
November 5, 2012 at 8:00 pm
There are no quotes around the names of your fruits so they are being interpreted as column names.
if the string you passed in was like this,
set @sql =...
November 4, 2012 at 5:09 pm
.Value is nice to put there too, but the important place to put it is at the end of the SqlString variables you're passing in.
not
...
November 4, 2012 at 3:19 pm
Having thought about the possibility of deadlock, I think it might be better to go like this - puts it all in one sql statement.
CREATE TABLE [dbo].[controlFile](
[Client1Number] [bigint] NULL default...
November 4, 2012 at 3:11 pm
It occurred to me later it could be simplified to
insert into table_that_needs_number (number) select a.number from (update controlfile set number= number+1 output inserted.number) a
seems to me that would be...
November 4, 2012 at 3:04 pm
Odd. I just tried it in the exact same tool and it performed flawlessly. You did use the proc inside another proc - and in that proc it was between...
November 4, 2012 at 1:45 pm
putting the proc inside a transaction eliminates that possibility.
November 4, 2012 at 1:25 pm
By "customers" I'm guessing you mean "unique sets of invoice numbers". If that is what you mean, you just need an additional column in the same table for each set...
November 4, 2012 at 1:23 pm
I guess it all depends on what is meant by, "I cannot use ID column, don't ask why, but for example after delete operations I cannot take ID counter back."...
November 4, 2012 at 11:39 am
I'm not certain about VB but in C# the parameters are passed in by reference. Also, for SqlString you have to refer to them as follows:
...
November 4, 2012 at 8:57 am
Aaaand... the 2008 version
alter view [dbo].[vwDependencies2008] as
with vw_deps (Name, object_id,parent_id,Type,DepServer,DepSchema,DepAction,DepTable,DepColumn,Type2,SelectedFrom,Updates,SelectStarFrom)
as(
select
o.[name],o.object_id,o2.object_id parent_id,
o.type_desc type,
d.referenced_server_name DepServer,
d.referenced_schema_name...
November 2, 2012 at 9:04 pm
Viewing 15 posts - 91 through 105 (of 109 total)