2,736 Topics

Member Avatar for
Member Avatar for hitro456

Hi folks, I had mysql database with English+Chinese data in it...I had to migrate that database from mysql to MSSQL 2005. Now I cant view any chinese character..It shows '?' symbol in place of chinese characters. How can I set the collation in MSSQL that I can view chinese data …

0
86
Member Avatar for KRichardson1127

Hello all! I'm trying to convert one of my columns in MS SQL Server 2005 from an integer to a decimal field (ex. 59670 ---> 596.70), but I keep receiving an error message: [COLOR="Red"]Msg 8115, Level 16, State 8, Line 1 Arithmetic overflow error converting numeric to data type numeric. …

Member Avatar for sknake
0
91
Member Avatar for brookstone

Hi, This should be a simple query but I am not able to figure out how to get the result I want. I have two tables A and B and want A left Join B however, I do not want all of table A. I want to restrict table A …

Member Avatar for kplcjl
0
135
Member Avatar for kplcjl

Table1 has clustered PK A, 2 has clustered PK [A,B] and has a foreign key to table1. Both A and B are uniqueidentifiers and when table2 adds a record, B is always set to newid() so B is unique in table2. For each A value, there aren't more than 100 …

0
75
Member Avatar for sbv

Hi friends..... As when i am doing this task and found know help .............. here i am putting steps for importing data from Excel sheet into SQL Server 2003. How to Import data from excel sheet to SQL Server Note : - Sheet should be exactly same as Table in …

Member Avatar for sknake
1
224
Member Avatar for carelvos

Hi Guys, I have a problem connecting to a SQL Server from Windows 7 - this particular server I can only connect to by using the named instance from Win XP - I can connect to other servers that does not require you to connect to the named instance eg: …

Member Avatar for Ramy Mahrous
0
192
Member Avatar for end3r

Hy, I have a select like: [CODE] select case when isnull(my_table.entry,0) > 0 and my_table.edate = convert(datetime,substring('2009-09-20',1,10)) THEN COUNT(*) else 0 END as no_entries_date1 ,case when isnull(my_table.entry,0) > 0 and my_table.edate = convert(datetime,substring('2009-09-21',1,10)) THEN COUNT(*) else 0 END as no_entries_date2 ,case when isnull(my_table.entry,0) > 0 and my_table.edate = convert(datetime,substring('2009-09-22',1,10)) THEN …

Member Avatar for end3r
0
97
Member Avatar for jlenyi

** database table in visual foxpro ver.7 db2, fields: pid,fl1,fl2,fl3 ** database table in MS SQL database1 database1 fields: field1,field2,field3 Code in fox: SET DATE GERMAN uz1=ALLTRIM(db2.fl1) uz2=ALLTRIM(db2.fl2) uz3=ALLTRIM(db2.fl3) pMySQLstr="DRIVER=SQL Server;SERVER="path+"\SQLEXPRESS;"+"UID="+name+";PWD="+pwd+";Database="+database1" pMySQLhandle=sqlstringconnect(pMySQLstr) SQLSETPROP(pMySQLhandle, 'Transactions', 1) && Automatic transactions SQLEXEC(pMySQLhandle, "update database1 set field1=?uz1, field2=?uz2,field3=?uz3 where id=?pid") SQLDisconnect(pMySQLhandle) ** end sql …

Member Avatar for jlenyi
0
101
Member Avatar for VegaLA

Hi all, been working on this problem for a while now but having little success finding a satisfactory solution. I have a DTS package which contains two connections. one for SQL, the other for AS4000. I would like to pull records from the AS400 table using Account numbers stored in …

0
39
Member Avatar for sdimantova

Hi, I'm developing this query for a dashboard using System Center Config Manager Dashboard. The query needs to produce a table which shows the number of computers which have Office 2007 Standard edition in one row, and the next row should show the number of computers which do not have …

Member Avatar for sdimantova
0
164
Member Avatar for bhavna_816

I have to add a not null column in a table. I am using [code]IF NOT EXISTS(SELECT * FROM information_schema.columns WHERE column_name = 'xyz' AND table_name = 'abc') BEGIN ALTER TABLE abc WITH NOCHECK ADD xyz MONEY NOT NULL END[/code] It gives me error ALTER TABLE only allows columns to …

Member Avatar for Saranya_kamaraj
0
266
Member Avatar for sivaprakashm

while sending request parameter to this stored procedure i need to insert an department _id ,fy_id, vertical_id , while inserting .Before that i set one temp int variable and then assign it to query And checking the condition of temp variable if temp variable is 0 then could not only …

Member Avatar for urtrivedi
0
107
Member Avatar for msman88

[CODE]<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:AdNetConnectionString %>" SelectCommand="SELECT AdCampaign.ID As [ID], AdCampaign.CampaignName FROM Account INNER JOIN AdCampaign ON Account.ID = AdCampaign.AccountID WHERE (Account.EmailAddress = @EmailAddress)" DeleteCommand="DELETE FROM [AdCampaign] WHERE [ID] = @ID" > <SelectParameters> <asp:SessionParameter Name="EmailAddress" SessionField="EmailAddress" /> </SelectParameters> <DeleteParameters> <asp:Parameter Name="ID" Type="Int32" /> </DeleteParameters> </asp:SqlDataSource>[/CODE] In tge previous code. When …

0
68
Member Avatar for hmutual10

Is there a difference between regular SQL and Scalable/Pervasice SQL?

0
51
Member Avatar for TOMASO

I have been using ms sql 2005 for a while now. But recently one of my server has became too slow. I have not added neither changed anything on that server. It's a HP 380 G6 with 32GB ram and 2 processors 2.26ghz each. kindly help.

Member Avatar for pclfw
0
50
Member Avatar for Kusno

Dear all, I have a table that contains image data type and has more than 20,000 records. I want to change its file group to the new file group. I tried to change it using table designer, but everytime I wanted to save it, it occured an error with this …

Member Avatar for pclfw
0
134
Member Avatar for danieldiesel12

Hi! I´m trying to have a datagrid with some data. It includes a subquery and does only work if I define the parameter. I don´t want that. I would like to group it. The query is: [CODE] SELECT count(*)*1.0/ (select count(*) from events_may_2010 where agent = '5013' and convert(varchar,call_date,112)= convert(varchar,GETDATE(),112) …

Member Avatar for pclfw
0
98
Member Avatar for js8765

Hi, I was wondering what is the "cleanest" way of combining two datasets by taking all the values from one data set and only the values from a second data set that have an index that does not appear in the first. Both data sets have the same columns. Even …

Member Avatar for js8765
0
779
Member Avatar for end3r

Hy, I seek your help in solving the following problem: I have a select which returns columns like ( without count_same which I need to create by counting the same name): ID | NAME | no_items | count_same ----------------------------------------------------------- 1 | A | 1 | 2 2 | A | …

Member Avatar for end3r
0
193
Member Avatar for vallikasturi

Hi... I have two tables without primary keys and with a common field meterid... I can't add a primary key to any of these tables... Now i need to join both tables.. Can anyone write the query for this...plss... select * from table1,table2 where table1.meterid=table2.meterid; isn't working... The result of …

Member Avatar for bhartman21
0
706
Member Avatar for sunnydays26

Hi I would like to show the data in a hierarchical manner as: bluehills > hills > south where hills comes under bluehills and south under hills in a hierarchical manner. How this is possible how can i retrieve in this manner using procedure Please help Thanks in advance MS

Member Avatar for Aussie_Here
0
50
Member Avatar for Aussie_Here

Hi I've been trying to solve the following problem for a few days but everytime I get the error msg even when the entered value doesn't conflict with the statement. Plz I need an urgent help I have the following tables: [B]booking[/B] bookingId (PK) subjectId (FK) [B]Subject[/B] subjectId (PK) termId …

Member Avatar for Aussie_Here
0
103
Member Avatar for dB09

hello. i have a database with school names, their budgets and their expenses. i have to write trigger not allowing to increase expenses, but only to lower their value. if someone wants to increase it, there should be message. i know i have to remember somehow the old value and …

0
62
Member Avatar for Abemanden

Hi, i've tried several times, but haven't succed in making this: Classroom2 Name: | Date: Oliver | 12-10-10 Homer | 12-10-10 [COLOR="red"]Peter | 11-11-10[/COLOR] Classroom1 Name: | Date: James | 20-10-10 Lars | 20-10-10 [COLOR="red"]John | 11-11-10[/COLOR] How do i make a SQL statement that ONLY selects the lastest dates …

Member Avatar for Abemanden
0
143
Member Avatar for missbusiness

hi, im trying to divide two fields in a database like this: crterm=bal/pi but im not sure how to write it in sql. any suggestions?

Member Avatar for Brian Swan
0
100
Member Avatar for molivia03

Dear Dani web user, Can anyone help me how to generate series of date that has start and end date and pick up the data along the way. I have used Stored Procedure below but its not working [CODE] -- CREATE TEMP TABLE declare @YTDbyMonth Table ( --Period nvarchar(100) DateStart …

0
59
Member Avatar for golfbear18

Hello - We are trying to do a restore which is started manually (not an agent job) via rdp. I'm being told that the restore fails if the the rdp session shuts down. I don't think this would cause the restore to stop. I haven't seen the error logs yet, …

Member Avatar for freshfitz
0
58
Member Avatar for miweiser

Some of my tables have no key since auto-number won't ensure no duplicates are entered. Other tables have multiple fields as key because this is the only way to uniquely identify. Migration did not like certain tables or queries due to this, are keys required? Also my Forms and queries …

0
65
Member Avatar for Kusno

Dear all, I'm stucked with my XML problem. I have these stored procedures to save XML data into server hard disk. [CODE]CREATE PROCEDURE dbo.sp_XML_Employee(@Database varchar(10), @FileName Varchar(2000)) AS DECLARE @bcpCommand varchar(4000) SET @bcpCommand = 'bcp "SELECT EmployeeID, EmployeeName FROM ' + @Database + '.dbo.MasterEmployee ORDER BY EmployeeID FOR XML RAW(''Employee''), …

Member Avatar for Kusno
0
217
Member Avatar for vsmash

G'day, I'm wanting to generate non-sequential 12 character codes to use as coupon codes or gift vouchers in mssql server 2008. I wanna avoid generating a random and checking existing, but i don't know if it's possible to generate shortened guids? like maybe a nuid or a suid? any advice? …

0
59

The End.