Wednesday, March 21, 2012
Need child TABLE object to ref diff DATASET than parent LIST object.
Looked and looked for a similar thread - but no real "keyword" for
this issue.
Here's the situation; imagine you have customers and one database
table has demographic information while another database table has a
list of customer orders. Now you want a report that shows all that on
a document map-driven report.
Here's the page layout:
LIST OBJECT // DATASET(dsDemographics) GROUPBY(customer)
DOCMAP(customer)
>> TABLE OBJECT DATASET(dsDemographics) GROUPBY()
>> TABLE OBJECT DATASET(dsOrders) GROUPBY(orderdate)
>> TABLE OBJECT DATASET(dsTickets) GROUPBY(createdate)
Here's the problem: the second table containing orders will not
reference the dsOrders DATASET unless through aggregations - which is
obviously not what I am wanting to do. I want to list all the orders
for the current customer. Same problem with the third table - and
others.
Now, I see the problem is very clear. The orders DATASET does not know
how to filter itself on the current customer. That much I understand.
How do I do it?
Thanks in advance, JerrySounds like your needing to join the datasets. Easiest way would be to join
the data prior to pulling it into RS because, as you noted, RS can only join
data from one dataset to another using an aggregate. If one of your
datasets is SQL, you might use a linked server to pre-join your data.
--
-- "This posting is provided 'AS IS' with no warranties, and confers no
rights."
jhmiller@.online.microsoft.com
"Jerry Nixon" <jerrynixon@.gmail.com> wrote in message
news:36f558cf.0410221151.4074f9f8@.posting.google.com...
> Dang, I wish I had figured this out without having to ask.
> Looked and looked for a similar thread - but no real "keyword" for
> this issue.
> Here's the situation; imagine you have customers and one database
> table has demographic information while another database table has a
> list of customer orders. Now you want a report that shows all that on
> a document map-driven report.
> Here's the page layout:
> LIST OBJECT // DATASET(dsDemographics) GROUPBY(customer)
> DOCMAP(customer)
>> TABLE OBJECT DATASET(dsDemographics) GROUPBY()
>> TABLE OBJECT DATASET(dsOrders) GROUPBY(orderdate)
>> TABLE OBJECT DATASET(dsTickets) GROUPBY(createdate)
> Here's the problem: the second table containing orders will not
> reference the dsOrders DATASET unless through aggregations - which is
> obviously not what I am wanting to do. I want to list all the orders
> for the current customer. Same problem with the third table - and
> others.
> Now, I see the problem is very clear. The orders DATASET does not know
> how to filter itself on the current customer. That much I understand.
> How do I do it?
> Thanks in advance, Jerry
Wednesday, March 7, 2012
need a remote bcp or similar utility
Kevin,
for bcp.exe it doesn't matter whehter the data files or database servers are
remote or local. So, you should be able to load your data with no problem.
Tengiz Khartishvili
SQL Server Storage Engine
This posting is provided "as is" with no warranties and confers no rights.
"Kevin" <anonymous@.discussions.microsoft.com> wrote in message
news:9D3090CE-91A8-42B1-8C40-928FC0DC33EC@.microsoft.com...
> We are looking for a way to load a database with bcp during an install.
The catch is that the input file and the install (which would kick off the
bcp load) can be on a different machine than the database (and the bcp.exe).
Any ideas?
Saturday, February 25, 2012
Need a function
function in VB. I haven't seen anything in the help files that I can
use. Does anyone have any suggestions?
Here's what I'm trying to do:
There is a field in a table that will look something like this -
"XXXXXX - YY".
I want to separate it on the dash and get two strings out of it -
"XXXXXX" and "YY". I'm trying to keep it all in a stored procedure
and avoid a vb script or exe.
I'm envisioning something like this:
declare @.CDT datetime
select @.CDT = createdatetime from imOrderHdr
where VendorCode = 'SYG' and createdatetime is not null
and status in (1,2,3)
select d.VendorStockNumber, substring(i.ItemDescription, 1,
instr(iItemDescription, '-') - 1),
substring(i.ItemDescription, instr(iItemDescription, '-') + 1),
d.QtyOrdered, d.PurchasePrice, (d.QtyOrdered * d.PurchasePrice) as
Extension
from imOrderDetail d
join imItem i on i.ItemCode = d.ItemCode
where d.CreateDateTime = @.CDT
I'd write my own function, but the computers this will be run on have
SQL 7.
Any suggestions will be appreciated.
Thanks!
JenniferHave a look at CHARINDEX and PATINDEX to get the positions that you need for
subsequest SUBSTRING calls to parse out your data.
"Jennifer" <jennifer1970@.hotmail.com> wrote in message
news:3358f49d.0308150815.2a818c27@.posting.google.c om...
> I'm looking for a string function that is similar to the INSTR
> function in VB. I haven't seen anything in the help files that I can
> use. Does anyone have any suggestions?
> Here's what I'm trying to do:
> There is a field in a table that will look something like this -
> "XXXXXX - YY".
> I want to separate it on the dash and get two strings out of it -
> "XXXXXX" and "YY". I'm trying to keep it all in a stored procedure
> and avoid a vb script or exe.
> I'm envisioning something like this:
> declare @.CDT datetime
> select @.CDT = createdatetime from imOrderHdr
> where VendorCode = 'SYG' and createdatetime is not null
> and status in (1,2,3)
> select d.VendorStockNumber, substring(i.ItemDescription, 1,
> instr(iItemDescription, '-') - 1),
> substring(i.ItemDescription, instr(iItemDescription, '-') + 1),
> d.QtyOrdered, d.PurchasePrice, (d.QtyOrdered * d.PurchasePrice) as
> Extension
> from imOrderDetail d
> join imItem i on i.ItemCode = d.ItemCode
> where d.CreateDateTime = @.CDT
> I'd write my own function, but the computers this will be run on have
> SQL 7.
> Any suggestions will be appreciated.
> Thanks!
> Jennifer