Pls Provide The Correct Query For This!

Jun 2, 2008

hi!

select min(dbo.FS_ItemInventory.Bin) from
(SELECT MIN(dbo.FS_LotTrace.LotNumber),dbo.FS_ItemInventory.Bin FROM
dbo.FS_LotTrace RIGHT OUTER JOIN dbo.FS_MOHeader AS h INNER JOIN
dbo.FS_MOLine AS l ON l.MOHeaderKey = h.MOHeaderKey INNER JOIN
dbo.FS_Item AS i ON i.ItemKey = l.ItemKey INNER JOIN
dbo.FS_MOLineData ON l.MOLineKey = dbo.FS_MOLineData.MOLineKey LEFT OUTER JOIN
dbo.FS_DemandSupply AS ds ON l.MOLineKey = ds.TopLevelDemandSupplyKey LEFT OUTER JOIN
dbo.FS_ItemInventory RIGHT OUTER JOIN
dbo.FS_Item AS di ON dbo.FS_ItemInventory.ItemKey = di.ItemKey on ds.DemandItemKey = di.ItemKey on
dbo.FS_LotTrace.LotTraceKey = dbo.FS_ItemInventory.LotTraceKey
where (dbo.FS_ItemInventory.InventoryCategory!='H' or dbo.FS_ItemInventory.InventoryCategory is null) group by di.ItemNumber,dbo.FS_ItemInventory.Bin)


when i tried this query,
i get a error like

Incorrect syntax near ')'

pls provide the correct query for this.

reg,
s.srini

View 1 Replies


ADVERTISEMENT

Pls Provide The Correct Query For This!

Jun 2, 2008

hi!

select min(dbo.FS_ItemInventory.Bin) from
(SELECT MIN(dbo.FS_LotTrace.LotNumber),dbo.FS_ItemInventory.Bin FROM
dbo.FS_LotTrace RIGHT OUTER JOIN dbo.FS_MOHeader AS h INNER JOIN
dbo.FS_MOLine AS l ON l.MOHeaderKey = h.MOHeaderKey INNER JOIN
dbo.FS_Item AS i ON i.ItemKey = l.ItemKey INNER JOIN
dbo.FS_MOLineData ON l.MOLineKey = dbo.FS_MOLineData.MOLineKey LEFT OUTER JOIN
dbo.FS_DemandSupply AS ds ON l.MOLineKey = ds.TopLevelDemandSupplyKey LEFT OUTER JOIN
dbo.FS_ItemInventory RIGHT OUTER JOIN
dbo.FS_Item AS di ON dbo.FS_ItemInventory.ItemKey = di.ItemKey on ds.DemandItemKey = di.ItemKey on
dbo.FS_LotTrace.LotTraceKey = dbo.FS_ItemInventory.LotTraceKey
where (dbo.FS_ItemInventory.InventoryCategory!='H' or dbo.FS_ItemInventory.InventoryCategory is null) group by di.ItemNumber,dbo.FS_ItemInventory.Bin)


when i tried this query,
i get a error like

Incorrect syntax near ')'

pls provide the correct query for this.

reg,
s.srini

View 3 Replies View Related

T-SQL (SS2K8) :: Query That Can Provide 6 Month Forecast?

Dec 17, 2014

Background is that I am recreating charts in SSRS that were being created in Excel. The source data is residing in a SQL Server database. I'm having a hard time coming up with a SQL query to provide a 6 month forecast. I can get my data into a pivot (within a stored procedure) in the following format:

Period---------Date--------------------------------Percent
1--------------2013-11-01 00:00:00.000---------0.3762
2--------------2013-12-01 00:00:00.000---------0.3584
3--------------2014-01-01 00:00:00.000---------0.3604
4--------------2014-02-01 00:00:00.000---------0.3292
5--------------2014-03-01 00:00:00.000---------0.3519

[Code] ....

I need to forecast the next 6 dates 12/1/2014 thru 5/1/2015 using the last 6 months in the data set (periods 8 thru 13)

Period---------Date--------------------------------Percent-------Forecast
1--------------2013-11-01 00:00:00.000---------0.3762
2--------------2013-12-01 00:00:00.000---------0.3584
3--------------2014-01-01 00:00:00.000---------0.3604
4--------------2014-02-01 00:00:00.000---------0.3292
5--------------2014-03-01 00:00:00.000---------0.3519
6--------------2014-04-01 00:00:00.000---------0.4064

[code].....

how to use the first table to generate the forecast values in the second table.

View 4 Replies View Related

Please Correct My Query

Sep 29, 2007

DECLARE @fullname nvarchar(50)
SET @fullname =
(SELECT (OriginalName + ContentType) AS Name
FROM Files_Dyn)
INSERT
INTO Files_Dyn(FullName)
VALUES (@fullname) where username = 'user_admin'
...what is the wrong with this query..it is giving 'Incorrect syntax near the keyword 'where'. Please correct me!
thanks in advance!

View 10 Replies View Related

Simplify (and Correct) A Query

Mar 2, 2006

I’ve got a table called tblApplicant_Details with the following fields - Applicant_ID, Application_ID, Net_Income, Loans.

In this table I’ve got a list of people and their income details (Net_Income) and expenses (loans). In some cases there will be 2 applicants with the same application_ID.

What I need to do is select one applicant (Applicant_ID) per application (Application_ID). In the case of 2 applicants for an application, I need to select the person with the highest income (net_income - loans), if both of the applicants have the same income I want the one with the lowest Applicant_ID and if only one person applies then that person.

Below is the code I’ve been using. I’ve noticed that its not always selecting an applicant for each application. I know it’s also very long for what I am trying to do but I was hoping someone would be able to tell me how I can fix it and tidy it up a bit.

SELECT Application_ID, MIN(Applicant_ID) AS Applicant_ID
FROM (SELECT DERIVEDTBL.Application_ID, dbo.tblAPPLICANT_DETAILS.Applicant_ID
FROM (SELECT MAX(APPLICANT.Net_Income - APPLICANT.Loans) AS Income, APPLICATION.Application_ID
FROM dbo.tblAPPLICANT_DETAILS APPLICANT INNER JOIN
dbo.tblAPPLICATION_DETAILS APPLICATION ON APPLICANT.Application_ID = APPLICATION.Application_ID
GROUP BY APPLICATION.Application_ID) DERIVEDTBL INNER JOIN
dbo.tblAPPLICANT_DETAILS ON DERIVEDTBL.Application_ID = dbo.tblAPPLICANT_DETAILS.Application_ID AND
DERIVEDTBL.Income = dbo.tblAPPLICANT_DETAILS.Net_Income - Loans) DERIVEDTBL
GROUP BY Application_ID

Thanks

View 3 Replies View Related

Sql Query Not Returning Correct Results From Db

Feb 6, 2006

Hello.

I am new at SQL and am using SQL server express edition and im a bit stuck! I am using ASP.NET and C# in my website which is using sql database back end.

String SQLroom = "SELECT DISTINCT RoomName FROM Room INNER JOIN RoomCalendar ON Room.RoomID = RoomCalendar.RoomID WHERE Capacity = '" + reqCapacity + "' " + " AND NOT ('" + newRoomEnd + "' <= roomStartDateTime OR '" + newRoomStart + "' >= roomEndDateTime) AND (OHP = '" + ohpYesNo + "' AND AV = '" + avYesNo + "') ";

This is my SQL string... what it is trying to do is:

find the room
where the capacity is the reqcapacity entered by user
and the startdatetime and enddatetime entered by the user are not present in the table for that room capacity
and then look at whether the user requires OHP or AV facilities, which are stored in the database as either yes or no values.
The problem i am having is with the condition in the sql query... because the user may require an OHP and not AV, but then the room returned "`could" have AV facilities, as it wouldnt make a difference to them if it was there or not, basically, the yes condition has to be satisfied.

Not sure whether i should be using AND, or OR? or a combination.

Any ideas gratefully appreciated....

Sandy

View 2 Replies View Related

The If ... Else Statement In SQL Query.. Please Help To Correct Query.. Thank You

Jan 3, 2008

  1 SELECT distinct A.EAIndex,
2 A.ChainCode AS ChainCode,
3 A.JobDate,
4 C.BillerName,
5 B.BusinessCode,
6 D.ChainName,
7 A.BillBegDate,
8 A.BillEndDate,
9 A.PostDate,
10 A.BillCount,
11 A.ChAmount,
12 A.PostAmount,
13 A.ProChargeFee,
14 A.BalanceStatus AS BalanceStatus,
15 B.BillerInfoCode AS BillerInfoCode ,
16 CONVERT(varchar(10), A.BalanceDate, 112)BalanceDate,
17 A.AdjustDate,
18 C.BillerCode ,
19 (a.ChAmount- a.ProChargeFee) AS Fee,
20 E.EABillerCode, E.RelAdjustDate
21 FROM ZT_EAccount A
22 Inner Join ZT_BillerInfo B On Right('00000'+Rtrim(Ltrim(A.BillerCode)),5) = Right('00000'+Rtrim(Ltrim(B.BillerInfoCode)),5)
23 Inner Join ZT_Biller C ON B.ParentCode = C.BillerCode
24 Inner Join ZT_Chain D On A.ChainCode = D.ChainCode
25 Inner Join ZT_EAccountAdjust E ON a.EAIndex=E.EAIndex and a.BillerCode=E.BusCode
26 Where A.JobDate BETWEEN '20071001' AND '20071005' AND C.CompanyCode='533'
 In line 13 I want to add a Query to make sure if ZT_BillerInfo.Rmflag = 1, if it's =1 then ProChargeFee =0if ZT_BillerInfo.RmFlag =0 , then ProChargeFee = a.ProChargeFee.I add this line ã€?Case B.RmFlag = '1' then 0 else A.ProChargeFee 】instead of Line 13 (A.ProChargeFee)but I execute Sql I got error message on the line I have jsut modified..can you please help me to know why and how to correct it? thank you very much

View 4 Replies View Related

Query Issue Please Try To Correct The Query

Feb 26, 2008

Hi all,

I have written a query which is not producing the correct ouput.
Please help me to solve the query issue.

my query goes like this:-

SELECT ResourceInformation.PreferredFirstName, ResourceInformation.PreferredLastName, ResourceInformation.CellPhone,
ResourceInformation.HomePhone, ResourceInformation.HomeAddressLine1, ResourceInformation.HomeAddressLine2,
ResourceInformation.HomeAddressState,ResourceInformation.HomeAddressCity,ResourceInformation.HomeAddressZIP,
ResourceInformation.HomeAddressCountry, EmploymentInformation.ArrangementType, EmploymentInformation.PracticeGroup, Projects.Recruiter,
Projects.AccountManager, Projects.TEPOApproved, Projects.BillRate, Projects.Expenses, Projects.ClientProjMgr,
Projects.ClientAddressLine1,Projects.ClientAddressLine2,Projects.ClientAddressCity,Projects.ClientAddressZIP,Projects.ClientAddressState,
Projects.ClientAddressCountry,Projects.LabourCategoryNotes, Projects.Client, Projects.EndClient, Projects.ProjectStartDate,
Projects.DrugScreenRequired, Projects.SkillSet, Projects.AribaProposal, Projects.Sourcer, Projects.ProjectEndDate, Subtier.SubtierCompany,
Subtier.SubtierContactName, Subtier.SubtierAddressLine1,Subtier.SubtierAddressLine2,Subtier.SubtierAddressCity,Subtier.SubtierAddressState,
Subtier.SubtierAddressZIP,Subtier.SubtierAddressCountry, Subtier.SubtierEmail, Subtier.SubtierPhone, Subtier.TaxID,
Subtier.SubtierVendorPassthrough, Subtier.ClientPassthrough, Compensation.PaymentTerms
FROM ResourceInformation INNER JOIN
EmploymentInformation ON ResourceInformation.ResourceID = EmploymentInformation.ResourceID CROSS JOIN
Projects CROSS JOIN
Subtier CROSS JOIN
Compensation
WHERE (Projects.EmploymentID = 23) AND (ResourceInformation.ResourceID = 23)

View 1 Replies View Related

Why Does AVG Query Not Return The Correct DOUBLE Result

Jan 3, 2008

I'm using AVG in a simple query but the results are being returned as INTEGERs and not the correct DOUBLE form.

AVG is being used on integer fields in a .mdf database eg: "SELECT AVG(intField) AS Results FROM myDB"

Thanks,

Geoff

View 1 Replies View Related

Correct Syntax For Query Using Osql.exe In MSDE Setup

Nov 10, 2003

I have the following .bat file that I call to register users to my MSDE instance...

echo osql -E -S %COMPUTERNAME%OfficiumInstance -Q "sp_grantlogin '" + %COMPUTERNAME% + "ASPNET'"
echo osql -E -S %COMPUTERNAME%OfficiumInstance -d Officium -Q "sp_grantdbaccess '" + %COMPUTERNAME% + "ASPNET'"
echo osql -E -S %COMPUTERNAME%OfficiumInstance -d Officium -Q "sp_addrolemember 'db_owner', '" + %COMPUTERNAME% + "ASPNET'"

My question is how do I correctly append %COMPUTERNAME% as a string to

I have tried using + signs...

"sp_grantlogin '" + %COMPUTERNAME% + "ASPNET'"

But that doesn't work.
I have looked for .bat file tutorials on the web but can't find the correct way to do this.

Greg

View 1 Replies View Related

SqlCacheDependency Query Notifications -- Correct Permisisons -non Dbo Owner Account

Jul 5, 2007

 
Hi,
I am using SqlCacheDependency with the query notifications of SQL server 2005.
It is working nicely with the dbo.owner account but not with my web user account,
so I am thinking something is wrong with the permissions. 
After searching around, it seems that the main permissions to enable are these:
GRANT SUBSCRIBE QUERY NOTIFICATIONS TO theAccount
GRANT RECEIVE ON QueryNotificationErrorsQueue TO theAccount
GRANT REFERENCES on CONTRACT::[http://schemas.microsoft.com/SQL/Notifications/PostQueryNotification] to theAccount
GRANT SELECT TO theAccount.
 
I enabled these and it still doesn't work.  When I change my table, my cache is not getting invalidations.
Does anyone know what could be going on?  Or perhaps how can I trace the problem and get some clues?
thanks so much,
-tajmahal
 
 

 
 
 
 
 
 
 
 
 
 
 
 
 

View 3 Replies View Related

SQL Server 2008 :: Unable To Get Correct Service Name Using Registry Query

May 22, 2015

DECLARE @DBEngineLogin VARCHAR(100)
DECLARE @AgentLogin VARCHAR(100)

EXECUTE master.dbo.xp_instance_regread
@rootkey = N'HKEY_LOCAL_MACHINE',
@key = N'SYSTEMCurrentControlSetServicesMSSQLServer',
@value_name = N'ObjectName',
@value = @DBEngineLogin OUTPUT

[Code] ....

Query to get the exact servername ( do not want to use @@servername), either need to use registry to read or using DMV...

View 3 Replies View Related

Any Backup Vendor Can Provide?

Apr 13, 2007

Some of my customers ask for backup their databases, mainly MSSQL & MS Exchange.
I search for any of backup vendor; there are 2 choices, service provider and software publisher. Service provider eliminates my technical support on backing up my clients databases:cool: ; software publisher offer a chance for me to create new business line:rolleyes: .
What would your gurus prefer and why?
Any admirable company you can name?

View 5 Replies View Related

What Express Content Do You Want MS To Provide?

Dec 14, 2005

Folks,

I'm the project lead for SQL Server Express in Microsoft (as well as owning the Storage Engine). I'm going to make sure that threads on this forum get answered - I see a bunch with no answer so far.

Now to the point - we’re in the process of assessing the content that exists to help people learn and use SQL Server Express. This includes demos, tutorials, whitepapers, Webcasts, Starter Kits, and any other type of content you could imagine. So this is a great chance to TELL US WHAT YOU WANT! We’ll integrate your feedback and make sure that we try and address the most requested areas of content. Please be as specific as you can.

Thanks in advance for your feedback.


Paul Randal
Lead Program Manager, Microsoft SQL Server Storage Engine
(Legalese: This posting is provided "AS IS" with no warranties, and confers no rights.)

View 9 Replies View Related

To Provide Password On SQL Server

Apr 3, 2007

Dear All,



Greets for the day,



This is the first time I am using SQL Server 7.0 on a bussiness machine, I need to apply password on the database, OS is windows XP professional, need u r help on this.





View 1 Replies View Related

Applying SP4. Do You Have To Provide Sa Password?

May 14, 2007

I have never applied a service pack to sql server 2000. Someone tells me that you have an option of supplying the SA password but do not have to and the service pack is applied just as if you did supply the SA password. This sounds odd to me. So, is it true? I am asking because our server instance shows "SP4" but a fix that was supposed to be included in SP4 was apparently not as the problem persists (link from sql server 2005 to 2000 fails when referenced in sql2005). I was thinking that whoever ran the service pack may not have provided the SA password so some of the SP4 was not applied???



Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO" for OLE DB provider "SQLNCLI" for linked server "s-1". The provider supports the interface, but returns a failure code when it is used.



Thanks.

View 6 Replies View Related

VB5 And RDO Connections Any Good Sites Out There To Provide Help?

Mar 25, 1999

I am new to RDO and SQL I have been using DAO and know that the syntax is similar but the connections to the database is different. Does anyone know of a good site that explains this?

Thanks in advance.

LoPingKill
loping@inlink.com

View 1 Replies View Related

How To Provide Security To Stored Procedures

Jul 20, 2005

Hi all,I know that it is possible to encrypt Stored Procedures using 'withencyption'.But my problem is that when there are so many decriptingmethods available how far will the encyption be secure.Is there any other method to encrypt the stored procedures that areresiding on the customer sites.We do not want the customers to meddle with the SPs.If anyone knows can u please let me know.ThanksDilini

View 1 Replies View Related

Will A SQL Server Cluster Provide Me More Performance?

May 20, 2007

I have a database that stores the information of a third party system. The system where the database is running has reached its performance and hardware upgrade limits. I don€™t want to separate the database objects in two different database servers. How can I add a second server to increase performance? A cluster will help me in this case? Or there is any other way to group servers for performance?

View 10 Replies View Related

SQL Server Express: Can Someone Provide The Guide MS Does Not?

Mar 30, 2007

The overly complex MSDN library is proving virtually useless to me. To give you some background, I've programmed PHP / MYSQL websites, in-depth VBA programs for Excel and a bit of non-database work in various languages - I'm an amateur.



I've just bought a new PC (2g Ram, Core 2 Duo, Vista Home Basic) and would like to run Web Developer Exp, VB Exp and SQL Server 05 Exp.



Note. I have installed all three and run through Microsoft's video tutorial, until I hit a snag at the start of Tutorial 2. When try to create a new SQL Database in WebDev, an error saying either SQL Server is not installed or operating correctly (could Microsoft provide a more specific error or what????)



The questions Microsoft need to answer are:



1. What are the hardware requirements for SQL Server 05?

2. What are the operating system requirements for SQL Server 05?

3. What does IIS have to do with SQL Server 05?

4. How do you know if you meet the IIS requirements for running SQL Server 05?

5. Exactly what elements of SQL Server 05 are affected by different levels of IIS?

6. Can anti-virus or firewall software cause issues.



Please, some one from Microsoft respond.

View 5 Replies View Related

SQLDataSource Provide Select Parameter Value Programmatically

Sep 9, 2007

Hey All for some reason I can not get this right and/or find what I am looking for.
I have an SQLDataSource with a PartID set as the filtered value in the Datasource Query.
I am trying to use code beside to set the value and I am failing...lol...
Here is my attempt at it,
SqlDataSource1.SelectParameters("PartID") = txtPartID.Text
Any help would be great!

View 2 Replies View Related

RCW Proxy Is Not Be Able To Provide Messages To My Managed Code

Jan 10, 2007

Hi everyone,

Primary platform is Framework 2.0

Our current service throws on-demand .DTSX and now we'd like that will throw old ETL 2000 too.

I'd like to know if success or not success when calling dtspkg.dll from my managed code (vb).
Is it possible or not? I only capture errors for the sake of TRY..END TRY but I don't know how the hell to know
if the dts execution was successful.
Execute method not returns anything.

Currently my schema is the following:

paquete = New DTS.Package2

paquete.LoadFromSQLServer("SRVDESA1", , , DTS.DTSSQLServerStorageFlags.DTSSQLStgFlag_UseTrustedConnection, _
, , , "pruebaenric")

paquete.FailOnError = True


Try
paquete.Execute()

Catch ex As Exception
' stuff
End Try

paquete = Nothing



I've tried to use WITHEVENTS but it's useless at all from there.

Events are not fired. I though that RCW created for this could be able to call them...

Private Withevents paquete as dts.package2

Private paquete_OnError()
stuff
Private paquete_OnProgress()
stuff

Thanks for any input related with,

View 3 Replies View Related

Please Provide Help On How To Get Connection Tab For A Selected Provider In Web Application

Oct 15, 2007

Hi Sir

In My web application i am using the ".UDL" file functionality.

<![endif]--><!--[if !vml]-->The €˜Select Provider€™ tab will be used to allow users to specify the OLE DB Provider to be used for the connection. now i am able to get all provides available in system. But i have a problem how to get the cossesponding connection tab at runtime.

please save, i am in crusial stage.

Thanks In Advance.

etlu me srinu

View 3 Replies View Related

How Do I Provide Anonymous Access To The Report Viewer

May 6, 2008

In remote processing mode, I am receiving the following error when I view a report in the browser: HTTP status 401: Unauthorized.

I have SQL server 2005, Microsoft Internet Information Services (IIS) 6.0 , Windows Server 2003 running on a virtual PC.


I am using Visual Studio 2008 to create a webpage with a reportviewer.

We are using Windows Integrated Security. How do I provide anonymous access to the report viewer?

View 4 Replies View Related

How To Provide An Input Parameter For A SqlDataSource Using The Different Source Alternatives???

Jan 11, 2006

Hello everybody,
I'm new using ASP 2.0,  I was trying to find out how do i tell a SqlDataSource the parameters it will be using for the select query.  I was looking at the Configure Data Source wizard and when I press the where botton to create the parameters, I do not know how two of the available Source selections work which are: (Query String, and Session). What I want to understand is how do I pass the parameter value during the form load like I used to do with ASP 1.1.
I used to write: during the pageload event:
me.dataAdapter.selectparameter("@param").value = [myVar]
me.dataAdapter.fill(Me.ds)
 
I tried to do something like this for the SqlDataSource but didnt work.
can anyone tell me how can I acomplish this?
 
thanks a lot.
 
Ed.

View 7 Replies View Related

Has Anyone Had Any Experience With This Feature? Microsoft Provide A Sample C++ Prog

Apr 29, 2004

I am using SQL 2000 running a couple of large (up to 70GB) databases. I am currently backing up to disk, which is working fine.
I now want to backup the databases using the Snapshot feature of my storage array. To do this however, I first need to put my databases (3 of them) into 'backup mode', so as to stop transactions being written to the database, and provide a consistent database to backup.
Has anyone had any experience with this feature? Microsoft provide a sample C++ program called snaphot.cpp that puts a single database into 'backup mode'. I am not particularly clued up on C++. Can multiple databases be put into this mode simultaneously? Is this particularly difficult to do?
Any help would be greatly appreciated

View 1 Replies View Related

SQL Security :: Provide Truncate Table Permission For A User

May 1, 2015

best possible way to provide truncate table permission to a SQL Server Database user (ddl_admin role cannot be granted to the user in my case)

View 3 Replies View Related

Directory Structure Not Known Then How To Provide File Path For A FILENAME Param

Feb 19, 2007

Hi,

I am adding a file to a filegroup on a remote system, and i don't know the direcotry structure of that machine, how can i provide the path for FILENAME param. :eek:

ALTER DATABASE TESTDB ADD FILE (NAME = N'TESTFILE', FILENAME = N'physicalfilepath.ndf') TO FILEGROUP TESTFILEGROUP

Warm Regards,
Mushq

View 1 Replies View Related

SQL 2012 :: How To Provide Data In Denormalized Form From Normalized Tables

Apr 14, 2015

I have a requirement to provide data in a denormalized form from normalized tables. Working in SSIS.

I have two tables: EmployeeCountry and Country.

EmployeeCountry
EmployeeId (PK)(FK)
CountryId(PK)(FK)

Country
CountryId (PK)
CountryName

There will only be a max of 3 Country entries for each Employee. So I want to select the EmployeeId and get the three CountryIds so it would look like this:

Employee
EmployeeId
CountryId1
CountryId2
CountryId3

View 9 Replies View Related

Provide Monthly Report To Shows How Successful Deployment Was For Particular Patchgroup

Sep 1, 2015

I need to calculate the success rate of our OS Patch deployments. the data from system is stored in SQL with corresponding states (installed, missing, ...)

I would need to provide monthly report that shows how successful the deployment was for particular patchgroup. I have the following 2 dummy tables (just used as example)

table5 ==> Table containing patch groups + patches
table6 ==> Table with machines names, patches and patch state

select * from table5
pgrouppatch
GROUP1PATCH1
GROUP1PATCH2
GROUP1PATCH3
GROUP1PATCH4

[Code] ....

Result would be
pgroup install missing
group1 80% 20%
group2 50% 50%
group3 55% 45%

Ideally I would like to do this in T-SQL but if necessary can also do this in .NET Function. Only mention this but both Patchgroup and machines are dynamic each month can be different.

below are the sql scripts to create tables and populate with data

CREATE TABLE [dbo].[table5](
[pgroup] [varchar](128) NOT NULL,
[patch] [nvarchar](128) NOT NULL
)
CREATE TABLE [dbo].[table6](
[machinename] [varchar](128) NOT NULL,

[Code] ...

View 9 Replies View Related

Why Don't You Guys Provide A Way To Find Out The Dependancies Of Any Object (SProc, Table, View And Etc...) Within SQL Server...

Nov 15, 2007



Why don't you folks (SQL SERVER Management Studio Team or SQL SERVER Database Engine Team) provide an option by using which I would be in a position to know what all the other objects are depended on a selected object and vice versa. That means:



When I select a Table within the SQL SERVER Management Studio if there is an option for understanding "Which all the objects (tables or views) it is depended on (I mean Foreign key and etc... kind of relations) and also Which all the objects (Tables, Views, Stored Procedures and etc...) are using this table", It would be of great help for all developers.



I can be contacted over kotis@microsoft.com

I BLOG @ http://blogs.msdn.com/kreddy

View 3 Replies View Related

Support For SQL Express2005 My Host Provider Does Not Provide Support?

Dec 5, 2005

Reader Community
I've just started hosting my newly created Microsoft Visual Web Developer 2005 Express Edition web site.  Unfortunately the Login group membership functions will not function correctly.  Having contacted the web service hosting provider, They replied: "We do not support SQL express2005.  The only way to use the extra functions of ASP.NET2 such as group membership is if it is using an SQL 2000 database to connect to. "
Is it possible to design web sites with Microsoft Visual Web Developer 2005 Express Edition that store membership details on an SQL 2000 database?
I've just paid £88 approx. $140 for a years subscription, have I chosen the wrong web service hosting provider?
Should I have designed the web site with a better web site design software tool that also makes designing membership login functionality easy, just as Microsoft Visual Web developer 2005 express edition?
Look forward to all comments?
Regards
 
Philip

View 1 Replies View Related

An Error Has Occurred While Establishing A Connection To The Server. When Connecting To SQL Server 2005, This Failure May Be Caused By The Fact That Under The Default Settings SQL Server Does Not Allow Remote Connections. (provider: Named Pipes Provide

Jan 24, 2008

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider,

View 2 Replies View Related







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