Showing posts with label hit. Show all posts
Showing posts with label hit. Show all posts

Thursday, March 29, 2012

Directly edit table data?

Here is a most basic of questions from a past user of Enterprise Manager where I used to simply connect, hit the database, open the data in table view and voila, edit, add or delete table data when such a thing was needed in a pinch.

I've downloaded and installed MS SQL Server Management Studio and worked with the table structure (columns, field types, etc) but cannot for the life of me figure out how to get my hands on the actual data as I used to so simply!

Help! What am I missing! I searched here as well and found entries noting how to build an application to do such a thing, but surely that functionality hadn't been lost, has it?

alyoung *at* bluemarble *dot* net

Just try right-clicking on the desired table and select "Open Table".|||Oh.My.Gosh. How dumb am I!? If only all life's questions could be answered so easily!

Tuesday, March 27, 2012

Dimension, CurrentMember and a hierarchy

Greetings -

I am writing some MDX for a RS report, and seem to have hit a bit of a wall. The business folks keep changing their minds on what hierarchy they want to report from, so I would like to have it as a parameter to the report. Problem is that I don't know if there is a way to get the CurrentMember.Properties('Caption') without explicitly declaring the hierarchy. My MDX:

With Set [MySet] as

StrToSet(@.HierarchyAndMember)

Set [DateSet] as

StrToSet(@.Date, Constrained)

Member [Measures].[Display] as

[Dimension].[Hierarchy Name].CurrentMember.Properties('Caption')

I would like to do StrToSet(@.HierarchyMember).CurrentMember.Properties('caption') here

Select { [measures].[created invoices], [measures].[display] } on 0,

{ [MySet] * [DateSet] } on 1

from [cube]

I have tried several different things, and this is the closest I have found. Placing the StrToSet in either it's own set or directly in the MDX doesn't affect the results. Is there any way to get the current member of the dimension without hardcoding the hierarchy? Does anyone have any creative solutions, or at least any directions to go?

Thanks in advance,

John Hennesey

It turns out that the RS designer is a pain in the sense it wants you to explicitly select a hierarchy & member so it knows what fields are returned from MDX. It doesn't check the validity of the items during runtime, it passes the values into MDX and lets AS take over. I have the ability to get done exactly what I am looking to do.

Thanks though,

John

sql

Wednesday, March 21, 2012

difficult query

sorry, hit "send" by mistake previously.
Hi all,
My codes to achieve the following is very complicated
(about 200 short lines). Can anyone think of a better way?
--DATA--
create table myTableA(
myID int,
mykey varchar(5)
)
go
insert into myTableA
values (1,'01A')
insert into myTableA
values (2,'01A')
insert into myTableA
values (3,'01A')
go
create table myTableB(
mykey varchar(5),
mystyle varchar(3)
)
go
insert into myTableB
values ('01A', '202')
insert into myTableB
values ('01A', '204')
insert into myTableB
values ('01A', '206')
--Required Result--
the required result need to look like this (without
duplicates):
myID myKey myStyle
1 01A 202
2 01A 204
3 01A 206
--
Thank you in advance,
Annathere is a problem in that there is no apparent way to
know that row 1 of MyTableA matches only to row 1 of
MyTableB assuming the linkage is the common column mkKey
is there some other business logic involved that would
shed light on this ?
>--Original Message--
>sorry, hit "send" by mistake previously.
>Hi all,
>My codes to achieve the following is very complicated
>(about 200 short lines). Can anyone think of a better way?
>--DATA--
>create table myTableA(
>myID int,
>mykey varchar(5)
>)
>go
>insert into myTableA
>values (1,'01A')
>insert into myTableA
>values (2,'01A')
>insert into myTableA
>values (3,'01A')
>go
>create table myTableB(
>mykey varchar(5),
>mystyle varchar(3)
>)
>go
>insert into myTableB
>values ('01A', '202')
>insert into myTableB
>values ('01A', '204')
>insert into myTableB
>values ('01A', '206')
>--Required Result--
>the required result need to look like this (without
>duplicates):
>myID myKey myStyle
>1 01A 202
>2 01A 204
>3 01A 206
>--
>Thank you in advance,
>Anna
>
>.
>|||Anna
If you want in your output ID as sequence so try this one
select *,(select count(*) from myTableb v where v.mystyle<=myTableb.mystyle)
from myTableb
"Anna" <lliming12@.yahoo.com> wrote in message
news:070901c3614a$fff4e6e0$a601280a@.phx.gbl...
> Due to historical reasons, the data is the way it is. It
> is not necessary that row1 of myTableA matches only to
> row1 of myTableB. The important part is for the three rows
> in myTableA to match to three different rows in myTableB.
> thanks,
> >--Original Message--
> >there is a problem in that there is no apparent way to
> >know that row 1 of MyTableA matches only to row 1 of
> >MyTableB assuming the linkage is the common column mkKey
> >
> >is there some other business logic involved that would
> >shed light on this ?
> >
> >>--Original Message--
> >>sorry, hit "send" by mistake previously.
> >>
> >>Hi all,
> >>
> >>My codes to achieve the following is very complicated
> >>(about 200 short lines). Can anyone think of a better
> way?
> >>
> >>--DATA--
> >>create table myTableA(
> >>myID int,
> >>mykey varchar(5)
> >>)
> >>go
> >>insert into myTableA
> >>values (1,'01A')
> >>insert into myTableA
> >>values (2,'01A')
> >>insert into myTableA
> >>values (3,'01A')
> >>go
> >>create table myTableB(
> >>mykey varchar(5),
> >>mystyle varchar(3)
> >>)
> >>go
> >>insert into myTableB
> >>values ('01A', '202')
> >>insert into myTableB
> >>values ('01A', '204')
> >>insert into myTableB
> >>values ('01A', '206')
> >>
> >>--Required Result--
> >>the required result need to look like this (without
> >>duplicates):
> >>
> >>myID myKey myStyle
> >>1 01A 202
> >>2 01A 204
> >>3 01A 206
> >>
> >>--
> >>
> >>Thank you in advance,
> >>Anna
> >>
> >>
> >>
> >>.
> >>
> >.
> >

Wednesday, March 7, 2012

Different Size Columns in Different Table Rows?

I'm trying to recreate something that I could do in Crystal Reports and have
hit a wall with Report Designer.
I want to create two (or more) header rows and two (or more) detail rows
with each column width different from the column width from the row above
(or below). I found how to add more header and detail rows but the column
widths remain the same for each row and cannot be adjusted separately. What
I'd like to to is to "merge" table columns for one report row into just one
column with the other row remaining as two columns.
For example, I want a report where the first row of detail contains multiple
columns that contains information about a database column, but then the next
detail row should only contain ONE column.
Type of Note Date of Note Author of Note
Note Text
---
Addendum 10/17/07 Shakespeare
This is the text of the note of an addendum written by Shakespeare
Is there a way to do this with RS, or is there some workaround?
Thanks for any help.Never mind (again) ;) I found the Merge Cells right-click command.
"Don Miller" <nospam@.nospam.com> wrote in message
news:%23HQrXMNEIHA.4752@.TK2MSFTNGP04.phx.gbl...
> I'm trying to recreate something that I could do in Crystal Reports and
> have hit a wall with Report Designer.
> I want to create two (or more) header rows and two (or more) detail rows
> with each column width different from the column width from the row above
> (or below). I found how to add more header and detail rows but the column
> widths remain the same for each row and cannot be adjusted separately.
> What I'd like to to is to "merge" table columns for one report row into
> just one column with the other row remaining as two columns.
> For example, I want a report where the first row of detail contains
> multiple columns that contains information about a database column, but
> then the next detail row should only contain ONE column.
> Type of Note Date of Note Author of Note
> Note Text
> ---
> Addendum 10/17/07 Shakespeare
> This is the text of the note of an addendum written by Shakespeare
> Is there a way to do this with RS, or is there some workaround?
> Thanks for any help.
>