2,935 Topics
| |
Error message ā[Microsoft][ODBC SQL Server Driver][SQL Server]String or binary data would be truncated.ā comes when you insert/update a larger value than the column is specified for. But is there a way to detect what column, or what value that is to large? Iām thinking about splitting up the INSERT string, … | |
I have a table name Project(id,projectid,date) ----------------------------------------------------------- id | projectid | date 1 | 9 | 2009-02-03 2 | 9 | 2009-03-04 3 | 9 | 2009-04-05 i need a query which will return me the recent date of that project id. query will return: 3 | 9| 2009-04-05 | |
Hello, i have face problem when i need to retrieve data from database (SQL 2000). Below my table : Column A | Column B 1 a 1 b 2 c 2 d i need the result is : Column A | Column B 1 a b 2 c d Can … | |
Hy, you guys! I'm trying to implement in a trigger write by-me error handling with TRY...CATCH, but I'm loosing a lot of time without success. :'( Here there's a simple code write for test: [CODE]ALTER TRIGGER [dbo].[INS_AlarmsEvents] ON [dbo].[TEST] AFTER INSERT, UPDATE AS BEGIN TRY RAISERROR (N'This is message %s … | |
I'd like to make a querry prom 2 tables that have the same information. Tables have only one column named "fish". I'd like to create a querry that will show me every combination from first table with the second table (in 2 separate columns). For example: My table contains: A,B,C. … | |
HI, I have in my database 50+ tables and getting slowly lost because it's looks like a bit messy up because of the long list in the Object Explorer (SQL Server Management Studio). Does anybody know a way how to organize this tables in subfolders like how the "system tables" … | |
Hi all, I have created the Trigger for UPDATING to be invoked when Returnedon column is updated using the following code snnipet. [Code] CREATE TRIGGER trg_ForUpdateOnBookIssuedDetails on BOOKISSUEDDETAILS For update as begin declare @Rows1 int,@Rows2 int if(update(ReturnedOn)) begin begin tran update nur set nur.NumberOfBooksIssued = nur.NumberOfBooksIssued -1 from NewUserRegister nur … | |
Hi all, I am creating a trigger which should be triggered on insert to BOOKISSUEDETAILS table. I want to alter the table LIBRARYBOOKDETAILS table only if the Inventory column value is greater than 1. Initially I have created the trigger in the following way. But now I want to alter … | |
Hi evrybody, My sql SP takes around two to three minutes which is quite long time to execute the SP select data from three tables publicity(29000 row) publicitysubject(29000 row) & lookuptable(50 rows) all three tables have clustered index How can i reduce the time [code] USE [ReadWorthyPublication] GO /****** Object: … | |
I have written a complex stored procedure which have a log table which keeps the track of success/failure of each and every query in the stored procedure. If there is any error in any of the query entire transaction is rollback . while rollingback, data in log table is also … | |
Hi All, I have data like the following: Stuff Sizes ID pen s1 100001 pen s2 100002 pen s3 100003 pencil s1 100001 pencil s3 100004 pencil s5 100007 pencil s2 100006 ruler s7 100005 ruler s8 100008 .. .. where each size is coordinate with a unique ID number; … | |
Ok; I have a table with a list of products, for example ProductID Name Price 1 Red 2 2 Blue 1 3 Green 3 4 Orange 3 5 White 4 6 Blue 5 I want to give people the option of "featuring" products, and also to be able to control … | |
Hi all, I am trying to update Table[land] with the following data (simplified): [u]Scenarios:[/u] Num_1 like [A-Z], Num_1_Index like [1-9] Num_2 like [A-Z], Num_2_Index like [1-9] ..... Num_26 = [A-Z], Num_26_Index = [1-9] --------------------------------------------- Update land set Num_1_Index = case when Num_1 like 'A' then '1' when Num_1 like 'B' … | |
Hi. I have strange problem with sql query results. I am joining two tables and displaing result with order by clause. But results on MS SQL and Sybase are different. After removing order by clause in both queries results are equal. I am using the same table so I do … | |
Hi everyone, I am working on a project where i have encounter such problems: Data samples: LA-1-2, LA-1-2-33, LA-1-22-333-4444, LA-2-3, LA-12-34, LA-123-45-67 .. with upto 8 dashes Objective: I need to find the values behind each dashes into multiple columns in orders. [e.g LA-1-2-33 will have columnA = 1,columnB = … | |
Hi, If I have a stored procedure that creates a table of 4 rows (recommended products for a given product). What's the best way to create a cached table of these 4 recommended products for EVERY product in a products table. (Cached table being 4 times bigger than product table) … | |
I created a job site using my web masters, now I wanted to use the same script for my other job domains. I tried copying all my php web pages in to the server, and also changed the database configuration to match the new server password, I created tables in … | |
I am REALLY new to SQL. Teaching myself C#; downloaded SQL Express 2008. (Not sure of the terminology either...) Successfully created several tables for my desktop customer database. I am not able to populate the database yet... Do I have to create my own application to add data to the … | |
Dear All, I have developed C# application to import data from CSV to SQL Server using sqlBulkCopy. However I am facing couple of problems listed below 1. whole transfer fails when one record has column width issue (source column width is 30 and destination is 20) so how could I … | |
hello everyone..I would be grateful if anybody could help me in performing subtraction from diffrent tables... My Database has a Asset table which has opening balance and balance left coloums in it.and i have one store table which has received/issued item and its quantity.Wat i want to do is if … | |
I'm relatively new to MSSQL, and I'm trying to improve the DB write performance. I have some legacy Java code that's generating about 1500 records every second. These 1400 records are generated by multiple Java threads. Right now, my approach is to create an SQL statement in each thread, to … | |
hey, first off I'd like to state that I am pretty new to ms sql and stored procedures tho I have worked with sql for quite some time. My employer would like me to write a script which takes html content from a mssql db (originally delivered dynamically) and create … | |
Hi, As a requirement of one of my assignments, we have to upload images, videos and audio files in a column called fileContents. Earlier I had set the data type for the column as 'Image'. But my professor says that I wont be able to upload Audio or video to … | |
I am more interested to know a site that got sample web access code -- to access SQL server / oracle database == could include any of the following language --- c# , vb.net, jsp --- asp, javascript -- ajax answer could be in form of the coolest CMS on … | |
how the session states are stored in sql server ...where it will be configured before store it into sql server ? | |
can anyone tell me about sql transcation with example..what are the types are there ? | |
Hey all, I'm trying to insert a bunch of rows from an xml document into an SQL database. I have a stored procedure that I'm calling from my program after I generate the XML string and pass it into the SP. It runs with no (visible) errors, but when I … | |
hi, how to get database records from mssql into excel sheet using vb.net. if i click on button and open the excel sheet enter the data and the data is stored in database in the form of records... | |
Good day All I have a Challenge. I have the Following StoredProcedure that is doing the Following [code] IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[temp]')) drop table [temp] --Creation of Temp1 SELECT MTN.ID,S.DESCR,ISNULL(MTN.CYCLETEMPLATE,C.CYCLES) AS CYCLETEMPLATE into temp FROM TBL_STAFF S INNER JOIN MTM_ACTV_STAFF MTN ON S.ID = … | |
The End.