2,935 Topics

Member Avatar for
Member Avatar for Smirgu

I would like to add a column to an existing table, where the new column would only have running numbers starting from 1. If I've understood correctly, the "create index" command is not the right way to do this, as that's attached to just certain columns to speed up querying. …

Member Avatar for sknake
0
116
Member Avatar for newMeg

Hi, I have a table in which there is a field for mobile no. Currently the data in the field has been entered with a dash(-) after the code. eg- MobileNo (this is the field name) ------------------------------------- 1. 6016-2880537 2. 6012-3137200 so there is about 400 records in the table …

Member Avatar for Josware
0
140
Member Avatar for roxy_girl

I have a problem. I hope that someone can help me. I have to do an analysis of an student course registration database. The Case is that I have an database application of a student registration system. Students can enrolll for one or more courses, When they enroll, there will …

0
47
Member Avatar for Pankaj18

Hi, We have schedule a job through SQL agent in which We want to access the data of a specific field from SQL table For example we have a field named interviewDate, we have to compare it with current date. now we have to write a stored procedure to read …

Member Avatar for sknake
-1
125
Member Avatar for CeJay

Hi All Ok this is a bit of a doozy for me. Work related question, I have been tasked with sorting out this issue at work, but don't really have much background in this field, but theres no one else in my team that can do it. Bit of a …

Member Avatar for jimmyread
0
145
Member Avatar for ishamputra

hello, i would like to retrieve data on which the endDate < date.now....something like that.. thanks

Member Avatar for sknake
0
59
Member Avatar for nihan1

Hi! I have to use sql connection to take queries from user by using textbox structure .How can I provide this .I don't find it anywhere . especially how can I connect sql and textbox structure together I do not know anything about this subject.

Member Avatar for sknake
0
100
Member Avatar for carsein

hi...I've tried to think about this for 2 days but I can't really find the solution. Hope anyone can help. What statement should I write for this:There is a table of Parcel. In the table there are ParcellId and the timestamp. I have to select parcels that have the time …

Member Avatar for sknake
0
134
Member Avatar for t_mcgee09

Hi everyone, I have a database that looks something like this: [CODE] [B]Name Week1 Week2 Week3[/B] user1 10 15 7 user2 3 24 2 [/CODE] I need to write an sql select statement that returns 2 columns: the Name column and a Total column which totals that users points for …

Member Avatar for mail2saion
0
100
Member Avatar for kralco626

This code seems legit to me, i cannot figure out why it wont run! please help :) [code=sql]create table #test ( col1 varchar(6) not null, col2 numeric(5,2) not null, col3 varchar(5) not null, col4 numeric(4,0) not null ) MERGE into table1 a using #test b on a.col1 = b.col1 when …

0
59
Member Avatar for phantom1000000

Hi All, I'm a virgin to this site, so go gentle. :-) I'm using vb.net to write a web application and I was just wandering what was better and what the advantages/disadvantages to using the self-imported SQL file within VB.net or the SQL Server Management to create a database and …

Member Avatar for sknake
0
79
Member Avatar for pee2002

Hi there! I made a backup of my database (MandoTECA) using the following code: [code]CREATE PROCEDURE [dbo].[CreateBackup] @uri nvarchar(MAX) AS BACKUP DATABASE MandoTECA --TO DISK = 'C:\Users\Pedro\Desktop\MandoTECA.Bak' TO DISK = @uri WITH FORMAT, MEDIANAME = 'Z_SQLServerBackups', NAME = 'Backup Completo da MandoTECA'; [/code] And used it a restore procedure to …

Member Avatar for sknake
0
99
Member Avatar for HBMSGuy

Hello, While working on setting up user accounts, I wanted to see if the values already existed in a database to alert the user before submitting the data. While doing this, I came to an issue. The issue is when I went the MS SQL SMS and tried writing a …

Member Avatar for HBMSGuy
0
171
Member Avatar for KRichardson1127

I'm in the process of converting two columns in two separate tables... One column in Table A has a hexadecimal number (with a nvarchar data type) i.e. "A5000000020" and converting it to a decimal it should be "11338713661472"... In Table B the column has a decimal number (with a bigint …

Member Avatar for sknake
0
98
Member Avatar for ChrisPaul

Hello, Does anybody know if there is a Search Replace function in MS SQL2005 to lets say search for the @ charter and replace it with another character or number in the specified columns? If there is please can you give me a sample. I found the replace function but …

Member Avatar for lighthead
0
85
Member Avatar for sonia sardana

hey frnds, I m creating the database at page load,I m able to do dat.I just want to do check that if the table is already existing,then do not create the table.below code create table- [code] using System; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; …

Member Avatar for sonia sardana
0
113
Member Avatar for chrispaul8676

hi there, i would want to change the mysql to mssql. please help [ICODE]<%@ Import Namespace="System.Data" %> <%@ Import Namespace="System.Data.SQLClient" %> <script language="VB" Runat="server"> Dim blHasRows as Boolean Sub doInsert(Source as Object, E as EventArgs) Dim strConn as string = "server=YourServer;uid=YourUID;pwd=YourPWD;database=YourDB" Dim MySQL as string = "Select * from samples …

Member Avatar for chrispaul8676
0
90
Member Avatar for doitalldave

Hi I’m pretty new to this so I’ll start at the beginning. I'm trying to run a report on consumption of server disk space in reporting services. I have a view in the data base that has fields ServerName, Drive, Year, Month & AvgFreeGB. In a calculated column in the …

0
48
Member Avatar for pee2002

Hi there! I have the following SELECT Statment: [code]SELECT IDLivro,Titulo ,LEFT(Nome, LEN(Nome) - 2) AS Nome ,LEFT(Categoria, LEN(Categoria) - 2) AS Categoria ,Posicao ,Classificacao ,Comentario FROM ( SELECT L.Titulo ,( SELECT A.Nome + ' ; ' AS "text()" FROM dbo.Autor A JOIN dbo.LivroAutor LA ON A.IDAutor = LA.IDAutor WHERE LA.IDLivro …

Member Avatar for pee2002
0
106
Member Avatar for KushKashyap

Hello friends, i am facing a bit of difficulty in designing a SQL query for calculating the total score of all the quizes taken by users in my quiz application to create a sort of leaderboard or ranking system. My table have following tables: UserQuizID (int) - PK QuizID (int) …

Member Avatar for Sakthimeenakshi
0
140
Member Avatar for pee2002

Hi there! In my Library project i want to replace some text with images. I have this: [img]http://img33.imageshack.us/img33/8425/antesx.jpg[/img] Wich is generated by the following code: [code]SELECT IDLivro,Titulo ,LEFT(Nome, LEN(Nome) - 2) AS Nome ,LEFT(Categoria, LEN(Categoria) - 2) AS Categoria ,Posicao ,Classificacao ,Comentario FROM ( SELECT L.Titulo ,( SELECT A.Nome + …

Member Avatar for lighthead
0
93
Member Avatar for tlore22

Hello I am a newbie with MS SQL and PHP. So if you could help it would be much appreciated. I connected remoteley to a Microsoft SQL server 2005 database with PHP. I have to call a procedure (A) wich calls another procedure B within it. How do I get …

Member Avatar for lighthead
0
90
Member Avatar for vuyiswamb

Good Day all I have an SP that is defined like this [CODE]ALTER PROCEDURE [dbo].[sp_Constraints_Update] @xml ntext, @TTBLType varchar(5) AS set nocount on DECLARE @xmldoc int DECLARE @sql varchar(8000) -- In one long sql string do all of the following --Create an internal representation of the XML document. EXEC sp_xml_preparedocument …

Member Avatar for vuyiswamb
0
562
Member Avatar for ashkan3030

I use the following code to make a rule and use it for my PHONE column: [code]CREATE RULE phone_rule AS @phone LIKE '([0-9][0-9][0-9]) [0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]'[/code] The problem is : When I run this code nothing add to my "Data Type" drop down box to set my PHONE column data type to …

Member Avatar for cgyrob
0
86
Member Avatar for Gaurav arora

hi all, i m working on a project(Inventry System) in which i have to update stock frequently. i have created a trigger in SQl for stock updation. if i insert for a particular product in stock table the previous quantity and the current inserted quantity must be added. Plus i …

0
56
Member Avatar for rojanjcb

do anyone knows how to connect to a MS SQL server(database in internet,i have ip,db username and db password).i used mssql_connect from my PHP ,but how to activate it in windows or Ubutu.i download all dll files needed but i cant connect..pls help me....

Member Avatar for tlore22
0
117
Member Avatar for vuyiswamb

Good Day all I have a Sp that is written like this set ANSI_NULLS ON set QUOTED_IDENTIFIER ON go ALTER PROCEDURE [dbo].[Import_RegistrationsXM] @xml ntext AS set nocount on DECLARE @doc int EXEC sp_xml_preparedocument @doc OUTPUT, @xml TRUNCATE TABLE _RegistrationXM INSERT INTO _RegistrationXM SELECT * FROM OPENXML ( @doc , 'Import/Item' …

Member Avatar for vuyiswamb
0
90
Member Avatar for Kusno

Dear all, Sorry, if this Thread is wrong room :$ . I want to return a field value from a table, so I created a function like this : [CODE]CREATE FUNCTION dbo.CheckStatusTrx(@TransNo Varchar(20)) RETURNS varchar(20) AS BEGIN DECLARE @Flag Numeric(1) SELECT @Flag = Flag, CreatedBy, ApprovedBy FROM TrxTD WHERE TransNo …

0
99
Member Avatar for pee2002

ER Model: [url]http://img22.imageshack.us/img22/7292/modeloer.jpg[/url] I´ve got this: [IMG]http://img31.imageshack.us/img31/2384/antesj.jpg[/IMG] And want this: [IMG]http://img12.imageshack.us/img12/5241/depoispkd.jpg[/IMG] (Paint image.. lol) Anyone knows how to build a stored procedure who does that or a view? Thanks!

Member Avatar for cgyrob
0
107
Member Avatar for jimbo84

Hi, Im learning SQL and I've hit a bit of a wall early on.... I have these 2 statements [CODE]SELECT AcNum, FamName, GiveName, DeptNum, count(AcNum) FROM academic NATURAL JOIN interest GROUP BY AcNum HAVING count(AcNum) < 4[/CODE] [CODE]SELECT GiveName, FamName, DeptNum, AcNum FROM academic NATURAL JOIN department WHERE LOWER(state)= 'ny';[/CODE] …

Member Avatar for cgyrob
0
83

The End.