I'm trying to Display 2 fields using the SalesOrderDetail table.
CarrierTrackingNumber
Count the number of CarrierTrackingNumber and give alias name of “Count CarrierTrackingNumber.”
I only want to return records where the CarrierTrackingNumber has count = or greater than 2.
Below is the SQL I developed, but I'm getting this error when I try to execute: Msg 245, Level 16, State 1, Line 1
Conversion failed when converting the nvarchar value '4911-403C-98' to data type int.
SELECT CarrierTrackingNumber, ( SELECT COUNT(CarrierTrackingNumber) FROM SalesOrderDetail WHERE CarrierTrackingNumber >= 2 ) AS CountCarrierTrackingNumber FROM SalesOrderDetail
I want to select all the fields from just one table This is what i have and i am having trouble selecting all the fields select * from ace_users where chdata EXISTS (select chdata, count(chserialnum) from ace_users group by chdata having count(chserialnum)> 1)
Dear All I am trying to populate an OledbDatareader for binding to a ASP datagrid.
For this I use select statement to display combined fields in a datagrid cell. Eg. Select (Field1+ '<br/>' + Field2 + '<br/>' + Field 3) As Address .. and so on. But the problem is if any of the three field is null the combined field 'Address' returns as Null. Please help me to overcome this problem.
Now I need to display the second field which is a #-separated field as individual fields alongwith tghe other fields that are shown on execution of the query. Can this be done? Please guide me on this...
I have a requirement to display the elapsed time between two datetime fields. What i have been able to do is datediff the dates and get the elapsed time in minutes and then i am trying to format it as HH:MM.
For example, an activity started on Nov 1 2007 08:00 and finished Nov 1 23:59, the elapsed time should be displayed as 15:59.
The other example is if the activity spans over a couple of days, it should be say 49:03.
I put the following code in the format of the textbox, but it only seems to work when the length of the minutes is greater than 1.
I am trying to figure out a way to toggle the visibility of attribute data based on a parameter. Specifically, I have a report that has many columns that an end-user may not want to see, depending on what they are using the report for. I know you can toggle visibilities on individual columns easily enough, however I want the user to be able to select which fields (at the attribute level) they want visible on the report up in the parameters, via a multi-value prompt.
I have a report parameter named "Schools" which display a list of schools. For example, Alo elementary school, Balo middle school and Calo high school.
When "Alo elementary" is selected the report only display students from that school along with other assessments data fields. same goes for other schools too. But I want to display different data fields for "Calo high school" when it is selected. It is not currently possilbe becasue I am using the same template for all types of schools. There some fields only should be displayed for "Calo high school" but not for any other type of schools.
I can accomplish this by creating two separate report, one for "Calo high school" and the other for other schools. But I want to accomplish this just by creating one report. So when "Alo elementary school" is selected it displays report with certain fields and when "Calo high school" is selected then it displays same fields as "Alo elementary school" but as well as some other fields too in the report. Is this possible? Need help.
Hi, Im trying to pull data from 2 fields in the same table into a SqlDataSource that feeds into a GridView, and display them as 1 field in GridView? I have a database table that has entries of users and their friends. so this tblFriendUser has a column called UserName and another column called FriendUserName. I am trying to get a list of friends for that particular user. Note that if User1 initiated the friend request, he will be listed as UserName and his friend as FriendUserName, but if his friend initiated the friend request, it will be vice versa: him being the FriendUserName and his friend the UserName. So I want the following 2 queries run and merged into one query in order to return 2 columns only: UserFriendID & UserName, is that possible? Is my design bad? Any suggestions/advice would help! Thanks a lot!
SELECT UserFriendID, UserName FROM tblUserFriends WHERE (UserName = @UserName);
SELECT UserFriendID, FriendUserName AS UserName FROM tblUserFriends WHERE (FriendUserName= @UserName);
select * from ldap_users as PL where (emcidentitytype like '%P%') and(ctscUserKeywords NOT LIKE '%LockedOut%') AND(ctscUserKeywords NOT LIKE '%LockedOut%') and emclastdayworked = '' and (uid in(select fax from oracle_11i_user) or uid in (select fax from ORACLE_1103_USER))
This query only display all the fields from PL. I want to display end_date from both oracle11i and oracle1103 tables? How would I do that?
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.
How can I create a Table whose one field will be 'tableid INT IDENTITY(1,1)' and other fields will be the fields from the table "ashu". can this be possible in SQL Server without explicitly writing the"ashu" table's fields name.
Hello !I'm trying to update one table field with another table searched firstdate record.getting some problem.If anyone have experience similar thing or have any idea about it,please guide.Sample case is given below.Thanks in adv.T.S.Negi--Sample caseDROP TABLE TEST1DROP TABLE TEST2CREATE TABLE TEST1(CUST_CD VARCHAR(10),BOOKING_DATE DATETIME,BOOKPHONE_NO VARCHAR(10))CREATE TABLE TEST2(CUST_CD VARCHAR(10),ENTRY_DATE DATETIME,FIRSTPHONE_NO VARCHAR(10))DELETE FROM TEST1INSERT INTO TEST1 VALUES('C1',GETDATE()+5,'11111111')INSERT INTO TEST1 VALUES('C1',GETDATE()+10,'22222222')INSERT INTO TEST1 VALUES('C1',GETDATE()+15,'44444444')INSERT INTO TEST1 VALUES('C1',GETDATE()+16,'33333333')DELETE FROM TEST2INSERT INTO TEST2 VALUES('C1',GETDATE(),'')INSERT INTO TEST2 VALUES('C1',GETDATE()+2,'')INSERT INTO TEST2 VALUES('C1',GETDATE()+11,'')INSERT INTO TEST2 VALUES('C1',GETDATE()+12,'')--SELECT * FROM TEST1--SELECT * FROM TEST2/*Sample dataTEST1CUST_CD BOOKING_DATE BOOKPHONE_NOC12005-04-08 21:46:47.78011111111C12005-04-13 21:46:47.78022222222C12005-04-18 21:46:47.78044444444C12005-04-19 21:46:47.78033333333TEST2CUST_CD ENTRY_DATE FIRSTPHONE_NOC12005-04-03 21:46:47.800C12005-04-05 21:46:47.800C12005-04-14 21:46:47.800C12005-04-15 21:46:47.800DESIRED RESULTCUST_CD ENTRY_DATE FIRSTPHONE_NOC12005-04-03 21:46:47.80011111111C12005-04-05 21:46:47.80011111111C12005-04-14 21:46:47.80044444444C12005-04-15 21:46:47.80044444444*/
I am using MS SQL 2012. I have a table that contains all the data that I need, but I need to summarize the data and also add up decimal fields while at it. Then I need a total of those added decimal fields. My data is like this:
I have Providers, a unique ID that Providers will have multiples of, and then decimal fields. Here are my fields:
I would like to search a table for a phrase, or for a partial phrase,eg on table product - for name or description, or name + descprition.How does one say select * from product where name + description like%phrase%or contains phraseCurrently I can get where name, or where descriotion like %phrase%,eg, where name like krups, or where description like coffee makerBut if I search for where name like %krups coffee maker% i get noresults. krups is in the name field, coffee maker is in thedescription field.Thanks,-M
Sorry for the lengthy question, but here goes: I currently have an access database with a FE and BE that resides on each users laptop. Weekly they connect to the network and synch the BE the master on a network drive. There are numerous propblems with this as it has grown quite extensive.
We would like to have this be a server based database with the remote users either having access through the web or something else?
A few of the capabilities of the current database: 1. generate and print reports 2. update project forms. 3. enter time logs 4. enter notes
My question is: What are my options for a remote FE? I am well versed in VB6 and Access. Would be willing to learn other languages (VB.net, my SQL, etc.) Would I be able to have the same functionality or would I have to have separate software for certain functions?
Hi, If I don't have any visual studio design tools etc. Is there any way I can build a simple form that will allow users to view, insert, update and delete single rows from a SQL 2005 database? Or is there any free downloads that might help. the table is really simple and has only 4 fields
I am new to SQL Server. I currently have an Access 2007 database and next year my client would like to migrate to SQL Server. Which Front End is the best...Access, VB.net or some other platform altogether?
I'm doing a database for employee info and thier payroll.. im using SQL Serevr 2000 and IIS but i'm not too sure what to use as the frontend, a VB would kinda be overkill because each employee just needs to be able to update his own info and addresses, maybe a XML or some other page that uses windows logins for authentication? any ideas, this is my first project like this on on a college Coop
i am almost finished building the front end for an application to manage restaurants. i am developing the front end with access vba, and intend to use sql server as a back end for the service. i just came across a group of people bashing access developers on a different site. i have several restaurants interested in using the service, and believe that the service should be very successfull (i have a very specific customer base that is currently not being targeted). the access component would not be a multiuser application. before i distribute the app i would appreciate any input. am i getting myself into trouble using access vba? should i run scared and switch to a vb.net web service? thanks in advance for any thoughts.
Below is a post by blindman from my other "mentoring" thread (http://www.dbforums.com/showthread.php?t=1608569). I wanted to respond to it but not in that thread:
Yeah, but if he's going to go unbound he might as well develop in .Net rather than Access. You lose half the convenience of MSAccess as a front end if you use unbound forms and controls.
Besides, he's trying to learn SQL Server, not front-end development. Learning both at the same time may be a bit much. I'd suggest he stick with his idea of converting the Access database to SQL Server back-end.
But, you should definitely convert the Access front-end to a Microsoft Access Data Project, rather than a classic mdb file.
Going unbound would increase your application performance, but probably not noticably unless you have scores of uses, and since you are currently using straight MS Access I'd guess you have no more than five or six simultaneous users, right?
blindman
To start I have decided that ADO is the way to go even though I don't necessarily need the performance boost for my current situation. Keep in mind I am planning for future and more demanding opportunities, hopefully :) And I'd like to learn the "right" way to do things.
I actually use ADO quite a bit in my current DB app and bound controls as well so it really wasn't a new concept. However using strictly ADO produces alot more work and code. And like blindman says it pretty much takes all the ease of Access away and VB.NET for that matter too. I mean all the wizards are useless. So I have two questions:
1. When going to all ADO you are pretty much recreating what Access already does for you right? Coding in ADO is more work right? I mean you have to setup connections and fill fields and listboxes manually in code right? I don't mind the extra work I just want to make sure if I'm going to be doing all this extra coding that it is the right thing to be doing.
2. MDB vs. ADP - From what little I've read Access Data Projects are made for use with SQL Server. It is even more useful if you don't/can't actually work in SQL Server. But again if I'm using ADO it strips all the usefulness of the ADP's doesn't? I don't need ADP's to create views or sprocs. I can do all of that through the management studio. So does it really matter if I use an ADP or MDB as my front end if that is all it is going to be is a front end?
Lastly I wanted to use VB 2005 as the front end but we utilize a ton of reports. As far as I know Crystal Reports or something like it has to be used with VB 2005. Or does VB 2005 have some built in reporting capabilities? I thought I saw some report designer for VB6. Anyway I decided to stick with Access because I am familiar with its reporting capabilities.
I should note that I have VB 2005 Express and SQL Server Express. Right now my company is not putting any money into a higher version.
I'd like to get some help on this. I'm new to SQL Server but am keen to learn it. I have SQL Server 2000 SP4 running and wonder what kind of front end application is best suited for SQL Server 2000.
Is there any front IDE for MS SQL as there is MySQL Front for MySQL. Iam looking for it so that it is easy to quickly add/edit/delete thedata from the existing table. Please prode the Download URL is there isany.Regards.
Hi!I'm trying to build an app. for my parents' office. They have a smalloffice (5 PCs), and they currently work with a very old program that'sbased on DOS. The program doesn't work well under XP, so they still useWin 98. They had their network upgraded about a year ago. They hadMicrosoft SBS 2000 installed, it includes SQL Server. I've written afew DB's in Access before, and now I'm just learning how to use SQL.Before I start work on their app., I have a question:I know it's possible to create an interface that can be put on theirnetwork and accessed via a browser. How is this done exactly?It would be very beneficial for me, because it would mean that the newapp. would be platform independent, so that they can upgrade to XPeasily. It would also save us the cost of licensing front-end software(e.g. Access) for each machine.Any comments would be appreciated.Noam Nelke, Israel.
Hi all,I have a number like so 778625 and want to make this a more meaningfuldate (UK) so how difficult is it to add two digits in this case 19 tothe front of this number?Many thanksSam*** Sent via Developersdex http://www.developersdex.com ***Don't just participate in USENET...get rewarded for it!
I have created a Database Editor with FrontPage using the Wizzard. I have adatabase in SQL 2000 called Equipment with one table named Equipment.When I bring up the editor, it displays a list of all records with a link tothe edit page. When I click on the link for the first record on the page,The edit page come up correctly. I can edit the page and then submit it.When I click on the link for the second record ( and all the rest of therecords) in the list I get the following message:Database Results ErrorDescription: [Microsoft][ODBC SQL Server Driver][SQL Server]Syntax errorconverting the nvarchar value 'BF176' to a column of data type int.Number: -2147217913 (0x80040E07)Source: Microsoft OLE DB Provider for ODBC DriversWhen I click on the link for record BF176, which is about 20 records downthe page, I get the following message:Database Results ErrorDescription: [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid columnname 'BF176'.Number: -2147217900 (0x80040E14)Source: Microsoft OLE DB Provider for ODBC DriversI have gone in the SQL database and messed arounf with changing the columntype from nvchar to nchar and changing the length, but can not figure thisout. I cannot tell whether this is a Frontpage problem or a SQL problem.Any help would be appreciated! Thanks!DarrenMCP