2,935 Topics

Member Avatar for
Member Avatar for NextCom

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, …

Member Avatar for NextCom
0
5K
Member Avatar for manojjena1982

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

Member Avatar for cgyrob
0
110
Member Avatar for nokomoli

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 …

Member Avatar for sknake
0
124
Member Avatar for fulvio1981

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 …

Member Avatar for NextCom
0
136
Member Avatar for sebaz

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. …

Member Avatar for sknake
0
112
Member Avatar for roschc

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" …

Member Avatar for NextCom
0
134
Member Avatar for S2009

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 …

Member Avatar for NextCom
0
211
Member Avatar for S2009

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 …

Member Avatar for S2009
0
1K
Member Avatar for rak4u

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: …

Member Avatar for sknake
0
152
Member Avatar for ankushbansal89

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 …

Member Avatar for sknake
0
84
Member Avatar for mathmath

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; …

0
76
Member Avatar for efontana

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 …

Member Avatar for sknake
0
166
Member Avatar for mathmath

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' …

Member Avatar for sknake
0
102
Member Avatar for krokodajl

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 …

Member Avatar for krokodajl
0
259
Member Avatar for mathmath

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 = …

Member Avatar for jbisono
0
163
Member Avatar for alexstrong29

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) …

Member Avatar for germaine.tay
0
140
Member Avatar for bporajesh

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 …

Member Avatar for bporajesh
0
89
Member Avatar for seblake

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 …

Member Avatar for seblake
0
145
Member Avatar for havejeet

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 …

Member Avatar for sknake
0
153
Member Avatar for Manak

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 …

Member Avatar for sknake
0
116
Member Avatar for kunalashar

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 …

Member Avatar for cartman714
0
174
Member Avatar for fayola

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 …

Member Avatar for fayola
0
239
Member Avatar for sid78669

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 …

Member Avatar for sid78669
0
103
Member Avatar for 3xxx

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 …

Member Avatar for Ezzaral
0
87
Member Avatar for sivak

how the session states are stored in sql server ...where it will be configured before store it into sql server ?

Member Avatar for sknake
0
50
Member Avatar for sivak

can anyone tell me about sql transcation with example..what are the types are there ?

Member Avatar for Narue
0
60
Member Avatar for adamf07

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 …

Member Avatar for adamf07
0
176
Member Avatar for mohankumar554

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...

Member Avatar for kvprajapati
0
84
Member Avatar for vuyiswamb

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 = …

Member Avatar for vuyiswamb
0
156
Member Avatar for sivak
Member Avatar for Ramy Mahrous
0
47

The End.