2,935 Topics
| |
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, … | |
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 … | |
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. | |
Hello guys, I have two tables with the following structure: TABLE A: Email Address, CampaignID, Source, Unsubscribe Email1,2 Email1,1 Email1,3 Email2,5 TABLE B: Email Address, SeedList, ListName Email1,SeedListA.SeedListA Email1,SeedListB,SeedListB Email2,SeedListC,SeedListC The purpose is to merge the two tables together. But there is a really strange rationale behind this merge. If … | |
Afternoon All, hope someone can help as this is really doing my head in. I have a SQL View which has a field called MOP/T which shows the number like so 28.5140299679490 349.893390000000 349.893389892905 I want to format that field so that it only shows the number before the decimal … | |
I have an XLS file. Let's assume that it has 1000 rows in all, with 10 columns. I would like to import rows 5 through 995 (say), and columns 1 though 7 and 10. How can I do this using an SQL query, either though OPENROWSET or BULK INSERT? I … | |
Hello All, Can some one help me how to write query for finding the profi per unit using SQL server 2005/2008. I have got a unit table which contains UnitId and Quantity and the other table which contains cost price, selling price and the Unit Id. Thank you | |
[CODE] SELECT p.* FROM (SELECT CONVERT(CHAR(10), li.RequestResolutionDate,110) AS DeliveryDate, ISNULL(ity.ItemTypeCode,'N/A') AS 'ItemTypeCode', rc.ResolutionCodeDescription FROM LALocationItemTypeRequest li LEFT JOIN LAItem it ON li.ItemID = it.ItemID LEFT JOIN LAItemType ity ON it.ItemTypeID = ity.ItemTypeID LEFT JOIN LAStop st ON li.StopID = st.StopID LEFT JOIN LALocation lo ON st.LocationID = lo.LocationID LEFT JOIN … | |
hi , can some one provide me with a tutorial in creating user group in ms sql and assigning users to that group appreciate a lot thanks | |
Hi to all, I created the following table --------------------------------- create table publisher(name varchar(20), city varchar(20)) --------------------------------- I want to put following constraint, 'name is having unique with city taken only from 'mumbai', 'pune', 'nasik', 'panji''. I know about unique constraints with name. I searched many about constraint with city, but … | |
Respected Friends Hi I have one table named as 'payroll' with the columns employee_id,employee_name,employee_designation, basicpay,allowances,month,year. This table data as follwoing: employee_id , employee_name, employee_designation, basicpay , allowances , month, year 1 , SAM , MANAGER , 5000 , 1000 , JANUARY , 2011 1 , SAM , MANAGER , 6000 … | |
He guys when i execute this stored procedure by right clicking on it and press execute then entering a value for PW i get a NULL value returned any idea why? [CODE]USE [DR2_Member] GO /****** Object: StoredProcedure [dbo].[up_php] Script Date: 02/26/2011 18:26:34 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON … | |
Hi all, I'm a newbie when it comes to SQL and I have 2 tables that I need to update. Let's say, for argument's sake that the first table (Products) has an identity column (automatically incremented) with the name of ApplicationValueID. It stores a bunch of data about a product … | |
Hi everyone, I am getting this error: [CODE]Msg 512, Level 16, State 1, Line 1 Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression. The statement has been terminated.[/CODE]please … | |
hi i have a question in getting values from two table i ave two tables Table1 and Table2. table 1 have data and table 2 may have the same data as table 1 and more. and also table 1 may have the same data and some which is not in … | |
Hi to all, I create the following table. create table man(id integer, name varchar(20), city varchar(20), age integer) I want the age, maximum age of person. So, I ran following query, select name, max(age) from man group by name; It shows name of all person in ascending order with their … | |
I have a table in which i have a column named "dtCreated" which has got datatype as VARCHAR(50) Now I want records between two dates. I wrote my query as written below [CODE] select * from mytable where dtcreated>=fromdate and dtcreated<=todate [/CODE] This query work fine when fromdate and ToDate … | |
Hi to all, I have nothing idea about how to create relation and solve their queries. I want to relation as follows: ------------------------------------------------------------------- BookAuthor(book, author, earnings) BookReference(book, referenceBook, times) BookReview(book, reviewer, score) BookPublih(book, year, publisher, price, numbar) In these database, each book may have 1 or more authors & each … | |
Hi to all, I created the following two table -------------------------------------- create table mail(mid integer primary key, name varchar(20) ) create table phone( pid integer foreign key references mail(email), phone integer) ----------------------------------------- After inserting records on both table, now i want delete perticular record from table say 'delete record of pid=12'. … | |
I am receiving an error 'Incorrect syntax near the keyword in Any ideas? [CODE] declare @item varchar(100) declare @stopid varchar(100) set @item in (select itemtypeid from laitemtype where itemtypeid like '88BBA7AD-BD25-E011-94E0-001B214A75A5') set @stopid in (select stopid from lastop where stoptypeid like '7D14FC8C-B184-DD11-9BCC-0014221E87F0') insert into lalocationitemtyperequest (itemtypeid,requestprocesseddate,createddate, stopid) values (@item,getDate(),getDate(),@stopid) [/CODE] | |
[B]hi guyz..! i want to know da process the to configure sql server on client pc..using odbc...i have install sql server 2000 advance server on windows xp platfrm... i m trying to configuraing frm so long ...bt m failed..! kindly help me regards[/B] |
The End.