3,481 Topics

Member Avatar for
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
146
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
61
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
101
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
135
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
101
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
60
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
80
Member Avatar for smurf53917

newbie help needed im new to asp.net (vb) can anyone help me ive written some code (see below) to pull some vars from a string in the url i needed to send these to a mssql database any ideas how i do this, any code would be much appreciated thanks, …

0
47
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
172
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
100
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
87
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
115
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
92
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
49
Member Avatar for chrispaul8676

hi, there, i need to know if the datagrid and dropdownlist will respond to the button click. At the same time, will this dropdownlist will get the data from database. Please help me. i need the solution in a day. [ICODE]<%@ Page Language="VB" MasterPageFile="~/Courier.master" Title="Untitled Page" %> <%@ Import Namespace="System.data.sqlclient" …

0
57
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
109
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
141
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
104
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
91
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
582
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
90
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
57
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
120
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
108
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
85
Member Avatar for Link82

Hi Guys, Kind of stuck on a query here. [CODE] select *--, c.last_name + ', ' + c.first_name as name from dbo.tblLevelOneApprover a inner join dbo.tblLevelTwoApproverToLevelOneApprover b on convert(int, b.level_two_emplid) != convert(int, @emplid) where convert(int, a.emplid) = convert(int, b.level_one_emplid) [/CODE] I'm trying to get all level one managers who are …

Member Avatar for Link82
0
182
Member Avatar for kormie

Is there a setting to suppress warnings from dispalying when running a script via SQL Query Analyzer? I would like to have only errors print. Thanks!

Member Avatar for sknake
0
114
Member Avatar for BOI-Guy

Hello, I have two tables aspnet_Membership and aspnet_Users. I want to remove all of the records from [B]both[/B] tables that are older than 30 days by using a single stored procedure. So far I have this: [ICODE] BEGIN BEGIN TRY BEGIN TRANSACTION DELETE FROM aspnet_Membership WHERE CreateDate < DATEADD(DAY, -30, …

Member Avatar for BOI-Guy
0
138
Member Avatar for Dizzzy

I have a aspx page written in Vb and one of my button_click events has a function to connect to a sql database and retieve the data of a specific record by using the sql statement "SELECT * FROM Calendar WHERE Day="27" " The Name of my Table is Calendar. …

Member Avatar for Ramesh S
0
149
Member Avatar for michael123

I have one table in this format: [ICODE] Product Component --------------------------- A part1 A part2 B part1 B part4 A part3 C part5 D part1 [/ICODE] now I want to display product which components meet requested items, for example: I know component are "part1" and "part3", need to show product …

Member Avatar for cgyrob
0
129
Member Avatar for gingank

Hi guys i cant open the mdf on the ms sql express 2005 why this will happen it is another ways to open it.

Member Avatar for johnly
0
266
Member Avatar for anuj_sharma

hey guys, I've just got sql server installed in my system but i dont know how to start it. There are 3 options when i click on "Microsoft SQL Server 2005" in the programs namely: SQL Server Configuration Manager SQL Server Error and usage reporting SQL Server Surface Area Configuration …

Member Avatar for johnly
0
121
Member Avatar for php_noob

Guys, I need Help in making PHP APACHE and MS SQL SERVER 2000 to run. I search a lot but still can not get the logic behind it. All that I understand is that I need to configure something in the PHP INI. Is it possible in XAMPP? or I …

Member Avatar for php_noob
0
305
Member Avatar for XavierExtreme

I have a table that has become corrupt and I need to merge the records back into one record. I have multiple records that should be recombined and I have hit a brick wall on this. In my table the data looks like this part_id Unique c_date m_date Qty ht_num …

Member Avatar for XavierExtreme
0
109
Member Avatar for nybelle

I have 2 tables: a claim table and a corresponding date table. There can be multiple dates for each claim, with a qualifier type to distinguish them, and I'd like to retrieve them all in one row. Here's a snippet of what I have: [code=sql] SELECT d.PointerField , a.ApplianceDate b.AccidentDate …

Member Avatar for cgyrob
0
94
Member Avatar for BobLewiston

I'm trying to install SQL2008.AdventureWorks_All_Databases.x86.msi, but whether I try to install "Sample Files" or "Create AdventureWorks DBs", I keep getting the following error: PrepInstance() failed for MSSQL$SQLEXPRESS. The following features are missing: Full Text Search I already have installed on my PC: Microsoft SQL Server 2008 Microsoft SQL Server 2008 …

Member Avatar for Gustavo MPO
0
198
Member Avatar for krokodajl

Hi, in MS SQL we have [B]TOP [I]some_value[/I][/B] clause which means that only some first records are selected. For example: [I]select top 10 products from table_products[/I] How can I select rows for example from 4th to 15th?

Member Avatar for rathnakar
0
189
Member Avatar for kormie

I have "inherited" a series of scripts which are designed to run in SQL Query Analyzer to incrementally update a database based on a version id stored in a table. Each script includes code to create new tables, alter existing columns, add or swap out triggers, grant permissions, update data, …

0
61
Member Avatar for fatjoez

I have 3 tables, below are their structures ( a bit of pseudo code ) I'm trying to update one table, with a variable column name, retrieved from another table [B]order[/B] [id,field1,field2] [I]example row ( '1' , '', '' )[/I] [B]produkt[/B] [order_id,produktnr] [I]example row ( '1' , '23' )[/I] [B]fields[/B] …

Member Avatar for rathnakar
0
214
Member Avatar for NextCom

I have a INSERT, UPDATE trigger on a table, it works great and helps me from firing a stored procedure from all the (think it's over 50places) where it is needed. But I have one batch update to this table, that doesn’t require the trigger procedure; the trigger is very …

Member Avatar for rathnakar
-1
3K
Member Avatar for vytla

hi friends fetching datetime values from database, when data is null in code side it is displying the some garbage value instead that i want to show 'date is not found' the result is showind in grid view control service written for fetching datetime [code=C#] public List<Topics> GetAllTopicNames(int communityId) { …

Member Avatar for rathnakar
0
173
Member Avatar for Link82

Hi everyone, A few days ago I posted a question which someone did reply to. However, the tables have been re-arranged a bit and I didn't want to make my last thread confusing, so I thought I'd start fresh here. (Mod, you may close down my other thread; thanks). So …

Member Avatar for sknake
0
303
Member Avatar for santhanalakshmi

Hi, Anyone,please help me out.How to give ODBC Connection on Centos5.5(linux machine) and also what do you meant by FREETDS? Thanks in advance............... with regards, santhanalakshmi.

Member Avatar for santhanalakshmi
0
88
Member Avatar for sivak

can anyone explain me one to one and one to many and many to one and many to many relationship in sql with example plz

Member Avatar for sknake
0
88
Member Avatar for HBMSGuy

Hello, While working with stored procedures I came across something I didn't know how to handle. I wanted to make a stored procedure where, One could give it 2 parameters. With these two parameters, it would return the uniqueidentifier of the row that matched, or if no match was found …

Member Avatar for sknake
0
81
Member Avatar for edejonge

Greetings All, After recently being laid-off I'm looking into some government funded training. They will pay for me to take a course with any local college so long as I have a diploma or cert within two years. One that stood out to me takes 10 month and leaves me …

Member Avatar for Ancient Dragon
0
84
Member Avatar for Link82

Hi everyone, I've never had to do this before sooo, I need help. I have a table which maps managers to regular employees. So you could say that Manager A is mapped to 20 peeople and Manager B is mapped to 5, and so on. So the table looks like …

Member Avatar for sknake
0
357

The End.