Showing posts with label request. Show all posts
Showing posts with label request. Show all posts

Monday, March 19, 2012

cant do that request

Hi,
I'm going to explain as clearly as possible:

I have two tables:

Relationships(relation_id, table1, table2)
Relationfields(relation_id, field1, field2)

In Relationships, relation_id is the primary key
In Relationfields, relation_id is the foreign key

I have a front-end interface that allows the user to add records to
Relationships and Relationfields as followed:

The user selects a table1 and table2 values from listboxes. These are
real table names from sys.objects, so then the user can select fields
of these tables on which he wants to create a JOIN.
Anyway, I can easily insert the table1 and table2 into Relationships
(relation_id is an auto-increment). Then I need to get the relation_id
of this new Relationship (easy since I know which values I've inserted
and table1-table2 associations are unique.

Now the PROBLEM :
I need to insert into Relationfields all the fields selectioned by the
user for each of the two tables . But the user might have selected
several fields from table1 and table2, so I need to pass A LIST
PARAMETER to my Stored Procedure as I don't know how many values of
field1 and field2 there is going to be.

I hope this is clear enough. Is it possible to achieve what I want ?
Should I pass an entire concatenated string with values separated by
comma or whatever and then decrypt it in the stored procedure ?

ThxCould anyone help please ?|||If you're asking how to pass a list into a procedure as a parameter,
then see here:

http://www.sommarskog.se/arrays-in-sql.html

If that doesn't help, I suggest you post CREATE TABLE and INSERT
statements to clarify exactly what you need:

http://www.aspfaq.com/etiquette.asp?id=5006

Simon|||thanks. I think the first link should help me doing what I want.
Regards|||Why are you putting metadata in your schema, in total violation of the
basic principles of a relational database? Why don't you know the
differences between rows and records, fields and columns, data and
metadata?

You can kludge this with a lot of dynamic SQL that will run like cold
glue, have no data integrity and be unmaintainable. Someone will
probably help you do this. Please read a few books before you destroy
your employers data.|||The best way to pass multiple-row data into a stored procedure is using
OPENXML, any other method is a kludge.|||I put meta data in my shema because my employer pays me to do so... I'm
developping an administration tool for maintaining dynamic metadata of
a website.
Now I'm not sure in what way your comment is of any use to me...|||Ellen K > Thanks I'll look at this in the future. But I've found a
better way this time to avoid passing multiple-row data to my stored
procedure:)
Thx!

cant do that request

Hi,
I'm trying to do a request but I can't figure out how to do it.
Basically I have 1 table with 3 fields (field1,field2,field3).
Values in those 3 fields can be the same, but I want to select all of
these values only once (i.e distinct values)

Example

Field1 Field2 Field3
A A A
B E B
C F F
D G H

The select should return: A,B,C,D,E,F,G,H
I've tried with union and a select not in but I ended up with something
big and I got confused.
Can someone help ?
ThxSELECT col1
FROM YourTable
UNION
SELECT col2
FROM YourTable
UNION
SELECT col3
FROM YourTable

If that doesn't give the result you wanted then please post DDL and
sample data as described here:
http://www.aspfaq.com/etiquette.asp?id=5006

--
David Portas
SQL Server MVP
--|||Seems to work. Thanks !
Regarding the DDL, I've looked at it but I post my messages via the
google group thing and I'm not sure if I can upload attached stuff ?|||Glad it helped.

Put DDL and other scripts in the body of your message. Most people
can't or won't download attachments anyway.

--
David Portas
SQL Server MVP
--

Sunday, February 19, 2012

Can't connect to SQL Server 2005 Reporting Services

Hi all, for some reason I can't connect to SQL Server 2005 reporting services. When I try to log in I get "the request failed with HTTP status 404:Not Found".

When I installed SQL Server, port 80 was not available as I am also running Apache, so SQL Server Report Server runs at http://localhost:81/ReportServer/ .. this work fine, I have build a report, deployed it successfully and can view it.

In SSMS I see two 2 databases, ReportServer and ReportServerTempDB.

Everything looks OK in the Report Server Configuration Manager, however in the Surface Area Configuration when I click on "
Windows Integrated Security" under the Reporting Services node it also comes back as "the request failed with HTTP status 404:Not Found"

Does anyone have any ideas how I can fix this, does it look like it is looking for Reporting Services on the wrong port? 80 instead of 81 ?

Thanks for any advice

Hello, I have had a similar problem and posted a thread on it at: http://tinyurl.com/zke4g

I've been running IIS 5.1 on port 200 just for security as hackers go straight for 80 if they are trying anything. While my problem is similar to yours, I have seen nothing that says the port is the problem especially given it persists when I switch IIS to port 80. A common move with Apach is to go into the config file and set apache to :8080, I've done that though it's been years and the details of how to are fuzzy.

Good luck. - Greg