3,481 Topics
![]() | |
hai friend's i am beginner in MS sql db . so can any one explain me detail about Foreign key and primary key , please give example also , thank;s in advance..... | |
Hi there, I have a master detail set of tables with a one-to-many relationship. Let's call the tables Projects (master) and Markets (details). I need to allow users to query the database and be able to select projects by markets. In other words, users should be able to "say": "List … | |
Hi All I am currently using Vb Express.net 2008, MSSQL server express 2005 in conjunction with SQL server management express. I have created a database application within the express IDE, which I must say I am very happy with, as it was my first database app. I have now decided … | |
I have a MSSQL table that contains lots of duplicate records, is there a simple way to keep only one and remove all other duplicates? [CODE] mike M 60 mike M 60 mike M 60 [/CODE] I need only one record [CODE] mike M 60 [/CODE] | |
Not being a SQL programmer please forgive the following but I need to know. I have a MSSQL database with a table containing a row defined as Column Name Data Type Length Turnover decimal 5 also in Enterprise Manager I see Precision is set to 7 and Scale is set … | |
Good day all! Need assistance with the following: I a table that houses information and want to create calculations based on the info. I have created a view to perform one of the calcs. Now I want to sum columns that will put info into another field that I can … | |
[B]Hello and thak you for spending the time to help me!Model: Gateway ML6720 Notebook; with vista home premium.Afraid I still have a few nasties bugging my system.Having disconnect from internet(Verizion Fios) problems,internet and applications hang up.Any help I can get would be appreciated.[/B] Logfile of Trend Micro HijackThis v2.0.2 Scan … | |
Hi all Just a quick question from a noobie! If i have a DB mirrored...if I apply schema changes to a table in the primary mirror db...will the secondary mirror DB get updated? or is it just data that get's mirrored? Thanks in advance | |
I would like to add a field from a table to an existing view without changing the structure of the existing. Below is the statement for the existing view and the result [CODE]SELECT (SELECT COUNT(*) AS Expr1 FROM dbo.BillsSections WHERE (BillIndex = a.BillIndex) AND (Type <> 7) AND (BillSectionIndex > … | |
Hi, the Microsoft SQL Server version is 2000 Basically I want use a basic regular expression but can't seem to get the syntax right. i want to compare ID_short = ID_Long ID_short is a truncated version of ID_Long, and I want to search on the beginning only (hence I can't … | |
please help for MsSQL stored procedure for ASP.net/C#. Inside stored procedure i used 4 different statements in where clause . first one is working but last 3's are not . Statements are given below- FILENAME LIKE ''%'+ @FILENAMETEXT +'%'' FILENAME LIKE '+ @FILENAMETEXT +'%'' SUBSTRING(FILENAME,1,4)='+@FILENAMETEXT+' LEFT(FILENAME,4)='+@FILENAMETEXT+' bunch of code for … | |
Hello, Right now i am running SQL 2005 server and using Visual studio C# 2008 to program. I sadly have a Windows Vista professional, 320gbhd, 2gb ram, intel duel core processor, The problem is on C# you can attach a database to your program to retrive or import information from … | |
I would like to SUM two fileds from different rows from the same table but I don't know how to do that. E.g. BillingTransactionsIndex CreateDate UserType UserIndex TransType Reference Total Balance 2 6/5/2008 15:02 1 51 1 150 -288.2 -288.2 5 6/8/2008 11:55 1 51 1 157 -1.58674 -289.787 In … | |
Hello everyone I am building on a little project in .net, but I have ran into some problems on database - level. I am creating a view with data from a couple of tables. It all revolves around my main table (let's call it 'main' for now). In 'Main' there … | |
| |
Hey guys, I've gotten hold of a MS SQL Developer edition, installed it completely, now running off the HDD. However when I go to Start> Programs> MS SQL Server 2005... I only get these options: Notification Services Command Prompt SQL Server Configuration Manager Error and Usage Reporting Surface Area Configuration. … | |
I try to copy and paste TAB delimited list into html text area, then save it to database, however when I retrieve it from DB, all TAB space are gone, does anyone can give me advice is there a way to keep these TAB? Thanks in advance. [CODE] test test … | |
Hello all, i have got an issue with a client here, who is running an internal CRM system. we need to get information into our Webserver (Linux-MySQL5) database (dealer lists, product lists, ....) and this information is stored in the CRM. but the CRM is Windows-MSsql. The output is .DAT … | |
Hi I'm migrating from Oracle Sql to MS Sql. I'm trying to write an mssql query that will pull all rows from a tableA but only if row in tableB = apple. In other words the table might look like this: tableA tableB Joe apple Joe orange Joe peach Fred … | |
Hi All, When I run the query: [B]select (100/50)[/B] It give me "2"... good. But when I run the query: [B]select (50/100)[/B] I was expected it will give me 0.5... but it gives me 0 instead? Why? and How can I get the "0.5"? | |
I need to create a query of records in one table along with a count of how often those records occur in 2 other tables and the difference between the counts. | |
i have 2 tables : 1.Ms_Menu Menu_Id,Menu_Name 001 | Menu1 002 | Menu2 003 | Menu3 2.Tbl_User User_Id,User_Name,Menu_Id User1 |Name1 |001 User1 |Name2 |002 User2 |Name2 |002 i want to joined 2 tables using UNION(or other way if works is fine->left/right join) my coding : [code=sql] SELECT User_Id,User_Name,Menu_Id,'' Menu_Name FROM … | |
I am trying to create a sql statement like set @sql = 'select @stage1 = count(MY_ID) From VW_OPEN where ' + @filter and run it with exec (@sql) However this generates an error Must declare the variable '@stage1'. If I run statement select @stage1 = count(MY_ID) From VW_OPEN the var … | |
I need to write a query that will pull my products and price. However each of the products have multiple prices and I want the price with the most recent date. I have tried the following query but it doesn't work. Can someone assist me. I'm fairly new to sql … | |
Dear Friend I am trying to perform the flowing tasks using the following SQL statement in Microsoft Access but they don’t work. I wonder if someone could help and tell me what is wrong with my Statements. Whenever I run these statements it will not create the query. [B]Task 1: … | |
Hi. Can anyone tell me how to populate items in listview? I need to call a column in a database to load all its list. | |
I will try to make this as simple as possible. Any help would be greatly appreciated. I have 3 tables like below. tblEmployees ----------------------------------------- EID | Name | 1, John 2, Bob 3, Steve 4, Brian 5, Joel 6, Lance ----------------------------------------- tblTraining ----------------------------------------- EID | JOB | 3, 1 4, … | |
I am using SQL Server 2005, I have some select and update statements in my query with WHERE clause I want to prevent these queries from SQL injection attacks. What are the steps and precautions to be taken for SQL Injection attacks? Does anybody have suggestions? Thanks in advance, | |
Greetings, I am trying to do a reconnect type of thing for when sqlserver disconnects me i check and reconnect to execute a query. here is some code that i wrote, I really don't know what to use since there is not isconnected method or reconnect method in pymssql. Any … | |
Hello, i have a database that came with MYSQL statements to get it working but we are using MSSQL and have managed to convert a large proportion of them but there are two statements we are having trouble with and wondered if anyone could help. The first is below: [CODE]SELECT … | |
We recently had a MSSQL injection on our server and don't know why it happened. We get a funny email in our ticket center that is at another data center that says we have an exploit in our code and then two hours later the server get hacked through our … | |
Hi. Can anyone tell me how to create a mobile database and application using SQL Server Management Studio Express? | |
hey guys, i dont suppose you know how i can go from: id.............result ---------------------- 1..............Pass 1..............Pass 1..............Fail 1..............Pass 1..............Fail 2..............Pass 2..............Pass 2..............Fail to this table: id...........pass......fail 1............3.........2 2............2.........1 my current query is simply select id, result from results I just want to display the total number of occurrences of a … | |
I am also getting a disable icon in the bottom right coner of my systray next to the clock. It flashes and popsup a box saying somthing about a virus alert get a animalware scanner program. I click on it I go to spyfalcon. Used it nothing happened. I did … | |
I continue to get this message though there are no duplicate keys in the table/s I am transferring into the new table I am creating using DTS. I created a query to look to duplicate primary keys and did not get any duplicates after running it. The DTS is a … | |
I'm getting this error message [B]An exception occured while executing a Transact-SQL statement or batch (Microsoft.SqlServer.Express.ConnectionInfo) CREATE DATABASE permission denied in database 'master'. (Microsoft SQL Server, Error:262)[/B] When I try to create a new database from the right click option on the master DB. I think this is a permission … | |
After creating the table i tried to specify the unique key constraint in sql server 2005 but its asking for the expression. I don't know what to give in that expression. can u please help me out in this. thanx in advance. | |
Hey guys, I'm working with a database at the minute (not my own), and the two tables are as follows: ---------------------- Customer ---------------------- CustomerID Agent 1 55a 2 97t 3 87f 4 44g 5 63l 6 21s ---------------------- ----------------------------------- Details ----------------------------------- ID DetailName DetailValue 1 FirstName John 1 LastName Smith … | |
if i use the query [CODE]SELECT iditem, CONVERT(char(20), dt, 105) FROM planeamento[/CODE] it works just fine.. but in this case the dt (date) field is not recognised.. [CODE]SELECT planeamento.iditem, idmodelo, item_planeamento.idproduto, item_planeamento.idpele, cor, ordemfabrico, qtd, CONVERT(char(20), dt, 105) FROM produto INNER JOIN item_planeamento ON produto.idproduto = item_planeamento.idproduto INNER JOIN planeamento … | |
My PC was recently infected by Virtumonde Trojan and in the aftermath the virus was gone and so a lot of computer's functionality. Printer service and audio are out. I tried to restart the services ( Administrative Tools > Services) but I got error 1084 "The service cannot be started … Microsoft Windows adobe apple apple-hardware asp.net audio cdn client-server dns flash http-protocol ide microsoft-access microsoft-office mssql office-suite pci-card pdf printer session storage streaming-service user-interface video video-card windows-nt-2000-xp windows-server windows-virus wireless-networking | |
Hi everyone, Ima working on a business site similar to alibaba.com.In that we have a main categories named agriculture,chemicals ....so on. on clicking on agriculture we get one more subcategory containing different names line plant products,beans so on.. on clicking on beans we get the companies selling beans. similar to … | |
I have the problem of splitting the the table into following way. Pl help me in doing it Actual table Product Id ProductQty CompCapacity 1 8000 5000 2 10000 5000 4000 4000 Resultant table Product Id ProductQty CompCapacity 2 5000 5000 2 5000 5000 1 4000 4000 1 4000 4000 | |
Hi All, SELECT * FROM Results WHERE ActualValue NOT BETWEEN Lowerimit AND UpperLimit In my query ActualValue is VARCHAR field. How can I get Results that are out of limit? Shrinivas | |
Hi, here is the results of highjackthis on my system. I seems to be runing real slow and I am having a difficult time speeding it up. Could someone pls look at this report and give some feedback. Thanks, Gordy Logfile of HijackThis v1.99.1 Scan saved at 1:18:38 PM, on … | |
Hi, here is the results of highjackthis on my system. I seems to be runing real slow and I am having a difficult time speeding it up. Could someone pls look at this report and give some feedback. Thanks, Gordy Logfile of HijackThis v1.99.1 Scan saved at 1:18:38 PM, on … | |
I did following - [code=sql]create table test_insert_date (field1 datetime not null) grant all on test_insert_date to public create proc usp_test_ins_dt @field1 datetime null as select @field1 insert into test_insert_date values (getdate()) return [/code] After this, I executed the proc as - [icode]usp_test_ins_dt getdate()[/icode] I got error as [B]"Incorrect syntax near … | |
Hi Guys, I'm new here and have come across a perplexing problem. I have a user table [code=sql]CREATE TABLE Users ( UserID VARCHAR(64), UserName VARCHAR(50) ) INSERT INTO Users (UserName) VALUES ('Tom') INSERT INTO Users (UserName) VALUES ('Dick') INSERT INTO Users (UserName) VALUES ('Harry')[/code] Each user has roles and groups. … | |
I have SQL 2005 installed on a 64bit windows 2003 advanced server system. I just recently changed the password of the administrator account (which has always had access to sql) and now I can't login to sql. Well, I can. It allows me to view everything, but when I right … | |
The End.