3,481 Topics

Member Avatar for
Member Avatar for dskumar_85

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.....

Member Avatar for Ole Raptor
0
81
Member Avatar for LAMDB

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 …

Member Avatar for tesuji
0
292
Member Avatar for MCFC

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 …

0
53
Member Avatar for michael123

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]

Member Avatar for cmhampton
0
589
Member Avatar for stockton

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 …

Member Avatar for stockton
0
291
Member Avatar for Ms Linda

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 …

Member Avatar for tesuji
0
97
Member Avatar for manbear267

[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 …

0
69
Member Avatar for markh8ytr

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

Member Avatar for tesuji
0
174
Member Avatar for tkotey

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 > …

Member Avatar for tkotey
0
110
Member Avatar for stoneferry

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 …

Member Avatar for varmadba
0
139
Member Avatar for Mohfeza

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 …

Member Avatar for varmadba
0
195
Member Avatar for Siten0308

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 …

Member Avatar for Ramy Mahrous
0
94
Member Avatar for arupa
Member Avatar for tesuji
0
81
Member Avatar for tkotey

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 …

Member Avatar for tesuji
0
109
Member Avatar for Jens

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 …

Member Avatar for arupa
0
150
Member Avatar for safealloys
Member Avatar for arupa
0
146
Member Avatar for Acidburn

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. …

Member Avatar for tesuji
0
41
Member Avatar for michael123

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 …

Member Avatar for nav33n
0
144
Member Avatar for davidcitron

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 …

Member Avatar for pclfw
0
186
Member Avatar for conwayce

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 …

Member Avatar for tesuji
0
133
Member Avatar for 330m

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"?

Member Avatar for peter_budo
0
2K
Member Avatar for mgouge

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.

Member Avatar for mgouge
0
132
Member Avatar for bunary2k

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 …

Member Avatar for debasisdas
0
118
Member Avatar for hamishrock

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 …

Member Avatar for hamishrock
0
172
Member Avatar for mhaskell

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 …

Member Avatar for huangzhi
0
105
Member Avatar for HB25

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: …

Member Avatar for HB25
0
169
Member Avatar for harcaype

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.

Member Avatar for Ole Raptor
0
62
Member Avatar for sheridanbman

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, …

Member Avatar for Ole Raptor
0
126
Member Avatar for bhavna_816

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,

Member Avatar for TCBW
0
119
Member Avatar for msaenz

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 …

Member Avatar for jrcagle
0
2K
Member Avatar for dtmd

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 …

Member Avatar for huangzhi
0
161
Member Avatar for domeger

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 …

Member Avatar for Athersgeo
0
508
Member Avatar for harcaype

Hi. Can anyone tell me how to create a mobile database and application using SQL Server Management Studio Express?

Member Avatar for harcaype
0
83
Member Avatar for 2eXtreme

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 …

Member Avatar for peter_budo
0
80
Member Avatar for shrimpygirl

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 …

Member Avatar for dsc123
0
585
Member Avatar for JayPet

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 …

0
62
Member Avatar for rabbell

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 …

Member Avatar for rabbell
0
99
Member Avatar for vinaya

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.

Member Avatar for tesuji
0
138
Member Avatar for 2eXtreme

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 …

Member Avatar for 2eXtreme
0
112
Member Avatar for Porsche.V

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 …

Member Avatar for tesuji
0
114
Member Avatar for evarella

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 …

Member Avatar for evarella
0
1K
Member Avatar for greeny_1984

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 …

Member Avatar for tesuji
0
155
Member Avatar for usenthil75

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

Member Avatar for tesuji
0
81
Member Avatar for kshrini

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

Member Avatar for gvalip
0
126
Member Avatar for gordon byrne

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 …

Member Avatar for crunchie
0
112
Member Avatar for gordon byrne

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 …

0
31
Member Avatar for gvalip

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 …

0
66
Member Avatar for Paul Phillips

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. …

Member Avatar for Paul Phillips
0
84
Member Avatar for savesheep

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 …

0
57
Member Avatar for ceyesuma

I have a database designed in Access. I would much rather use MySQL. Is there an IDE that I could use MySQL and work with building tables and ERD's?

Member Avatar for tesuji
0
90

The End.