2,935 Topics
| |
SELECT * INTO NewTable FROM existingdb.dbo.existingtable; I am executing this query but it is showing me the error as undeclared variable:Quanti (as quanti is my NewTable) | |
hi i have to search based on opening and closing times of shops. e.g. opening time of one is from 9 am to 11 pm another can be 5 am to nextday 2 am. e.g of sample data below [CODE] ShopID open time close time shop1 10am 11pm shop2 6am … | |
Hi, I have a sql view below: [CODE] SELECT b.Stk AS secode, b.TktE AS Ticket, CAST(a.Last / 10 AS integer(10, 3)) AS Last, CASE WHEN CONVERT(integer, a.Last) <> 0 THEN (CONVERT(integer, a.Last) - CONVERT(integer, a.Ref)) / 10 ELSE (CONVERT(integer, a.Ref) - CONVERT(integer, a.Prev)) / 10 END AS Change, CAST(a.High / … | |
Guys, Please take a look my script. my object here is to get the most recent date from table 2. what if the recent date from table 2 is less than the date from table 1? [CODE] Table1 Type-Date1 -------- 1-2011-07-16 2-2011-07-16 3-2011-07-10 4-2011-07-10 Table2 Type-Date2 -------- 1-2011-07-06 2-2011-07-07 3-2011-07-01 … | |
Good Day Everyone.. i have two tables..how to read from one table1 to table2.. example.. Table1 with thousand over records various types of recurrance and due pattern. where ID = History_ID Table 1 ID Reccurance Duepattern 1 Monthly 10 2 Yearly 25 3 Monthly 15 4 Weekly 5 yearly 14 … | |
Hi guys, Need you inputs on my query. I have an excel file which we have to upload weekly. They want me to make an application using SSRS (MS SQL) . To read the excel file from a certain folder And then make some data entry to inputs like date … | |
hi there, i have a question with the address text box. i am coding in C#. at first user enters the counrty. and then he enters the zip code. the state should pop up. for eg: if 60333 comes the relevant state should come up in the textbox called state … | |
Hi all, I am getting an error in my application that reads: Incorrect syntax near the keyword 'set' It only occurs in a database at a particular venue and only when the offending query/queries are run locally. I have restored the database on my PC and the queries run without … | |
I have a JAVA method that executes the following query to SQL server database SELECT [CHEMICAL_NAME],[CHEMI_UNIT],[PRICE],[VENDOR],[CATEGORY]FROM [RPS].[dbo].[Chemicals]where CATALOGNO = '" + catNo+"' ;"; Following are the column names of the database table CATALOGNO, CAS_NO, CHEMICAL_NAME, CHEMI_UNIT, PRICE, VENDOR, CATEGORY, I get the above mentioned error "com.microsoft.sqlserver.jdbc.SQLServerException: The column name CATALOGNO … | |
Hi Expert, Guys, i need your help on how to do a script calculating the totalDays using the formula (see below). i have to calculate the totaldays based on different Supplier and Rtype and also if the totalday is less than the warranty period i have to indicate it as … | |
I am trying to connect to crystal report from Visual Studio 2010 but i realised my SQL database should have SQL authentication (i.e requires user and password) instead of windows (which was assigned by default). I have tried several approaches to achieve this without luck. Will appreciate some help. | |
I have written an SQL query to return the total quantity of products ordered and total price. The query returns a result for each order in the range I have specified.Please find attached the output i am getting. the desired output i want is as follows: (year,productcode, productname, orders, quantity, … | |
Hi In my office there is an application ,and database is Sql server 2000.Using ODBC connection application connect to database.Recently database move into sql server 2005.Now application is not working,Its generate error message error message is "Connection failed".I tested the ODBC connection its okay. *I dont know what is language … | |
I was asked a question a few days ago that I cannot easily answer. "Why don't we put all of our small application databases into a single database?" Well, There's nothing really stopping us. All of our small apps were developed in house so we don't have any problems with … | |
the following gets first date of the week [CODE]DECLARE @Year SMALLINT = 2011 ;WITH cteSource(firstdate) AS ( SELECT CONVERT(varchar(50), DATEADD(DAY, 7 * v.Number, o.Origin), 101) AS firstdate FROM ( SELECT DATEADD(DAY, DATEDIFF(DAY, '18991230', STR(@Year, 4, 0) + '0101') / 7 * 7, '18991230') ) AS o(origin) INNER JOIN master.dbo.spt_values AS … | |
[CODE] set datefirst 6 datepart(wk,'2011-01-12') [/CODE] yields 2. I would like to derive 2011-01-08 from this number. please help.thanks in advance. | |
I'm connecting to the DB with LibreOffice Base, and initially forgot that this [I]isn't[/I] a MySQL db [COLOR=SlateGray](it's our only non-mysql db)[/COLOR], so I have to say thanks to those from the other forum who helped get me started when I mis-posted. Anyhow, here's what I've got: [CODE]SELECT DISTINCT c.primaryemailaddress, … | |
Hi all, Batchdate comes in as string format (07/07/2011). I tried but for some reason am not getting any results. Any ideas? [CODE]ALTER PROCEDURE dbo.CouponReportbyScheme ( @BatchDate varchar(20) ) AS declare @myDate datetime select @myDate = convert( datetime, @BatchDate) Select * from Coupons where CouponGenerationDate=@myDate [/CODE] | |
I'm trying to populate a temp table, and I'm getting this error [INDENT][COLOR="Red"]Msg 8152, Level 16, State 14, Line 1 String or binary data would be truncated. The statement has been terminated.[/COLOR][/INDENT] Hmmmm ... here's what I'm trying. I created two temp tables and populated #emails from a spreadsheet (text … | |
Hello to all, I have installed SQL Server 2005 on windows xp . Please tell me how can i create new SQL database ? | |
Hi, I have 20 rows in a table and I want to update 10 of them only. I am using MS SQL. Any ideas please. Cheers | |
I hve created one procedure in oracle which is used as a dataset 1 in SSRS in oracle procedure we created one table which is used in sql server query as a dataset 2. but after click on refresh button it gives proper resultset. can we get proper data without … | |
Hi, I have a table with more than 3000 records. I need to replace a particular string of all the rows wid some other string But when i am using replace function Its only replacing half of the rows of the table while the other half are not getting replaced. … | |
Hi Guys, I have created a manual SSRS Report. when i click the layout tab it display report layout then i drag the fields from report datasets. i want to set my fields into Table details and i want to insert group but this function is missing or hide. i … | |
Hi, I want to implement a voting system in my web page. What I want to do is give a user 1 point per day so they can give that point to other users but after they give their point they have to wait until the next day to have … | |
Hi All, I have my table with duplicate records. the duplicate records have the same ESN and Shipdate the difference is the time. there is no transaction in same date. That's why i would like to remove the other records. I need your help guys. How to this. 1. I … | |
LEADID ACCOUNTMANAGERID ActivityDate USERNAME Q6UJ9A08MZSN U6UJ9A0000IR Mar- 1-2011 KSHITIJ GUPTA Q6UJ9A08MZSN U6UJ9A0000IR Mar- 1-2011 KSHITIJ GUPTA ACCOUNTNAME Kayess Finance & Investments Kayess Finance & Investments show only one records for duplicate this o/p come from various join it just an sample data i have near about 250 duplicate records in … | |
Hi, Can any one suggest the method to delete bulk records upto 1 lakh without specifying any condition? There's no Id to be specified in checking in the where condition. Please suggest an idea . Thanks In advance |
The End.