2,935 Topics
| |
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> | |
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 … | |
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 … | |
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 … | |
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 … | |
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), … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 | … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
Please help me in getting maximum sales in their own region by sql query | |
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 | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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> | |
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 … | |
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 … |
The End.