2,736 Topics

Member Avatar for
Member Avatar for violette

I need to get data between year and period. 1 year have four periods. i.e; year = 2010 period = 1,2,3,4 the problem is on the period part where i could not select second period smaller from the first period. for example, i choose year=2010 to year=2011 and period=4 to …

Member Avatar for violette
0
186
Member Avatar for violette

Hi. I would like to do insert and update database using data from excel file. before i can insert any data into the db, i have to check whether the field is already in the database or not. the primary key is year_id, period_id and stock_code. IMO, to do data …

0
60
Member Avatar for ibpet11

Pals, I love this site with a passion. Again now i need to know how i can relate different tables together using SQL database with different field. Thank you for your responses.

Member Avatar for sneha_07
0
149
Member Avatar for great_learner

Hi guys, I am writing some query from winforms. I am getting error with the following query: [CODE] string query = "Select [Doctor Name], Day, DateTime, Med_Sur from Doc_Pat_App where (lower([Patient Name])= '" + name + "') and (DateTime >= GetDate()))";[/CODE] I know that there is no mistake till lower() …

Member Avatar for great_learner
0
198
Member Avatar for ssreevidya.m

Hai , I have 2 tables 1. [B]Transport_Details [/B]having columns user_id FareStageId StartDate EndDate and 2. [B]Route_Fee [/B]having columns FareStageId monthId fees I need to get a monthwise list by passing monthid. But my problem is that , if start date and enddate of a user are 02-08-2011 and 20-02-2012 …

Member Avatar for urtrivedi
0
120
Member Avatar for jacksantho

Hi, Anyone please help me out. Am having a table with field name 'status' with the values 'yes' or 'no'. Really, i wants to change this 'yes' or 'no' status automatically using mssql server. But i don't have an idea to continue on this work. for example, now the value …

Member Avatar for jacksantho
0
1K
Member Avatar for Traicey

Guys I have a table with image datatype and I wana insert an image in the image field, for example [CODE=SQL]insert into dbo.Products(ProductID, ProductName, ProductPrice, ProductImage) valeus(144, '8 Gig Lenovo memory Stick', 250.00, 'Image from C:Drive or where ever the image residing')[/CODE] Thanx in advance

Member Avatar for yassooo
0
184
Member Avatar for a.muqeet khan

guy i was given a qeustion for my exam that What is the most commonly booked room type for each hotel in London? to this i replied [CODE]SELECT MAX(R.roomno)AS most room selected FROM ROOM.R,HOTEL.H,BOOKING.B GROUP BY roomtype WHERE H.hotelno=B.hotelno AND city='london' [/CODE] my problem is that i dont know if …

Member Avatar for adam_k
0
124
Member Avatar for MARKAND911

I want to create a SQL login in SQL2005. I tried creating it but it gives me error message [COLOR="Red"]"Create failed for login 'username'. User does not have permissions to perform this actions"[/COLOR] What to do now to create a SQL login in sql 2005

Member Avatar for BitBlt
0
146
Member Avatar for violette

hi all. here's my problem;. I would like to have a macro to export data from an excel file into the database(SQL) for insert and update data purposes. but i'm not sure how to do this.Can someone please show me a code syntax on how to do it?the excel file …

Member Avatar for adam_k
0
175
Member Avatar for spowel4

Is it possible to create a stored procedure to delete all records from a table (i.e. DELETE FROM <tablename>), but pass the table name to the procedure as a parameter? My desire is to have only one procedure for deleting multiple tables' records; I would simply pass in the table …

Member Avatar for adam_k
0
187
Member Avatar for CSharpUser

I'm new to MS SQL and trying to solve a problem where I need to extract specific data from a remote SQL Server 2005 DB into a local SQL Server 2008 R2 DB. In a Stored Procedure, I'm trying to use Linked Server via Ad Hoc links in the following …

Member Avatar for BitBlt
0
502
Member Avatar for Mahesha999

Hi there. I am learning SSAS using Wrox book. I followed the tut in the book to create a project in BIDS (Business Intelligence Studio by Microsoft). Deployed the project in SSAS, which gave success status. However while browsing it in Cube Editors browser pane it gave me error as …

0
109
Member Avatar for vishwanath.m
Member Avatar for manhthaodn

I have 3 tables: A, B, C. How to insert 100000 rows into table B, while inserting have data is the random data are taken from Table A and C Thanks for help!!!!

Member Avatar for BitBlt
0
537
Member Avatar for odysseous

Hi, I have a problem with reading a csv file with SQL server UNH+ATOPHOEXEDI+AVLABL' PLD+AII+RE11S' TRV+1+40+DU03+MAN+LCA+20110706:0000:1' ACC+1+SUNNY HILL HTL APTS ?+ POOL 3*:11113+:: PAPHOS+20110706+3:3 STAR++E:1:999' PRC+A:825:3*C:0:1:15+9+5:2475:9:1BDR APT 2/4 INLAND VIEW+2:4++SC: SELF CATERING' TRV+2+40+DU03+MAN+LCA+20110706:0000:7:N:20110713:0000' ACC+2+SUNNY HILL HTL APTS ?+ POOL 3*:11113+:: PAPHOS+20110706+3:3 STAR++E:1:999' PRC+A:4900:3*C:0:1:15+9+5:14700:9:1BDR APT 2/4 INLAND VIEW+2:4++SC: SELF CATERING' . …

Member Avatar for BitBlt
0
225
Member Avatar for sasom88

Hi! I need some help. Let's say I have 3 tables (t1(id,ds), t2(id,ds) and t3(id,ds)) where the tables don't necessarily have the same id fields. For example: t1 id ds 1 1 2 0 5 7 t2 id ds 8 5 1 2 t3 id ds 9 3 8 5 …

Member Avatar for BitBlt
0
200
Member Avatar for Arjun_Sarankulu

Procedure is created on SQL server inserting the data from sql server to oracle databse When individually run the query it executed in 10 sec When run through procedure it takes sometime 1.5min and 5min [CODE] CREATE procedure sp_Trade_Book as Begin SET NOCOUNT ON BEGIN TRY --Begin of TRY BLOCK …

Member Avatar for moone009
0
116
Member Avatar for faizAtOddz

is there any way to backup an sql server 2000 database using the front end (Vb6) ...... Had been it in Access itz even possible via save as dilog I ve done it but sql 2000 is a problem

Member Avatar for Netcode
0
41
Member Avatar for ssreevidya.m

Hai, I Have an sp like this: [CODE]ALTER procedure [dbo].[SP_ClassInsertion] @ClassType varchar(50), @ClassTypeId varchar(50), @ClassName varchar(50), @SchoolId varchar(50), @ClassID varchar(50), @BatchId varchar(50), @Userid uniqueidentifier, @ClassCategoryId varchar(50), @SchoolClassCategoryId varchar(50) as declare @STATUS int begin if exists(select Class_Id from SCH_Class where Class_Name=@ClassName and School_Id=@SchoolId and Is_Valid=1) begin set @STATUS=0 end else begin …

Member Avatar for ssreevidya.m
0
300
Member Avatar for dfn77

NOTE: If this is too long, scroll to the last paragraph where hopefully I've summarized my problem. I have a simple problem. I have two tables, one is for the "header" and one is for the "details" of the header. I need a view to return all details and the …

Member Avatar for adam_k
0
190
Member Avatar for jacksantho

Hi, 1. Just am created a user for the login 'test'. 2. As with this login 'test', i logined to the server. 3. I don't have the permission to create the database. 4. So i tried this query: [CODE] use master grant create any database to user go[/CODE] 5. Am …

Member Avatar for pritaeas
0
3K
Member Avatar for jovillanuev

Guys, I have those records. how to i removed the first 10 records and the last 2 records(-U)in string. P300-1110-C731-U P300-1110-INCREDIBLE-U P300-1710-DEVOUR-U P300-1710-DROID2-U P300-4410-THUNDRBLT4G-U P333-4110-8530-U Here is the correct Result: C731 INCREDIBLE DEVOUR DROID2 THUNDRBLT4G 8530 Thanks in Advance. Jonel

Member Avatar for adam_k
0
67
Member Avatar for Ichcha

hi , I have database 'center' with huge data and wanted to create a dummy 'test' database for 'center' db with 1000 random data for testing purpose. I generated script to copy the db but the resulting 'test' db was tables without data. i need 1000 samples for all the …

Member Avatar for adam_k
0
82
Member Avatar for Eagletalon

Hey guys, Alright I have a tricky assignment to do in a view that will enable my next program to run MUCH faster and more reliable... Now I need to list all Items (1 table) and their locations where they are stored (2nd table) in a way that enables 1 …

Member Avatar for adam_k
0
185
Member Avatar for LAMDB

Hi all, I need to run a query that performs a count(*) on a table. This gives me the subtotals for each group. Now I need to sumarize the subtotals with sum the results given by the previous count. What would be the best way to do this? Thanks.

Member Avatar for nahjipeel
0
1K
Member Avatar for Dumb Fish

HI, I don't know how to get the lastest data form the database. do anyone can give me some exmaples to see how to retrieve the latest 50 data.

Member Avatar for jovillanuev
0
99
Member Avatar for jovillanuev

Guys, what particular drive/folder to stored the text/csv/excel file that the bulk insert will be reading? what if in my local drive is this applicable? or it should be in the shared folder in the server. Thanks, JOV

0
96
Member Avatar for jazzyb

Dear Friends Hi I have developed VB application which uses SQL Express. When We install SQL Express it is by default set to install Service Account = Network Service. But I want to create installer which should install SQL Express 2008 (With Service Account = Local System) and along my …

Member Avatar for adam_k
0
122
Member Avatar for jackparsana

Hi, I have database in mssql 2008. In that, I want to fetch Column names from table in array. Is it posible? Please give me some suggestion. Thanks in advance. Jack

Member Avatar for BitBlt
0
193

The End.