Trying To Build A Query For A TreeView / Navigation Menu

Mar 5, 2007

Hi Everyone,
I'm drawing a blank here and I am hoping someone can point me in the right direction. I have a table with the following columns (some omitted)
ID
GUID
PageName
ParentPageID
 I want to build a hierarchical navigation system (2-tier). The conceptual problem that I am running into was getting this information from the same table. Initially I was going to use a nested repeater but I am thinking a treeview would be better. Anyway, the problem is the query. How would I start with something like this? Let's use the following as an example
Rows
(ID '1', GUID '888....', PageName 'Page A', ParentPageID '-1')
(ID '2', GUID '111....', PageName 'Page B', ParentPageID '-1')
(ID '3', GUID '222....', PageName 'Page C', ParentPageID '-1')
(ID '4', GUID '375....', PageName 'Page 1', ParentPageID '1')
(ID '5', GUID '562....', PageName 'Page 2', ParentPageID '1')
(ID '6', GUID '874....', PageName 'Page 3', ParentPageID '2')

(ID '7', GUID '388....', PageName 'Page 4', ParentPageID '3')
 
So, I want to be able to build a query so that I can do the following
Page A
    Page 1
    Page 2
Page B
    Page 3
Page C
    Page 4
 
Any help would be greatly appreciated. Thanks!
 

 

View 4 Replies


ADVERTISEMENT

Treeview Query With T-sql

Feb 27, 2008

I need to query a sql database with sql
I need to return the data in a nested form
ID, ParentID, Title
I also need to know which level each item is with the query, making the result something like,
ID, Title, Depth
Any help?

View 3 Replies View Related

T-SQL (SS2K8) :: Query For Treeview

Sep 11, 2012

I have a query which is working fine. Is it possible that if the table3's column(Child) is only related to table 1 to show it under table 1 and not under table 2, but at the same time another (Child) has a parent in table 2 (which usually is the case) it will show under table 2 as its currently doing.

In other words Child column is directly under Table2's row column name (Father), but occasionally it comes under Table1 with no relation to Table 2.

How can I out put that in a query for a treeview? I am assuming that I will have to program the out come in c# also with 3 for loops and in the second loop I can check if the column is grandchild or Child and make that as a second row or 2nd node of treeview, but I am having a problem building a query in sql.

The query below shows all Parent, then child then grand child(all well and working), but what is desired is at times child takes place of a father.

declare @x as xml
set @x =
(
SELECT distinct
Table1.AssetSysID, Table1.Asset_ID , Table1.FromLR, Table1.Asset_ID + ', ' + Table1.[Desc2] as GarndFather,
Table2.ACISysID ,Table2.PAssetSysID, Table2.FeatureName + ', ' + Table2.[DESC] AS Father,
Table3.ITMSysID ,Table3.Item_ID + ',' + Table3.[DESC] as Child

[Code] .....

View 6 Replies View Related

Query Needed For Path Navigation Through A Web Site

Dec 13, 2006

hi experts,
i'm working in building new reports from an existing database. the report i'm working in is to save the path of the visitor through a web site(this is neede for the statistics web site), i have the siteId, commid, maintab, subtab.
the site id is dtored in site table, maintab and subtab are stored in article(they are mixed in one columns called title) i have also sessionid stored in session table.
i want a query that show the flow of the visitor through a web site, which tab he clicked first then second tab then third tab and in this tab he clicked subtab and the last tab he clicked on before leaving the web page.
is this possible and if not, what are the other approches that can i make to get the report i want.
also i want to ask if it is possible to create the report where it will show you the visitors for the first time and the returned visitors.
thanks

View 12 Replies View Related

Recursive Query For Tree Style Menu?

Mar 12, 2013

Information stored within the database is as follows, although the number of sub levels could easily grow :

PageID - Title - ParentID
1 - Title1 - 0
2 - Title2 - 0
3 - Title3 - 1
4 - Title4 - 1
5 - Title5 - 4

Required outcome :

[+] Title1
.....[+] Title3
.....[+] Title4
..........[+] Title5
[+] Title2

View 3 Replies View Related

Interesting SQL Query Requirement For &<SELECT&> Menu

Nov 7, 2005

Hi AllWondered if you could help me with the below query.I have 1 simple table called STOCKCATS that consists of 2 fields.These fields are called CATID and LEVEL.The contents of this table are as follows:CATID LEVELcat01 <nothing>cat02 <nothing>cat03 cat01cat04 <nothing>cat05 cat01cat06 cat02cat07 cat04etc.. etc...The way this table works is that I have an ASP page that allows the user tocreate a stock category at 2 levels, category level and sub-category level.When I file the entered data into the table, if the user has chosen tocreate a category level stock category then the LEVEL field is left blankand if they chose to create a sub-category level category then I post therelevant category level stock category code in the LEVEL field. Forexample, in the above list cat01 is a category level stock category andcat05 is a sub-category as it is a sub-category of cat01.My query is that I want to populate a simple HTML <SELECT> menu (using ASP),but instead of it being a straightforward 'select catid from stockcats orderby catid', I want to group this list into some kind of order, eg:instead of:cat01 <nothing> << I need to bring back this 2nd column so that I cando a simple IF THEN in asp to indent sub-catscat02 <nothing>cat03 cat01cat04 <nothing>cat05 cat01cat06 cat02cat07 cat04I would likecat01 <nothing> << dittocat03 cat01cat05 cat01cat02 <nothing>cat06 cat02cat04 <nothing>cat07 cat04Do you know if this is possible in pure SQL (I must confess that I'm usingMySQL, but I would have thought the SQL syntax would be the same if it ispossible) or a combo of ASP & SQL?ThanksRobbie

View 3 Replies View Related

Building Treeview

Jan 3, 2008

 
userfeatureuserName  featureIda          1a          5b          1b          5b          9c          5 c          9
menuid   Pid  Name1         Administrator2     1   Create User3     1   Delete USer4     1   View log5         WSR6     5   X7     5   X8     5   X9         Manager10    9   Y11    9   Y
 Using the above table i want to create a treeview ie based on the user login. Please let me know if there is any previous sample to this situation.
 
 

View 2 Replies View Related

HELP Pls ! Treeview Using Sql Server

Jul 15, 2004

Hi guys,
i need some help here regrading my project

i would like to create a tree view diagram by importing my data from database and display it in the tree view.. however im not sure how to implement it

help please
regards

View 1 Replies View Related

Error On Build Solution, If SSIS Project Is Part Of Build

Mar 22, 2006

Hello,

we have automated build on every night. In our solution is SSIS project, where each package is encrypted per password. We call build process per command line like this..

C:ProgrammeMicrosoft Visual Studio 8Common7IDEdevenv.exe (c:DevelopmentX3\X3.sln /build Release)' in 'c:DevelopmentProjectsDailyBuild

Through build process we get a error:


External Program Failed: C:ProgrammeMicrosoft Visual Studio 8Common7IDEdevenv.exe (return code was 1):

We think a reason is, that on build of SSIS project must be entered a password. You can wonder for what we need that SSIS packages are part of our build. We hope that on build process is also created Deployment Utility, if so set in dtproject.user. Is it so? Is there any way to create Deployment utility on automated build process? Can be a password provided pre command line?

with best regards

Anton Kalcik

View 5 Replies View Related

I Need Help To Build This Query.

Jun 10, 2008

Hi,
    I have two tables called Actcodes and a another table called FundBalances...
 
The Act codes have the following format..
 
PlanId int,
ClientId int,
 StartDate datetime,
EndDate datetime,
ClientActCode char(2)
CodeDescription char(15)
so based on what the user has selected i am getting the names of each codes
 
and they have the following Rows.
PlanId         ClientId           Startdate     EndDate  ClientActCode     CodeDescription
111               1                   1/1/2008      3/31/2008     01                    Begininng balance
111               1                   1/1/2008       3/31/2008     02                   Contributions 
111               1                   1/1/2008      3/31/2008     03                   something
111               1                   1/1/2008       3/31/2008     04                   sdkfjdkf
111               1                   1/1/2008      3/31/2008     05                    dfdfd
111               1                   1/1/2008       3/31/2008     06                  dfddfs 
111               1                   1/1/2008      3/31/2008     09                  dfdf
111               1                   1/1/2008       3/31/2008     15                   dfdkfdlfk
 
and my fund balance i have the following rows..
PlanId int
Participantid int
StartDAte datetime,
end date datetime,
FundId int
Loans
Act1 char(2)
TotAct1 money
.
Act20 char(2)
TotAct20 money
and the data is as follows
PlanId   ParticipantId StartDate EndDate fundId Loans Act1 TotAct1 Act2 totact2 ----- Act20 TotAct20
111         1212           1/1/2008  3/31/2008  15   NULL   01    15.15    02    15.48           20    12.4561
111          1212           1/1/2008 3/31/2008   45   0        01        45.12 02    453.123      20          54.00
so on and so so forth
 
tht Act1 matches the ClientActCode in the Act..
So is there a way i can get those column in my select which have actCodes present in the Act code table. for in... in my act code table for this plan i have 01,02,03,04,05,06, 09, 15 clientAct codes
 
so can i get the its respective Acts and Totacts column as  Act1, Act, Act3, Act Act5, Act6 based on the ClientAct codes.
 
Any help will be appreciated..
Thanks
Karen

View 23 Replies View Related

How To Build This Query

Mar 8, 2004

Hi,
Please Help me to build this query.

I have got a "User" Table
---------------------
UserID UserName
---------------------

1 Tuffy


Another Table "Groups" Table
---------------------
GroupID GroupName
---------------------
1 Manager
2 Employee
3 Sales

I have got a "UserGroup" Table HOLDING ID'S as Foreign key.
The data in the TABLE is like this

---------------------
UserID GroupID
---------------------
1 1(Manager from "Group" Table
1 2(Employee)
1 3(Sales)
2 2(Employee)
2 3(Sales)
---------------------

Now when a user logged in The Groups have to be returned as a string that contains pipe separated Group names
for example "Manager|Employee|Sales|"

So if User 1 log in I need something like that
UserID (1)-->"Manager|Employee|Sales|"

Please help me how to write this query.

Regards

View 5 Replies View Related

Query Build Help

Apr 24, 2007

I have a table with 2 columns:
Col1 Col2
stat1,stat2 AV,AD
stat3 TD
I need to build a query like this:
SELECT *
FROM table3
WHERE stat1=AV and stat2=AD and stat3=TD
How do I do this?

View 6 Replies View Related

Build A New Sql Query

Apr 10, 2007

Here is my problem.

I need to build a new SQL query and im almost new with all the sql language. Im searching a lot and I have 2 book but I cant found what I'm looking for.

I need to update the Site and Department in the table 1 with the site/department in the table 3 using the table 2 as a join. The table one is an item owned by the person in the table 3 and I need to set the Site and Department as the same.

Table 1

Asset Name | InstanceID | Site | Department



Table 2

InstanceID | User Name |



Table 3

User Name | Site | Department

Help will be really appreciated!

Thanks

View 6 Replies View Related

Help To Build Query

Sep 13, 2007

I need to build following query:

Each item has one or more manufacturers:

Is any way to get all the items with all manufacturers where one of manufacturers fit required expression.

I will try to explain in example:

items | manufacturers
------------------------------
ABC1 | golf
ABC1 | toyota
ABC1 | citroen
ABC2 | skoda
ABC2 | subaru
ABC2 | lada
ABC3 | peugeot
ABC3 | renault
ABC3 | dodge

Example for Input: *olf*
Output:
ABC1 | golf
ABC1 | toyota
ABC1 | citroen

Example for Input: *aul*
Output:
ABC3 | peugeot
ABC3 | renault
ABC3 | dodge

Thanks

View 20 Replies View Related

Design For Treeview-like Structure

Jun 7, 2007

ok i have a design question and since I am not a db designer I hope somebody can give me some insight into this...

I have an app that uses a treeview control to display a hierarchy of a machine assembly. Currently it only goes two levels deep (top level and a single subcomponent.
WHat I would like to do is enable my users to add n-deep levels to the top level machine. The problem with that is that I can't think of a way to store this in a DB and how the table(s) structure would look like.

It seems like this would be a classic problem in DB design, but that is where I lack knowledge so any help will be greatly appreciated

Thanx

View 6 Replies View Related

How Can Build Two Tabels Together With Ms Sql Query

May 15, 2007

Hello to all,
I have now two tabels ( Ta and Tb). the tabel includes difference attributte. I want to build this two tables together.
I used this query:
select * from Ta where Ta.Id = @ID union all select * from Tb where Tb.IdOfa = @ID
but it doesn't work and the following error message comes
"All inquiries in an SQL application, which contain a union operator, must contain directly many expressions in their goal lists "

View 4 Replies View Related

New, Need Help: Build Query With Variable

Oct 12, 2007

I am building my SELECT on the fly by use of IF statements something like:
SET @searchParam = @searchParam + ' AND tblXYZ.country = ' + @searchStringCountry

Then I am trying to use @searchParam as my WHERE clause:
WHERE@searchParam

How do I get the string out of @searchParam to use as my WHERE clause?

Thanks in advance!

View 1 Replies View Related

Trying To Build An Update Query

Apr 22, 2008

I've got a table that stores individuals, and their organization all in one table, with basic information about each (contactId, name, primary address, phone, etc.). There is also, for each line, a true/false field 'PerOrg' that lets me know if it's a person (true), or an organization (false); and a 'OrgKeyCode' field that has the contactId for the person organization.

I'm looking to make an update query that will make the primary address for all individuals set to the primary address for their corresponding organization. Here's my queries to find the items:

This gets all of the organization, their contactId and their primary Address (as long as they have one).

SELECT ContactID, FullName, PrimaryAddressType
FROM tblContactInformation
WHERE PrimaryAddressType IS NOT NULL AND PerOrg = '0'

This gets a list of all of the individuals that have an organization assigned.

SELECT ContactID, FullName, OrgKeyContactID, PrimaryAddressType
FROM tblContactInformation
WHERE PerOrg = '1' AND OrgKeyContactID IS NOT NULL

Now I need to create an update query that sets the Primary Address for individuals to the primary address for their corresponding organization. Here's what I've got worked out so far: (just the basics).

UPDATE tblContactInformation
SET PrimaryAddressType =
WHERE PerOrg = '1'

At issue is, I'm not sure how to pull the primary address only from the organization into the SET line. Do I need to save my first query, then somehow call it in my update query, where the contactID = the OrgKeyCode? Or something like that?

View 1 Replies View Related

Trying To Build Count Query

Apr 22, 2008

I have a table which tracks changes by user, department and date. I want to construct a query which returns two numbers, the first is all the changes by department on a certain date. The second is all changes by user on the same date. I know that the queries seperately will look like,

SELECT COUNT(User) As NumberByUser
FROM Table
WHERE (Date = 'DateGoesHere') AND (User= 'UserGoesHere')
GROUP BY User

SELECT COUNT(Department) As NumberByDepartment
FROM Table
WHERE (Date = 'DateGoesHere') AND (Department = 'DepartmentGoesHere')
GROUP BY Department

But how do I go about linking the two in the same query? Any help would be appreciated, thanks!

View 2 Replies View Related

Efficiently Supplying Xml Data For Treeview

May 16, 2008

I have an interesting problem:

I have an ASP.NET web application that uses a Treeview control to display what can potentially be a very large data set. In the past, I would just run a recursive stored procedure in my database that would output the XML which I would save to a file. The Treeview used the XML file as its data source. I did this because it can take so long for the stored procedure to run (10 seconds or more) that, it isn't practical to have the treeview point directly to the stored procedure. This worked well enough because the data didn't change very often.

Now, it looks as if the application will be used in a production environment, and I really need to find a way to supply up-to-date data to the treeview in a dynamic way. I have tried creating a view that would provide XML and that would be updated any time the target table is updated but, that has not worked. I have also tried creating a trigger that would output to an XML file any time an edit was made (using the xp_cmdshell functionality) but, that has proven difficult as well.

Is there a simpler solution that I am just missing? I just want an up-to-date XML representation of the data that is a result of a recursive function.

Thanks for any help you can provide.

View 7 Replies View Related

Query To Build Table With Nvarchar(max)

Jan 8, 2007

an error, incorrect syntax, was generated when the following query was tried: 
CREATE TABLE ASPNET2(id smallint IDENTITY(1,1) PRIMARY KEY,word nvarchar(50) NOT NULL,definition nvarchar(MAX) NOT NULL)
 
I wanted to use nvarchar(MAX) because something I read suggested that I couldn't do editing with the controls if a variable was set to text.
 Thanks.
-Larry

View 3 Replies View Related

Build Dynamic Query Using Sp_executesql

Sep 20, 2004

Hi there,

I am trying to build a proc that uses a loop to import data into several tables. The data is copied into the appropriate table according to the contents of the variable @PracticeCode. I am also trying to add a date value to each record as it is added to the table. I thought that the best way to do this would be t use the sp_executesql stored proc. but I am having difficulty getting it to work. Here's what I have done so far:

-- insert data into proper tables with extract date added
SET @SQLString ='INSERT INTO GMS_48hrAccess.dbo.tbl_Surgery'+@PracticeCode+' SELECT
SurgeryKey,'+
@extractDate+',
ClinicianCode,
StartTime,
SessionGroup,
[Description],
SurgeryName,
Deleted,
PremisesKey
FROM GMS_48hrAccess.dbo.tbl_SurgeryIn'

EXEC master..sp_executesql @SQLString

And here's the error message that I get:

Server: Msg 241, Level 16, State 1, Line 90
Syntax error converting datetime from character string.

I understand why I am getting this error I just can't seem to fix it. I've consulted BOl and have tried various Parameter combinations but to no avail.

Can anyone help?

Thanks

View 1 Replies View Related

ASP/SQL Query Build - Myth Breaking

Jul 20, 2005

Hi GuysI don't want to keep asking for your help all the time on each individualquery, so could you please help me to break the myths on the following:1) I have 2 tables. Once is called ACCOUNTS and the other ACCOUNTBUDGET.ACCOUNTS includes all of the usual details for customers and suppliers, egthe account code (as ACCOUNTID), the account name (as NAME), etc.ACCOUNTBUDGET basically holds a transaction line for each month and it'scorresponding year to store the turnover for that month, eg one row containsACCOUNTID, PERIOD (ie the month), YEAR and TURNOVER.Now a lot of the SQL 6.5 tables that I deal with are in this vein and theusual query is that I want to list all of the ACCOUNTIDs and NAMEs thatexist in the ACCOUNTS table and then show for example what their TURNOVER isfor a applicable PERIOD and YEAR, which are all held in the ACCOUNTSBUDGETtable.Now if I do a quick query using MS Query all I get are rows that haverelated values in both the ACCOUNTS and ACCOUNTSBUDGET table when I havespecified say a certain PERIOD and YEAR.The main point of my current reporting problem is that I want to show allthe ACCOUNTIDs and NAMEs in ACCOUNTS that have zero TURNOVER for aparticular PERIOD and YEAR.I'm positive that I have to create a 2 step query/join, but I don't know howto do it. What is the method? People in this NG, can rattle one up inseconds, but I just don't see the logic. Can you help me with this queryand let me know how you manage to fathom it.2) Are there any good web sites that explain in kiddie form how to do thissort of thing?I really appreciate your help on this.RegardsLaphan

View 1 Replies View Related

BUG In SSIS OLE DB Source Build Query

Jun 28, 2007

Can anyone help me with this ?




I am trying to extract data from oracle 9i server and
pushing it onto the SQL Server 2005 using Data Flow Task.
Details for OLE DB Source are :



OLE DB Source Editor Details:

OLE DB Connection Manager - Oracle Source

Data Access Mode - SQL Command

SQL Command Text -

SELECT EMPNO, EMPNAME, JOB, HIREDATE
FROM EMP_DETAILS
WHERE (HIREDATE > TRUNC(SYSDATE) - 1)



SSIS parses this query succesfully but when i build the query it shows query



SELECT EMPNO, EMPNAME, JOB, HIREDATE
FROM EMP_DETAILS
WHERE (HIREDATE > TRUNC("SYSDATE") - 1)


Please note :- SYSDATE IN " "




This query returns no Result Set.

View 6 Replies View Related

Major Problem With @@IDENTITY, Treeview And GUID

Nov 14, 2004

Hi,

I'm trying to insert data into locally stored database (SQL Server).
The data I want inserted, is presented in a Treeview control and the data is fetched from a Webservice. The data is returned in form of a dataset.
The treeview contains checkboxes allowing a user to select what to install in the locally stored database.

To sum up:


1. Get data from a webservice' not my problem
2. Present data in a Treview control' not my problem
3. Allow to user to select which data to install' not my problem
4. Insert data that the user has selected into my db' MY PROBLEM!!!!


The Treeview looks like this.

- Group1
| | ---- Rule1.1
| | ---- Rule1.2
|
- Group2
| | ---- Rule2.1
| | ---- Rule2.2
| | ---- Rule2.3

.....


The Treeview is generated with DataRelations between Group and Rule.

My locally stored database is designed by a third party provider and therefore the database must not be altered.
The table I want to store data in is called "Groups" and it looks like this:


GroupID uniqueidentifier ' (newid())
GroupName nvarchar(50)
ParentGroupID uniqueidentifier' if grouptype = 0 then ParentGroupID must have a value.
GroupType tinyint ' 0 = subgroup, 1 = "top"group

Data in the table "Groups" would look like this:

GroupID GroupNameParentGroupIDGroupType
---------------------------------------------------------
{000001...}Group1<NULL>1
{000011...}Rule1.1{000001...}0
{000012...}Rule1.2{000001...}0
{000002...}Group2<NULL>1
{000021...}Rule2.1{000002...}0
{000022...}Rule2.2{000002...}0
{000023...}Rule2.3{000002...}0



The third party also created a stored procedure called pr_AddGroup taking the following parameters:

@GroupName ' can be both the RuleName and the GroupName
@GroupType ' can be 0 for subgroup or 1 for "top"group
@ParentGroup ' GUID


The problem with this stored procedure is that it does not have return value, which is here my problem actually lies.
If it returned @@IDENTITY I could use this as the parameter for @ParentGroup.
Instead I figure I must create two sqlCommand's (one calling pr_AddGroup and another calling SELECT @@IDENTITY to get the newly created record).

My SQL Commands look like this

Dim cmd As SqlCommand
Dim Conn As SqlConnection = New SqlConnection
Conn.ConnectionString = "Data Source=myServer;Initial Catalog=myTable;Integrated Security=SSPI"
cmd = New SqlCommand
cmd.CommandType = CommandType.StoredProcedure
cmd.Connection = Conn
cmd.CommandText = "pr_AddGroup"

cmd.Parameters.Add(New SqlParameter("@GroupName", SqlDbType.NVarChar, 50, ParameterDirection.Input))
cmd.Parameters.Add(New SqlParameter("@GroupType", SqlDbType.TinyInt, ParameterDirection.Input))
cmd.Parameters.Add(New SqlParameter("@ParentGroup", SqlDbType.UniqueIdentifier, ParameterDirection.Input))

dim cmd2 as SqlCommand
cmd2 = new SqlCommand
cmd2.commandtype = commandtype.Text
cmd2.commandtext = "SELECT @@IDENTITY as ID FROM Groups"
cmd2.connection = Conn

dim ParentGroupGUID as system.guid


To get the data inserted in the Groups table I would something like the following, but the code is very ugly
(and it doesn't work either);

For Each Group In TreeView1.Nodes ' Loop through Groups
If Group.Checked Then
cmd.Parameters("@GroupName").Value = Group.Text.ToString
cmd.Parameters("@GroupType").Value = 1

cmd.ExecuteNonQuery()
ParentGroupGUID = cmd2.executescalar()

End If

For Each Rule In Group.Nodes ' Loop through Rules.
If Rule.Checked Then
cmd.Parameters("@GroupName").Value = Group.Text.ToString
cmd.Parameters("@GroupType").Value = 1
cmd.Parameters("@ParentGroup").value = ParentGroupGUID
cmd.ExecuteNonquery()
End If
Next
Next


I've spent the last 5 hours figuring out this problem, so ANY help is appreciated :-)

View 3 Replies View Related

I Need To Generate The Query To Build A Database I've Designed. Please Help..

Apr 3, 2007

I've registered with GoDaddy for my site. I've used Visual Web Dev 2005 with SQL Server Mgmt Express 2005 to create my database etc. Now with GoDaddy, I need to "recreate" the database on their server again, but I don't want to go throug the whole process again. I just want to use their query editor to generate the database online.GoDaddy mentions a "personal-sql" file that SQL Server 2000 generates, but I can't find anything like that with what I have. Thanks.

View 1 Replies View Related

Build SQL Query From Dynamic Checkbox List

Nov 26, 2003

Not sure if this is the place to post this, but here goes.

I need to setup an options screen where my customers can customize which locations will be stored for their user id when pulling reports. I have checkbox list that dynamically loads their locations. I need to store the selected checkbox items in my table and then each time they login in to run a report, it will use the stored Location values in my SQL query.

Synopsis:
Selected locations stored in table. When the report is ran, the location values are pulled and added to my queries WHERE clause.

Thanks.

View 1 Replies View Related

SQL Server 2008 :: Build A Query That Put Different Types In Columns

Jun 5, 2015

I have 3 tables, a supplier table, a types table and a relationship table between the two..I want to build a query that put the different types in columns, and use a Boolean value to identify if the supplier supplies that type.

CREATE TABLE #Suppliers(
id INT,
nam NVARCHAR(50)

[code]...

It's possible to do this in "one" query?

View 2 Replies View Related

How To Build Gui Or Forms To Wrap SQL Queries That Are Normally Run In Query Analyzer

Jul 23, 2005

Hi all,I'm a newbie to SQL and I need help with investigating what ways arepossible to build an interface of some sort that wraps around a SQLquery script.I have a simple SQL query which we normally run inside Query Analyzerto update certain fields in the SQL DB based on FQDN provide by theuser. The user normally opens up the query, edit the script to replaythe xxxxx in the line "set @FQDN="xxxxx" with the node name and thenfires it off.I would like to know what are the ways to wrap a simple user interfacearound it so the user does not have to open and edit the scriptdirectly. A simple GUI or Excel type form interface that has a freeform text field for input and then a button to run the script.Obviously, I would like to see the output in some sort of output paneas well.Is this something that can be done in Query Analyzer ?Thanks in advance,Michael.

View 1 Replies View Related

Build Query Dialog For OLEDB Source Editor

Mar 23, 2006

Can i extend the "Query Builder" dialog of OLEDB Source Editor for developing custom source component?

View 1 Replies View Related

Add Parameter To Navigation Url

Oct 16, 2006

Add parameter to "navigation" url -

Hello,
I'm trying to add a parameter to my JUMP TO URL but it doesn't work.

basiclly i'm useing javascript there:
javascript:window.open('http:www.a.com?num=XXX');

i want to change the XXX with a value from the dataset.
I tried - javascript:window.open('http:www.a.com?num= + Fields!ME.Value ');
or - javascript:window.open('http:www.a.com?num= & Fields!ME.Value ');
it didn't worked :(

any help?

View 9 Replies View Related

Record Navigation

Jan 5, 2007

I have created a one-page client summary report. My problem is that I can only get the report to show one client and there are many. How do I add record navigation functionality to my report?

View 4 Replies View Related

Navigation From The Header

Mar 16, 2007

Hello

I have a link on the header to jump to another report. It was working fine on test server but when deployed to production, is giving the followin error. Any suggestions
Thanks

Inder

The path of the item "(null)" is not valid. The path must be less than 260 characters long and must start with slash. Other restrictions apply. (rsInvalidItemPath)

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved