3,481 Topics
![]() | |
Hello folks, I beg your pardon if I have posted the thread in wrong forum. But my query is related to sql server and visual basic 6, so I thought posting it here rather from visual basic forum will help me getting most replies.... I have developed an client-server based … | |
Hi Guys Could you please let me know what SQL query I can run to get the parent of a specified table? I already used this code which is providing a list of child tables [CODE] SELECT object_name(parent_object_id)As 'Childs List' FROM sys.foreign_keys WHERE object_name(referenced_object_id) ='Stores' [/CODE] How can I run … | |
I am trying to create a view and by linking two tables together, VLP_QC_Results_Batch1000 and VLP_Stock_QC1000. (see below pics) The issue I have is in the VLP_QC_Results_Batch1000 has the testNo within a field called TestNoName and is separated by a “-“ I need to link these so that we can … | |
afternoon everyone, I am new to using MSSQL and need help with SUBSTRING function. i have a strings like below s2-Total Solids - Std Method V1E-RVT4/2.5@20degC Initial V1Y-LVT2/60@20deg Initial A2-Alkalinity - ISO Method(%) I would like to only get the data before the first "-" IE s2 V1E V1Y A2 … | |
So how can you tell if you've maxed out express and need to move to the full blown version. Not referring to database size but performance? Asking because we are moving a website and the webhost master asked if he will be on express or full version claiming that express … | |
HI I want to create new sql account in sql server 2005,and user only able view sql agent job history details only.How do I do this.Please help. Thanks Tank50 | |
Hello everybody and thank you in advance for taking the time to read this. I am having trouble connecting to a remote MSSQL server from our web page server using the SQLSRV Connect. I have installed all the necessary php extensions and sql drivers, and they all appear as they … | |
Team - This has to be way more simple that I am getting. Been searching google for hours with no luck. Simply stated, I am trying to delete a datalist row which is bound to a mssql database. Simple right! I am missing where it is putting the key or … | |
Hi, I'm fresher for sql injection, i have already worked and having a good knowledge about the MY sql server 2000, 2005, and 2008. Did anybody can able to give me steps and how to work in sql injection, as a part of testing engineer. Kindly send me the links … | |
![]() | IIf(Time()>=TimeValue("00:00:00");IIf(Time()<=TimeValue("07:00:00");Format(Now()-1;"dd mm yyyy");Format(Now();"dd mm yyyy"))) ![]() |
Okay, I have a table called InGameTime with the following columns: CharName varchar(30) InTime datetime OutTime datetime HH int MM int SS int I am trying to make a trigger, that will once data is updated, it will update the HH,MM,SS to add the total hours, minutes, seconds spent in … | |
Column A (datetime) ----------------------- 2011-04-01 00:00:00.000 2011-04-01 00:00:00.000 2011-04-09 00:00:00.000 2011-04-01 00:00:00.000 2011-03-31 00:00:00.000 Column B (datetime) ----------------------- 2011-03-25 15:45:56.457 2011-03-25 15:52:37.933 2011-03-25 15:54:37.197 2011-03-25 16:05:30.023 2011-03-27 00:43:23.713 When i try to query the above record [CODE] Select * from table where A between '1900-01-01' and '2012-01-01' [/CODE] this work … | |
Hi someone help in distinct command i have created 2 tables department and balance, 1. Department dep_id, dep_code, dep_name 2 001 Bloom Room 3 002 Tahmeco Th 4 003 Kniting 2. Balance dep_id, Date, Amount 2 01/Mar/2011 10000 3 02/Mar/2011 15000 4 20/Mar/2011 25000 3 22/Mar/2011 10000 2 26/Apr/2011 27000 … | |
Hello to all, I got problem in my vb.net program in publishing it. I am using Microsoft Visual Studio 2008, when I publish my program and I got the setup file and when i tried to run into another computer I got some error saying that it cant connect into … | |
Right now we're having an issue with SQL, it's currently using 1.7GB of memory, and with the size and usage of our application, this isn't always enough. The server it's on is a 32 bit Windows Server 2003 Enterprise Edition, with 15.9GB of RAM. Is there any way to break … | |
Does anyone know how to turn this excel function into an sql statement? The function looks at my address and route. If it is different than the one prior it increments column G by 1 if it is the same it keeps column G as the same number. Ive been … | |
I created the following tables and inserted few values. create table books(bookid integer primary key, booktitle varchar(20), year integer, publisherid integer foreign key references publisher(publisherid), price integer, number integer) create table publisher(publisherid integer primary key, publishername varchar(20)) create table author(authorid integer primary key, authorname varchar(20)) create table bookauthor(bookid integer foreign … | |
Upon booting up my laptop today, Avast started showing me an alert for a "Malicious URL" even though I had no applications started and had not yet performed any actions. The popup message indicated that the site trying to be reached was 68.178.232.99/wpad.dat and the process trying to reach it … | |
Copy a table from one database to another database in another ms sql server using sql server management studio : If your table was in the same ms sql server but in another database, you would copy it using t-sql like this : SELECT * INTO NewTable FROM existingdb.dbo.existingtable; However, … | |
Hi everyone, I have a huge problem with importing data into Microsoft SQL server 2008. First of all I have created the database with the foreign keys etc. And now I want to import data. I have used BULK method i.e. [CODE]BULK INSERT tablename FROM 'c:\tablename.txt' WITH ( FIELDTERMINATOR = … | |
in a table having the fields of starttime & endtime ,I want to fetch only the records having starttime & endtime of same days. | |
create table #TempRouting( id int, routetype char(4), routesequence int) insert into #TempRouting (id,routetype) values (1,'MON') insert into #TempRouting (id,routetype) values (1,'MON') insert into #TempRouting (id,routetype) values (2,'MON') insert into #TempRouting (id,routetype) values (3,'MON') insert into #TempRouting (id,routetype) values (4,'MON') insert into #TempRouting (id,routetype) values (5,'MON') insert into #TempRouting (id,routetype) values … | |
I have a stored procedure that retrieves customer data from one table and calls 2 UDFs to perform a calculation on data obtained from joined tables for accounting data. The calculation needs to be performed for every row based on matching criteria of previous records. The query returns very few … | |
I'm trying to run the following code but get a casting error. How can I rewrite my code to achive the same ? [CODE] boolResult= (bool?)dataReader["BOOL_FLAG"] ?? true; intResult= (int?)dataReader["INT_VALUE"] ?? 0;[/CODE] Thanks | |
I have 2 tables, MPW1400 LeaseRecNo PropNo BldgNo UnitNo LeaseStartDate MPW1482 LeaseRecNo EffectiveDate AnnualAmount CertNo My Objective is to get the total of 'AnnualAmount' Where MPW1400.LeaseRecNo = MPW1482.LeaseRecNo and CertNo = '1' Example: MPW1400 ------------------------------------------------------- LeaseRecNo | PropNo | BldgNo | UnitNo | LeaseStartDate ------------------------------------------------------- 12345 | RG52 | 24 … | |
I have a view that pulls in a field, the feild has data in the following format. A1-an987389 B21-At081l0 AA1-ath01882 how would i get the infoamtion before the "-" IE A1 B21 AA1 the size of the data before the "-" can be anything from 1 up 5 charcters i … | |
Hi, I have replication configured on a SQL 2008 Database. The tables involved are something like this; [INDENT]tbl.Product ProductID Int ProductName NVarchar(max) ImageID Int FK_Product_Image FOREIGN KEY(ImageID) REFERENCES tbl.Image (ImageID) tbl.Image ImageID Int Image Image[/INDENT] tbl.Product is part of a Transactional publication with updatable subscriptions. tbl.Image is part of a … | |
I have a program that works access 2003 and i convert tables to sql Server 2005, but the problem is that program works only on the server but does not work on client .the internal network is workgroup and system is Windows XP . what can i do to get … | |
I'm having a hard time to return a string value. I usually do this by passing an int, which works just fine. Now, I need to pass a string but couldn't. Is this possible? Or int is only type that SQL can return? | |
Hi all, Can someone tell me if this is a delphi bug? I am using a Controls.TDate to store a date and using the SysUtils.EncodeDate function to set the value. [code] Invoice.DateReceived := EncodeDate(2011, 03, 16); [/code] When I store it in a MS SQL database field, it is adding … | |
I have a terminal that throughout the day I will get the normal window shut down tones for no apparent reason. The computer never actually shuts down. To accompany this the terminal is extermely slow at times. I have swapped out memory and power supply with an identical terminal to … | |
I have declared the datatyp of 'p_date' as datetime I have also used DateTextBox_CalenderExtender on textbox.(from Ajax ToolKit) [CODE] DateTime datetime=new DateTime(); datetime=convert.ToDateTime(DateTextBox.text); InsertIntoMrNo(mrNoTextBox.Text, datetime, postIdTextBox.Text); public void InsertIntoMrNo(string mrno, DateTime mrdate, string postid) { connection =ConfigurationManager.AppSettings["ConnectionString"]; sqlConnectionObj = new SqlConnection(connection); insertQuery = @"INSERT INTO mrno (mr_no,p_date,post_id) VALUES('" + mrno+"', … | |
i want to create inset and update for following files after inserted updated Find1, varchar(499) Find2, varchar(499) Find3, varchar(499) i wnat to crate trigger if find1 and find2 are inseted ,unpdated then show message in find3 and not updated or inserted reset previous value | |
any one know how to create trigger for update one column if column have value = 'cityname' then raise error or print error if value is null the don't do any thing | |
I was required to have my ID number, which is the primary column of my table, to be formatted with date. Instead of having just a number incremented by 1 (identity(1,1)), I need to have something like 318111 that means March 18, 2011 and the last digit is incremented by … | |
hi to all, I created following table create table book(id integer, author varchar(20)) In this, each book may have 1 or more authors. My question is that, how can insert more value to author column like as follows. id author 1 pooja merry james 2 robert stephen Thanks & regerds, … | |
Hi all I have 2 tables TblHP and TblDP how is the query to select price on certain TblGood_Kode which is before certain date tia denny TblHP No_Inv Date TblCustomer_Kode (as foreign key to TblCustomer) //--------------- TblDP TblHP_No_Inv (as foreign key to TblHP) price TblGood_Kode (as foreign key to TblGood) | |
Hi to all, I created following table and its view. [blue]create table employee(id integer, name varchar(20), age integer) create view Vemployee as select id, name from employee.[/blue] now I want to rename a view, so I wrote a query like [blue]rename view Vemployee to Pemployee[/blue] But, it shows error about … | |
Suppose I have two tables: [CODE] Table1: Pets PetID----------|Name----------|Type----------| 1 |Shaz |Dog | 2 |Molly |Cat | 3 |K9 |Dog | 4 |Billy |Goat | ______________________________________________ Table 2:PetAttributes PetID----------|AttributeName-|AttributeValue| 1 |HairColor |Black | 1 |Breed |GermanShepherd| 1 |Age |12 | ______________________________________________ [/CODE] As you can see from the sample, the … | |
I have problem with SQL query. I have table in my database which stores attendance of students. It has fields Teacher_Id, Roll_No, Date, Present('0' if student is absent on that date and '1' if present). I wrote following query SELECT count(Present ) , sum( Present ) FROM attendance_info WHERE Teacher_Id … | |
I have a list of values extracted from a datareader in a list. Is it possible for me to run a query to extract another set of values using a datareader and then use the individual values in the list and the values in the datareader to perform some calculation, … | |
There are two server 1)192.168.*.* 2)192.162.*.* In first server there is database call department which contain table called [B]employee[/B] Now i want to copy the from above to second server in database company which contain table [B]employee[/B] | |
Hi, I am trying to set up transactional replication on a MS SQL 2008 database that has two Schemas, both schemas have some tables with the same names. Schema A A.Customer A.Product A.Invoice Schema B B.Customer B.Product B.Incoive My first problem is actually configuring Replication on the publisher using the … | |
I would like to retrieve the previous date (i.e., current date minus 1) and use it in a query through an = operator. I got the following query to retrieve the previous date: [icode]select DATEADD(DD, DATEDIFF(DY, 0, GETDATE()), -1)[/icode] It gives: 2011-03-14 00:00:00.000 I would like to get only: 2011-03-14, … | |
First off, I'm sorry if this is the wrong section, I've been visiting this site off and on for awhile now, but today is my first day joining. Second, I was wondering if there is a way to... auto load, I guess you could say, data from a mssql database, … | |
Hello everyone! I'm trying to get a date from SQL without the year. Every code I've seen has included the year. Here is what I have now. [CODE]SELECT * , convert(CHAR, \"date\", 10) AS ndate from dbo.MYDB where 35 > DATEDIFF(d,\"date\", GETDATE())";[/CODE] I would like ndate to be show like … | |
hello frnd i hav created crystal report my database name is schools and its giving exception ,,,,,,,,, exception in form loading my coding is <crystal report> Imports CrystalDecisions.CrystalReports.Engine Imports System.Data.SqlClient Public Class CRSTECHERS Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click End Sub Private Sub CRSTECHERS_Load(ByVal … | |
I have an SQL Server Query: select *from table1 where column in ('list of values') When I execute this, I get all the details, however, when I do this: select *from table1 where column in ('list of values') and date_of_req='2011-03-15' I get an empty table. All the column headings are … | |
hi, please help me to create setup of my web project. i use visual studio 2010 and Mssql 2008. i have problem in create setup is - i can not create App_code. - framework problem in web config file. please help me to do that. thanks jack. |
The End.