2,935 Topics

Member Avatar for
Member Avatar for JoeJonnyBoy75

Hello all, I'm currently trying to setup a SQL View that's going to be used to pull info from a table and output it onto a label... Long story short the only piece I need help with is having the SQL view remove leading zeros from one column called "Reference". …

Member Avatar for JoeJonnyBoy75
0
102
Member Avatar for LeMa50

Well, I'm new here but you can halp me also. I have pretty big problem. I need to store large text (more than 8000 charaters) in variable inside of procedure and then execute that query with EXEC command. Problem is that varchar supports up to 8000 characters and text and …

Member Avatar for dickersonka
0
183
Member Avatar for redhunt

I have a couple of servers. Everyday thousands of records have to be moved to another server. A temporary table is available for each table in the 1st server. Data is copied from the main tables to these temp tables using triggers. I am using a Windows NT service to …

0
42
Member Avatar for sparques

Hello, Being fairly wet behind the ears with Crystal Reports, I've been struggling with an issue of authentication. I have a Report, that is created in version 8.5....interfacing with a Sql Server 2000 database. I access the report through our company's internal web site. (The website was created in Coldfusion …

0
59
Member Avatar for shahzadhard

I have a database named newbase and columns are 1. Itid 2. Itname 3. Itprice 4. Itquantity I get the sum of the price using itname and the query is [code=sql] select SUM(itprice)as total from trick where itname=’a’[/code] I got the result but now problem is that I want to …

Member Avatar for shahzadhard
0
75
Member Avatar for andresasongko

Hi all, In a table column, I have this address value: "Muehlgasse 1 86637 Wertingen GERMANY" I want to get only the GERMANY part on my SELECT code. I've tested this code: [code=sql]SELECT right('Muehlgasse 1 86637 Wertingen GERMANY',7)[/code] It works, but the '7' has to be calculated, because we have …

Member Avatar for andresasongko
0
91
Member Avatar for krm08

Hello friends, I want to get the row position a table with respect to the primary key.How can I do that?.Please help me!

Member Avatar for freshfitz
0
67
Member Avatar for almis

Hi! I have this table: id table #people 1 ...1 .........3 2 ...1 .........5 3 ...4 .........2 4 ...3 .........5 5 ...1......... 2 i want to obtain the sum of people sitting per table. hope you can help me...

Member Avatar for almis
0
107
Member Avatar for chad_jensen71

I am trying to write a SQL update query for a database column containing an incorrect value. In the JobHistory table (whose primary key = JobID), the ModifiedDt column contains an invalid value, specifically it contains a value from a pickup stop, but I need to use the value for …

Member Avatar for chad_jensen71
0
146
Member Avatar for BobLewiston

I saved a few stored procedures in SQL Server Management Studio. The default Save location, which I accepted, was C:\Documents and Settings\BobLewiston\My Documents\SQL Server Management Studio\Projects. (And yes, each stored procedure was in the form of an .sql file, and I assigned each file name root to be the same …

Member Avatar for BobLewiston
0
274
Member Avatar for airbourne

I know this is a beginner question, but my SQL experience is very limited so I'd like some clarification before I pull the trigger on this. I have a SQL 2000 database who's owner has been deleted. From the looks of it, a long time ago. So now I cannot …

0
74
Member Avatar for Smithy963

Hi guys, I've been programming for quite a while now and just jumped in to SQL and Stored Procedures due to a Uni project I have due in. I have a table called [B]tblWebsiteMember[/B] and tblWebsiteMember has 2 Columns - [B]ID[/B] and [B]Name[/B] [CODE]CREATE PROCEDURE CreateWebsiteMember @wbmName AS Insert into …

Member Avatar for Stylish
0
175
Member Avatar for BobLewiston

I've written a few SQL stored procedures in a text editor. But how do I actually "store" them in (add them to?) a database using SQL Server 2008 Management Studio Express? I've tried to research this topic in Management Studio's onboard Help, but apparently Help assumes I know more about …

Member Avatar for dickersonka
0
89
Member Avatar for Enrgy

Hi Everyone. Im new in this forum. i need some help about sql, im working in a large company and we have many construction yards in the world we made a program and we are taking backup and restoring test machine, but now we need a automatic system what can …

Member Avatar for dickersonka
0
72
Member Avatar for pezza

Hi, I have managed to get a nested query to work partly, but i need to somehow add another nest, which i cannot get to work. To explain more, i wanted to firstly find records that did not exist in another table, to which i used the following [CODE] SELECT …

Member Avatar for pezza
0
110
Member Avatar for drynish

Hello! :) I have a small issue with an AFTER UPDATE Triger I implemented on one table of my db. In my trigger, I do some validation and update others (not in inserted or deleted) rows of my table. Thoses rows are updated but are not triggering my trigger (similar …

Member Avatar for drynish
0
116
Member Avatar for bajanpoet

This set of code below shows all SQL Server Agent jobs that have failed for the date 200.03.29. The run_date column is an integer, but I want to run the code in such a way that the resultset is automatically generated for the day before the current date. The code …

Member Avatar for bajanpoet
0
139
Member Avatar for blackbr

-I am using vs2008's table adapters for a DAL for several tables. -I have a computed field (FirstLastName) in my Lead table. -If I try to generate insert/update logic, the sql aborts when it tries to update the computed field. -So I dropped the field from the primary select, with …

0
63
Member Avatar for BobLewiston

Some of you may have seen my earlier thread “PasswordHash NULL problem”. I’ve started a new thread because investigation has shown that the problem is actually quite different than I previously stated. Also please note that this is unrelated to another of my previous threads, “dataAdapter.Update problem”, which incidentally has …

0
52
Member Avatar for BobLewiston

When I try to save a new (inserted) record in an SQL database, I get the following System.Runtime.InteropServices.ExternalException message: [QUOTE]Cannot insert the value NULL into column 'PasswordHash', table 'AdventureWorks.Person.Contact'; column does not allow nulls. INSERT fails. The statement has been terminated.[/QUOTE] I have to either find out how to insert …

0
60
Member Avatar for BobLewiston

When I try to save a new (inserted) record via the following code: [CODE]DataRow row = dataTable.Rows [currRec]; // update data in DataSet from data entry WinForm row.BeginEdit (); row ["Title"] = txtTitle.Text; row ["FirstName"] = txtFirstName.Text; row ["MiddleName"] = txtMiddleName.Text; row ["LastName"] = txtLastName.Text; row ["Suffix"] = txtSuffix.Text; row …

0
41
Member Avatar for BobLewiston

Most databases have multiple users. For these databases it is a good idea to auto-increment the identity column. I understand that an SQL identity column is not incremented until the newly-created record is inserted. I guess this means the identity column is incremented when you actually reconnect to the database …

0
41
Member Avatar for debeginin

I just got started with ms sql server2000,and I need a big favor from the the house,which is:please what softwares do I really need to install to get started?

Member Avatar for debeginin
0
70
Member Avatar for freshfitz

I need to merge 2 notes fields in a sql database This select script gets me what I need how do I merge notes into Technote, I have a function to filter out the characters in the phone number that's what the stripped is [CODE]Select db1.dbo.customer.cust_no, db1.dbo.customer.Phone_home, db1.dbo.customer.technote,db2.dbo.customers.notes from db2.dbo.customers …

Member Avatar for dickersonka
0
90
Member Avatar for BobLewiston

Using Visual C# 2008 Express and SQL Server 2008 Express, I would like to insert new records into database "AdventureWorks", table "Person.Contact". To my surprise, this table's int-value identity column "ContactID" does not appear to be auto-increment. I don't know how to confirm for sure that this is so. (I …

0
54
Member Avatar for jchandramouli

Hi, I got a table with datas that has alphanumeric values like : 1230-544,15C5487,132DE78. Now i need to extract only integers fomr these datas and convert to bigint. The other characters have no impact in my query. Is there way to produce a data like that? Thanks in advance. Mouli

0
50
Member Avatar for ntk

I have an existing table: [code=sql]CREAT TABLE Course (CourseNo int NOT NULL PRIMARY KEY, CourseName varchar NOT NULL StudentNo int NOT NULL REFERENCES Student (StudentNo)) [/code] Is it possible to code the following change in T-SQL: Introduce a new column called CourseID (int NOT NULL) and make it the PK? …

Member Avatar for urtrivedi
0
65
Member Avatar for emilio

hi i would like to write a trigger for the basic operations on a table : insert, delete, update. i know the basic syntax: [CODE=sql]create trigger on tbl_MyReports for insert,delete,update as[/CODE] my question is how can i know which rows changed ? if i inserted or deleted or updated a …

Member Avatar for urtrivedi
0
154
Member Avatar for BobLewiston

I can read in an SQL table ("Person.Contact") from AdventureWorks and step through it one row at a time, but when I try to save a record, either one I'm inserting or one I'm editting, I get the following exception: Incorrect syntax near ','. Must declare scalar variable "@ContactID". Here's …

Member Avatar for BobLewiston
0
139
Member Avatar for harcaype

hi. my thread title seems strange but its really about comparing unlike values as an output. I want all values that are not LIKE the other values. To make things clearer. Here's my query: [ICODE]SELECT Records.[Officer ID], Records.[Plate Number], Records.[Violation Commited], Violations.[Violation Code], Records.[Street Name], Records.[City of Apprehension], Records.[Vehicle Category], …

Member Avatar for edgarlip
0
156

The End.