2,935 Topics

Member Avatar for
Member Avatar for javed123

I have to select one table out of two to fetch data depending on particular condition i.e. month less than current month will fetch data from table [B]A[/B] and month equals or greater than current month will fetch data from table [B]B[/B] <FAKE SIGNATURE>

Member Avatar for waqas royal
0
115
Member Avatar for bellatrix77

Hi, need help on coding. I would like to create a table from another table, including relationships/index/keys. I know I can do this: [code=sql]Create Table New_Table as (Select * from Old_Table) where 1=2[/code] but that would not include the relationships/index/keys. I wonder if it is possible to clone entirely by …

Member Avatar for sknake
0
132
Member Avatar for CNIDog

I have searched the world over for answers to my dilemma and have learned a lot, but not what I need to know. My programmer compiled our website and pushed it to the server and sent me the source code. I cannot get the source to compile. I have a …

Member Avatar for sknake
0
142
Member Avatar for milenio

Hi all, i hope anyone of you can help me on the following matter: I have two tables: Recordingid Connection Sequenceno 1233036621 1 3 1233036621 1 4 1233036621 2 8 1233036621 2 9 And the second one: Recordingid Connection Sequenceno Code Cause 1233036621 1 1 21 9 1233036621 1 2 …

Member Avatar for Ezzaral
0
123
Member Avatar for Es Sayen

hello, i have a table having 4000 (four thousand) records and now i want to delete 3000 of them as i don't need them, these records have primary key as id which is ofcourse unique. can anyone tell me how can i delete these records with one query. if their …

Member Avatar for ultimahosts
0
161
Member Avatar for Link82

Hey everyone, I'm working on something ridiculously convoluted right now and am so close to finishing, hopefully I can get some proper help here. I have my base table, as so: [CODE] -- Insert statements for procedure here CREATE TABLE #starter ( emplid char(6), acct_code char(128), div char(3), payroll_sect char(3), …

Member Avatar for Link82
0
140
Member Avatar for sonial8

Hi does anyone know how to update a datepart? update table set datepart(dd, tablename) = '30' where ?? What I want to do is udpate records date data but only the day so where all of the records > '2009-07-25 00:00:00.000' are updated to 30 i.e. 2009-07-30, I want to …

Member Avatar for sknake
0
118
Member Avatar for normmy

Hi all I would apreciate some generic help with the following problem as it's probably far too complex to document and solve on a forum but I need some more ideas on how to diagnose this problem. situation: PHP running on a Hiawatha server using an mssql 2000 database. all …

Member Avatar for codejoust
0
110
Member Avatar for LED555

I'm trying to INSERT a zip file into an MSSQL table. The table structure is such: [CODE]CREATE TABLE [dbo].[zips]( [id] [int] IDENTITY(1,1) NOT NULL, [timestamp] [varchar](50) NULL, [inserted] [varchar](50) NULL, [filename] [varchar](50) NULL, [raw_file] [varbinary](max) NULL ) ON [PRIMARY][/CODE]...nothing too fancy. When I insert a text file, everything is well …

Member Avatar for LED555
0
530
Member Avatar for cheapterp

I am using MS-SQL 2005 DB. One of the tables in the DB, that I inherited, has gotten upto 37000 records. And it will go up by another 50k records soon. Does that make too much data for one table? The table has about 25 columns, most of which contain …

Member Avatar for sknake
0
155
Member Avatar for josh_keren

Please Help me, I have 2 Table, A dan B. Table A : Sandar | jmlMuat --------------------------- Mirah | 20 Berlian | 10 Table B : Sandar | jmlBongkar ------------------------------- Mirah | 30 Nilam | 15 I want to join that table to get result like this : Sandar | …

Member Avatar for sknake
0
98
Member Avatar for SQL_n00b

The title to the thread pretty much describes what I am getting stuck at. I was able to create a procedure successfully, but everytime I try to execute it, I get an error:[QUOTE]The EXECUTE permission was denied on the object 'sp_OACreate', database 'mssqlsystemresource', schema 'sys'.[/QUOTE] Logically speaking, if the DB …

Member Avatar for SQL_n00b
0
435
Member Avatar for eeyc

Hii I Have Facing with Order problem i try to query From Table it go like this -> [code=sql]SELECT * FROM Client WHERE (ClientName LIKE 'X%') OR (ClientName LIKE '%[ ]X%')[/code] It mean give me all clients that start Whit X Letter And Included MiddleName If There is And Last …

Member Avatar for eeyc
0
133
Member Avatar for virang_21

Hi All SQL Gurus, I am working on a project for a college. I have to generate a unique student Id for each student. I know I can use IDENTITY column to achieve this but I have rather complex situation here. My studentID field is string because they want it …

Member Avatar for sknake
0
122
Member Avatar for stoymigo

Hi, recently i needed to query a table , however i was denied "Select " permissions (because permissions had not yet been exported as the db was). Should my application enable for administrator to grant permissions , if that error occurs OR should permission granting be done through MS SQL …

Member Avatar for sknake
0
111
Member Avatar for sid78669

Hey Guys, So I'm working on an ASP page and I am making use some select statement. Now, I need to specify a where clause and make the only condition in there optional, i.e.: [CODE=SQL] SELECT * from table where Upper(name) LIKE "SID" [/CODE] I want to make [CODE=SQL] where …

Member Avatar for sid78669
0
136
Member Avatar for rogergrippo

I wish to develop a tracking script for a courie company It wishes to show its customers the movement of the goods and its status in its website. How Should I make it. I am confused very much as the requirement says entering of tracking number will find out the …

0
110
Member Avatar for manips
Member Avatar for rajesh79

i have one table.that contains one salary field.I want to find the third maximum row from that field.If anyone knows this please help me thanks

Member Avatar for manips
0
80
Member Avatar for gsc1ugs

I'm trying to bind to querys and would like to know most efficient way to do it I have these that both need binding as one SELECT * FROM categories ORDER BY categoryDesc and select count(*) as amount from products where idCategory = "&idCat&" and listhidden = 0" idCat is …

Member Avatar for gsc1ugs
0
123
Member Avatar for CFROG

I'm so completely new at trying run a local SQL server that it's laughable to watch me try. Anyhow, I made the install to my laptop and it seemed to go okay with no errors or anything like that. When I look in the configuration manager it says that SQL …

0
82
Member Avatar for joewazen

Hello, I am thinking of using a partitioned view in my database but i am not being able to find whether it will affect other normal views i.e. if i have a view 'A' consisting of many tables/views and then i partitioned one of the tables into several tables joined …

0
57
Member Avatar for gnobber

I have this table (Account) containing fields ID and ParentID. ParentID's value is the ID of the parent account for that account. Now, I set up a trigger that on delete of the parent, all children also gets deleted. But the delete only works one level. I mean when I …

Member Avatar for gnobber
0
110
Member Avatar for normmy

Hi all hopefully I can explain my problem correctly, this is my first post on DaniWeb. I'm currently working on a legacy medical research database that uses a Varchar field to store a decimal number, this field can also be used to store text entered by a researcher on the …

Member Avatar for sknake
0
174
Member Avatar for Link82

Hi everyone, So I need to find out if a date entered is a Sunday. If it is, I gotta do something special with this data. I'm not sure if Datepart will help or how to use it effectively to extract if it's a Sunday or if it's 1st day …

Member Avatar for sknake
0
116
Member Avatar for _taz_

I need help with a query. Looking though the forum and other online resources I can usually figure out what I need, but I'm drawing a blank on this one. I have a clients table which has client info in it, and a receipts table with receipt info. what I …

Member Avatar for _taz_
0
282
Member Avatar for sakhi kul

hello to all, I am using MS SQL 2005. I have 3 tables, COLLAGE, USER, STUDENT I am providing username & password to collage as well as students. I wanted to assign Foreign Key to 'username' in both tables College & Student. i have done, 1. right click on username …

Member Avatar for manoshailu
0
195
Member Avatar for avi-reiter

Does anyone know if its possible and/or practical to set up database mirroring between two MS SQL 2005 servers that are on completely different networks? The bandwidth between them is around 5mb and asynchronous would be fine. Thanks in advance, Avi Reiter <URL SNIPPED>

Member Avatar for sknake
0
41
Member Avatar for jayroldvicencio

Hi there. Im new to asp programming. And I am doing a research project for my school. I'm create a website with MS SQL SERVER 2005 with ASP. But the problem is the right connection. I have searched the web almost 2 weeks but nothing happened. Here's what my code …

0
114
Member Avatar for caliguy1979

Hi, I don't know how exactly how to do this. So for example I have the following set of data: Table: tbl_country_costs Country Type Cost North America Sales 2000000 North America Expenses 1250000 North America Taxes 250000 North America Profit 500000 Europe Sales 2500000 Europe Expenses 1250000 Europe Taxes 500000 …

Member Avatar for caliguy1979
0
163

The End.