List With Locations And How Many Fields Have This As Their Location

Jun 18, 2008

Hello

I have a table with inventory where each item has a field called location. What i would like to do is to get a summry with how many items there are in in each location. All the data is stored in one single table named article. inside this table i have Counter (PK), Artnr, location, type and some other things. 2 other importent columns are date and interval. Date is the last time the item was inspected and interval is an integer saying how many months untill the next inspection. So i guess Counter, location, date and interval, are the ones i need to use in my query to do the following.

Wo what i would like to do is to present a short list with all locations and then a number that says how many items need inspection in 3 months or less (and even items that have apssed their date). Im somewhat new to sql so iv only been doing the regular insert, delete and update here and there but i have a feeling this query is a bit more complicated. The list does not need to say what items needs inspection. I only need to know how many.

Could anyone help me out with constructing this query?

View 2 Replies


ADVERTISEMENT

Selecting A Location Or All Locations

May 7, 2007

hey i am going to be writing a query to search for stock in a certian location, but what i wnat to do is allow the user to search in all locations as well, how could i do this? or would it be more asp based?
 Jez

View 16 Replies View Related

Replication :: Replicate All Data From Remote Locations To Central Location

Aug 29, 2015

there are several remote locations where sql is running, my company has asked me to find a way to collect all the data from the remote locations to a central location automatically,for example day to day data should be synced at night time from 2am to 7 am and it should beĀ compressed automatically before data transfers to the central location. NOTE there is no domain only standalone workstations

View 3 Replies View Related

Report Designer: Need To List Fields From Multiple Result Rows As Comma Seperated List (like A JOIN On Parameters)

Apr 9, 2008



I know I can do a JOIN(parameter, "some seperator") and it will build me a list/string of all the values in the multiselect parameter.

However, I want to do the same thing with all the occurances of a field in my result set (each row being an occurance).

For example say I have a form that is being printed which will pull in all the medications a patient is currently listed as having perscriptions for. I want to return all those values (say 8) and display them on a single line (or wrap onto additional lines as needed).

Something like:
List of current perscriptions: Allegra, Allegra-D, Clariton, Nasalcort, Sudafed, Zantac


How can I accomplish this?

I was playing with the list box, but that only lets me repeat on a new line, I couldn't find any way to get it to repeate side by side (repeat left to right instead of top to bottom). I played with the orientation options, but that really just lets me adjust how multiple columns are displayed as best I can tell.

Could a custom function of some sort be written to take all the values and spit them out one by one into a comma seperated string?

View 21 Replies View Related

How To Get LIST Of Fields In A Report (designer)

Jun 25, 2007

Hi All,



When I'm building a report in report designer and get error message that says --error like --field textbox25--whats the easiest way to see all my report fields and quickly access them instead of clicking every field in a report?



Ideally a fields map with links to these fields.



thanks



Sonny

View 1 Replies View Related

Separate Dropdown List Selectedvalue Into Two Fields

Aug 1, 2006

i have two columns in a "release" table that i concatenate on my aspx page into one value for my dropdown list.  for example, my database columns might look likeMajor: 3 | 3 | 4 | 4 | 5Minor: 1 | 2 | 1 | 2 | 1and my drop down list text like3.1 | 3.2 | 4.1 | 4.2 | 5.1my question comes when trying to take the drop down list's selected value and splitting it back into two fields so that i can use it for another query.  how can i split my "major" and "minor" version numbers back up so that i can run a query similar to:SELECT * FROM [Version] WHERE (([Major] = @Major) AND ([Minor] = @Minor))but only having the one parameter of: <asp:ControlParameter ControlID="ddlVersion" Name="Version" PropertyName="Text" Type="String" /> where the selected value has a string of "<major>.<minor>" (where the numbers are separated by a period)?

View 6 Replies View Related

Reporting Services :: Could Not Update List Of Fields For Query

Oct 7, 2015

I have the following store procedure which execute perfectly fine Under SSMS as it is :

-- Insert statements for procedure here
SELECT APHIST.ReturnDate AS ATDATE
,API_HIST.[ActionPlanItemID]
,API_HIST.[ActionPlanID]
,PIT.[ProductItemID]
,PIT.ProductItemCode

[Code] ....

But then when I try to create a dataset using ReportBuilder and pointing to that StoreProcedure, I get the following error message box :

"Could not update a list of fields for the query. Verify that you can connect to the data source and that your query syntax is correct. AnĀ  item with same key already been added" ...

View 3 Replies View Related

Retrieve Fields List From A Published Report Data Model Published On The Reporting Server.

Jul 17, 2007

Can someone please tell me how to retrieve/query the list of fields from an entity of a report data model that has been published on the reporting server programmatically ?

I am trying to upload a report data model to the reporting server and planning to use that model as the data source and consume it through our existing web application?

Thank you ,

Rashid A. Khan

View 1 Replies View Related

Oracle And MS SQL Locations

Jan 17, 2007

Can oracle91 and MS SQL2005 be on same server

View 20 Replies View Related

Recommended File Locations?

Apr 23, 2001

I know I've seen documentation on this but I can't find it at the time. What's the recommended file locations for a SQL install.. System and Data on a RAID drive and logs on a separate drive that's mirrored..? Oh and if anyone has links to this info let me know also.

Thx!

View 4 Replies View Related

Backup Device Locations Help

Mar 23, 2004

I am a newbie in SQL Server Administration. I decided to make the move within my company that no one else wanted.

I have SQL Server 2000 running at this time; users are connecting and using it. My question I guess pertains to the backups.

I have two drives setup for data and transactions logs (D: E:)

My backups are running but backups are being sent to the d:systems datamssqlackup folder. once backups are comlete I normally copy the backups to a network share that is being backed up nightly to tape.

My question is this:

How do i create a device location under backup properties to point to a network share? i would like for the backups to go straight to a network drive so i do not have to copy the backups every morning when i come in.

View 8 Replies View Related

Move Log File Locations

Jul 23, 2005

I am trying to split the log and data files between two drives on a newSQL-Server 2000 installation. I followed the instructions from the MSarticle 224071 (Moving SQL Server databases to a new location withDetach/Attach).Unfortunalty, when I try to move the Master database, as perinstructions, access to SQL-Sever is lost;the service will never startagain. I've tried this twice after re-installing with the same results.Anyone have any ideas as to what is going wrong?Tim

View 3 Replies View Related

Different Folder Locations During Setup

Apr 18, 2007

Hello there,

I need to install SQL 2005 in one drive on my computer, and data folders in another drive. Can anyone tell me how this can b done during setup please?

Thanks in advance.

Hemant

View 1 Replies View Related

Server Rebuild And Changing Locations

Aug 13, 2001

I have a server that is being rebuilt soon and the data storage is going to be be restructured at the same time.
Currently all data, logs and backups are held in the default e:mssql7 directory (on a RAID 1+0 system).
After restructure data will be one one drive (RAID 5), backups logs and templdb will be on various others.
I have a couple of questions;

1. My plan is to detach all databases and backup the .ldf and .ndf files (logs are not as important after this point). Then backup master and msdb databases. Once the new server is built (specifying the new file locations at install), I will restore master and msdb and finally reattach the databases from their new locations. Does this sound reasonable?

2. At the point of server install, I intend to specifiy the default locations for data and log files. When I come to reattach the data files I want SQL Server to create a new log, but place it in the new default location. Will it do this automatically?

Thanks in advance for your help

Jonathan

View 1 Replies View Related

Good Reference Locations For Information

Aug 6, 1998

Just as an aside...

If you have a question or problem with SQL Server you might want to try three places before/in addition to listing questions here... only because it will be quicker for you rather than waiting for someone to post a response.

1) SQL Server Books OnLine (install on hard disk when you install SQL Server... full set of manuals and highly indexed)
2) http://www.microsoft.com/Support/ (you may need to register but it is free) (Use Support OnLine and look under SQL Server for specific support)
3) http://support.microsoft.com/support/default-faq.asp (FAQ)

Both can help with error numbers and #2 is especially good to find known bugs, fixes, work arounds, etc.

Hope this helps,

Don

View 1 Replies View Related

Moving Database Locations On Cluster

Dec 2, 2005

Hi,

We have a 2 node cluster and want to move our database files from the F: Drive to the G: Drive.

The user databases are easy enough (detach/reattach).

Can anyone give any ideas how to move the system databases?

Thanks

View 1 Replies View Related

Copy External Files To Different Locations

Dec 14, 2005

Hi,

I'm fairly new to SQL, waiting on a course on how to use it, but wanting to get stuck it.

I was wondering how I can get SQL to copy a file, say in Access, from one location to another.
This would be part of my job with delivering data extracts users.

Many thanks in advance

View 5 Replies View Related

Move File From Variable Locations.

Apr 14, 2008

Here is what I am trying to accomplish. I need to move *.pdf files from a local directory into a local staging directory, then from the Staging directory FTP them up to the customers site. Then move the files from the staging directory to an archive directory.
I can do this fine as long as all values are static in SSIS, I need help to figure out hoe to do this using variables. The Directories to be used are to be supplied by the DB all that is give in the directory itself all files in the directory need to be moved.
Any help would be appreciated.
Thank you,
Mike

Michael Alawneh, DBA

View 1 Replies View Related

Autoincrement ID For Locations That Members Create

Aug 22, 2013

I'm using a SQL 2008 database on a SQL 2012 hosted server. I have an autoincrement ID for locations that my members create. These go up by 1.... eg. 9400, 9401, 9402.

Tonight a member attempted to make a new location and the ID went from 9407, 9408 and JUMPED to 10408. Any subsequent creations only continue from 10408 onwards.

What happened here? 9409 to 10407 just aren't available.

View 2 Replies View Related

A Constraint For File Locations And URLS?

May 11, 2007

Hi,
I have to create a datebase for an assignment and I am using MSSQL and need a little bit of help for something that I don't think can actually be done.
Basically I have an artist table. Now each artist may well have a website of their own where their biography can be found. In my artist table I have an artist_bio field where I want the URL of the artists bio to be placed and only the URL. So for example I would want www.iamanartist.com/mybio to be put into that field. So I was wondering if there was a constraint that could do this?
I don't think there is because URLS can be so complicated but if someone could tell me whether it is or isn't possible I would be really grateful.
I am also wanting to do something similar with the location of a hardcopy of their work. So I have a digital_images table with a location field where the loaction of their work will be on a harddrive. Is this possible or not as well?
Cheers for any help you can give,
Liam

View 1 Replies View Related

How Much Of SQL Express Is Required At User Locations?

Oct 3, 2006

SQL Express is quite sizable for what I want to do but it appears to have many features that could turn out to be highly desirable.

It makes sense that the entire SQL Express must be installed at the developer's location, but what portion of it is required at the application user's location? All, or some?

Thanks

View 1 Replies View Related

How Do I Change Default Database Locations?

May 17, 2006

The area to change my default database location is "greyed" out. I wish to put all my data on a seperate drive than the OS (D:). What am I missing that I can't change the default database location?

View 1 Replies View Related

Copying Backup Files To Different Locations

Oct 25, 2007

I have a maintenace plan that copies production backup files in DR server. The production is mission critical and runs 24/7. We have a round the clock backups. Backups include full backup, differential backups and log backups.

To secure these backup files, I was asked to keep these files in different server at the same time as it goes to DR Server. As I am using maintenace plan for scheduled backups that go to DR server and I had no idea how to incorparate copying these files to another server in the same maintenence plan. I came up with idea using xp_cmdshell stored proc that I attached on the maintenace plan in executeT-SQL statement task. The statement looks like


Exec master..xp_cmdshell 'copy e:DRbackup*.bak \fgh-sql16ackup$'

Above statement copy all backup files on DR server and takes these to remote server called fgh-sql16.

My question here is ....are there any other effective methods to copy backup files simultaneously to different servers via maintenace plan.

Thanks all

View 6 Replies View Related

Multiple Data Files &&amp; Locations

Oct 23, 2007



What is the recommendation for having multiple data files ? I've read 1 per CPU etc... some say keep it all in one data file.

How do multiple sql data files help when they are located in the same raid group/single volume ?

This is the setup that I have:
4 CPU box with 2x P400 array controller to 2x MSA10 exclosure (for data only, tempdb,logs,backups are on other arrays)
one array controller per enclosure. single big RAID 10 volume on each ( or should I do 4-4-2 separation).
(In single big raid 10, All disks would help for performance of each query... I don't want to create separate raid groups, mostly due to growth constraints in the future, am I wrong ?)

How should I split database across these two enclosures ? one,two data files on each or more ?

How would this look in OLAP vs OLTP scenarios ?

Thank you.

View 1 Replies View Related

Dependency File Locations For A SSIS Package

Jul 24, 2007

Hi all,

I've have a simple question. After running the SSIS deployment utility to install a couple of SSIS packages into a SQL Server, is there a way of determining programmatically (at some later stage) where the dependency files (in my case a simple xml configuration file) for the SSIS packages were installed (if the user chose not to install it into the default location).



Thanks,

Johan

View 1 Replies View Related

Configuration Auditing Locations For SSIS Package

Aug 27, 2007

I have been asked by the powers that be to make sure that my configuration database gathers some auditing information. I have looked over these and have no idea where to find the information in SQL Server. If you could tell me the table and database that the informations are located in, I could write the T-SQL to find them. IMPORTANT you do not have to answer all of them, I am grateful to those that pick and choose even one to help me with.



SQL Server Auditing

General/Access Auditing Items

Software Install (DB): Verify that the sample and demonstration databases are not installed and remove the temporary setup files created by SQL Server setup process

Authentication and Access Control

Default user accounts & passwords (DB): Default user account passwords will be changed and will follow the corporate password standard for frequency of change, length and complexity
User authentication (DB): Windows authentication is preferred. Mixed mode authentication can be used.
User passwords (DB): All user passwords (mixed mode, SQL authentication, Windows authentication) will follow the corporate password standard for frequency of change, length and complexity.
Sharing database user accounts (DB): Sharing of database user accounts is not permitted without an explicit exception documented and granted by IS Information Security.
Normal users submitting jobs (DB): Normal user jobs should not be run as SA. Create a role-based policy for normal users that must be allowed to run jobs. They should be included in the role created for job submission.

Monitoring and Reporting

Auditing (DB): For all database installs after XX/XX/XXXX, Auditing should be turned on and at minimum set to log failed connections. Logs should be saved to a different hard drive than the one which data files are stored.
SQL error log (DB): Processes should be in place to protect error log data so it can be reviewed for seven days prior to being overwritten or deleted from the system.

Networking

Cross-database ownership chaining (DB): Cross-database ownership chaining is disabled.
Code of stored procedures, triggers and views (DB): Who has access
Public access to SYSXLOGINS and SYSDATABASES tables: The public role will not have access to the SYSXLOGINS or the SYSDATABASES tables.
Public access to SYSOBJECTS and SYSCOLUMNS tables: The public role will not have access to the SYSOBJECTS and SYSCOLUMNS tables.
Public access to stored and extended stored procedures: The public role will not have access to stored or extended stored procedures.
Public access to xp_regread and xp_instance_regread: Restrict public role access to xp_regread and xp_instance_regread.
Public group access to mswebtasks table: The public group will not have insert, update, delete or select permissions to the msdb.dbo.mswebtasks table.
Temporary directories: For all database installs after xx/xx/xxxx, all temporary directories will be cleaned on a periodic basis.
Auditing II: Auditing should be turned on and at minimum set to log failed connections. Logs should be saved to a different hard drive than the one which data files are stored.
SQL Server instances visibility: All SQL Server instances should not be visible across the network. They should be set up with the hidden option activated.
Default ports: SQL Server should be configured to not use the default ports.

View 5 Replies View Related

Configuration File Locations - Likes To Say It Can't Load Them In Designer

Feb 28, 2006

I have a package and added a configuration file to it to hold settings such as connection strings etc.

When I open the package up in the designer and check where the configuration file is from, it likes to specify it with a full path like this:

\myserverprojectspackageslah.xml

Where blah.xml is the configuration file and the package file is in the same exact directory.

This creates an issue when I use build and then try to install the package on a server. When installing, the server tries to read the config from \myserverprojectspackageslah.xml which it can not.

Conversely I've tried editing the location in the designer changing it to just be "blah.xml". Then after using the build option I am able to install the package successfully on the server (it can not find the xml file).

However when I then load the package later in the designer to try to edit or chagne it, the designer complains that the "configuration file could not be loaded" and it can't find it even though it is in the same directory that the package definition file is in.

What's going on with this and how do i solve it?

View 1 Replies View Related

SQL Server 2008 :: Find Locations With MAX Sales Amount Per Customer

Feb 13, 2015

I have an invoice table with customer, date, sales location, and invoice total. I want to total the invoices by location by customer and see what location sells the most to each customer. My table looks like this.

CustDate LocAmt
A1/1/2014 1520
A1/1/2014 1560
A1/1/2014 2575
A1/1/2014 3580
B1/30/2014 15100
B1/30/2014 15200
B1/30/2014 2575
B1/30/2014 25150
B1/30/2014 35250

I want to get this, because for customer A, location 35 had the largest SUM of sales and for customer B, location 15 had the largest SUM.

CustLoc
A35
B15

If I have to use CTEs to get there, I can do that too. Just a little lost on how to get only the one location per customer.

View 2 Replies View Related

SQL 2012 :: Create SSRS Report Based On Multiple Locations

Oct 23, 2015

I am looking to create an SSRS report based on multiple locations. There will be one report that presents a summary of all reports, and then individual report for each location.Instead of creating 2 separate reports, is it possible in SSRS to display different datasets based on the parameter selected?

View 3 Replies View Related

SQL Server 2008 :: How To Add Locations To Open File Dialog Box In SSMS

Apr 20, 2010

When I go to open a file in SSMS, the Open File dialog box appears. In the left side of that box, there is a panel containing shortcuts to various locations: Desktop, My Projects, and My Computer. I would like to add some shortcuts to folder that I use in this area, but I haven't been able to figure out how. how to do this?

View 9 Replies View Related

Differences In SSIS File Locations In SQL Server Agent Step

Jun 22, 2007

When adding an SSIS step to a SQL Server Agent job, when selecting the location of a config file, the dialog lets you select from the database server you're working with. If selecting the location of the package itself (when the source is File System), the dialog lets you select from the machine where Management Studio is sitting instead of from the database server. Is that intentional? And if so, why? Should I just use a fully qualified file name for the package location rather than one using a drive letter?

View 3 Replies View Related

SQL Server Express: Restore, Backup And Attach Do Not Work Anymore &&amp; Database Locations Fault

May 7, 2008

Hello there,

I've some really big problems with SQL Server 2005 Express. I Recently, I had 2 instances on my machine, one was a SQL Server 2000 Developer and the other a 2005 Express Version. The 2000 version was not necessary anymore, so I unstalled it, since then, the Express version keeps having probems.

Under the Server Properties -> Database settings -> Database Locations I've changed the path to D:sqldatamssql, but now, the programm always takes the "C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLData" to store and load the databases, no matter what I do.

And there are more problems see here:

Restoring does not work=======================
I wanted to restore a database called "fw40_admin" from a backup file (.bak), but that didn't work at all, it always says this as an error:

"System.Data.SqlClient.SqlError: The operating system returned the error '5(error not found)' while attempting 'RestoreContainer::ValidateTargetForCreation' on 'D:sqldatamssqlfw40_admin.mdf'. (Microsoft.SqlServer.Express.Smo)"

But as soon as I type in the installation path "C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLData" inside the "Restore As" under "Options", it works.

Why does the backup only work in "C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLData", BUT the database locations under the server properties is indicated with "D:sqldatamssql"????


Attaching does not work=======================
Attaching an existing database does not work either. Most databases (mdf) are located on the path D:sqldatamssql, but as soon as I press

Attach Databases -> Add

The dialog window appears with the "D:sqldatamssql" path, but it is unable to find any *.mdfs altough THERE ARE .mdfs in this directory. But Express can find databases in the selected installation: "C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLData".
Why can't Express see the directory on the D: partition???


What is wrong? Here? Can anybody help me?

View 5 Replies View Related

Subreports: Parameter Value Dropdown Shows Sum And Count Fields But Not The Actual Data Fields.

Jan 28, 2008


I have just started using SQL Server reporting services and am stuck with creating subreports.

I have a added a sub report to the main report. When I right click on the sub report, go to properties -> Parameters, and click on the dropdown for Parameter Value, I see all Sum and Count fields but not the data fields.

For example, In the dropdownlist for the Parameter value, I see Sum(Fields!TASK_ID.Value, "AppTest"), Count(Fields!TASK_NAME.Value, "CammpTest") but not Fields!TASK_NAME.Value, Fields!TASK_ID.Value which are the fields retrieved from the dataset assigned to the subreport.

When I manually change the parameter value to Fields!TASK_ID.Value, and try to preview the report, I get Error: Subreport could not be shown. I have no idea what the underlying issue is but am guessing that it's because the field - Fields!TASK_ID.Value is not in the dropdown but am trying to link the main report and sub report with this field.

Am I missing something here? Any help is appreciated.

Thanks,
Sirisha

View 3 Replies View Related







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