2,736 Topics
| |
i have here my search code. i want to search for firstname, and gender, but what if firstname is empty and gender is the one were going to search. but the gender is not filtering they just filter the name. any suggestions.. SELECT --ACCOUNT_CODE --HOSPITAL_CODE MRN ,CONVERT(DATE,BIRTHDATE)BIRTHDATE ,FIRSTNAME ,MIDDLENAME ,LASTNAME … | |
Hello dear T-SQL community, I am working on some exciting project but my problem is not exciting and I have not been able to find a valid solution... (all related fix are arround BCP or BULK INSERT). The server where the DB is located is not allowing BCP / Bulk … | |
I'm a bit of a SQL newbie so I'm wondering if you can help me. I've looked on Google it for some time, but maybe I'm not using the proper terms. Here is my question: I have TableA that has the following columns: ID(PK), location, departA, departB. I would like … | |
Hi, I have my data which looks like '0/1,0/2,0/3,0/4' or '0/1,0/2,0/6,0/3,0/4' I need to select min and max of the numbers for example for first example my output should be 0/1-0/4 and for second it should be 0/1-0/6.. I am able to get like 0-1 or 0-6.. Any help would … | |
There are 5 columns in my table structure and they are: 1) Id - PK 2) Name 3) IdentityNo1 4) IdentityNo2 5) PassportNo Since duplicate records are inserted into the table I am attempting to remove the duplicate records. What makes the records unique is the IdentityNo1, IdentityNo2 and Passport … | |
Hi All, I'm having a bit of an issue with a stored procedure I have written which encrypts a value using ENCRYPTBYPASSPHRASE and DECRYPTBYPASSPHRASE. The problem is these functions return Varbinary data types which I need to append to a Varchar data type. Can anyone help with being able to … | |
When the exchCode is empty the record shouldn't be displayed. However the code below display the records. SELECT * FROM( SELECT bhCliCode, exchCode = CASE X.Which WHEN 'accSgx' THEN accSgx WHEN 'accHk' THEN accHk WHEN 'accIdx' THEN accIdx WHEN 'accUs' THEN accUs WHEN 'accSet' THEN accSet WHEN 'accPhp' THEN accPhp … | |
Hi all, Quick one for you, designing a bit of software in VB.net for a company that inputs data into an mdb file and then uses a web service to take this data an insert into an SQL server 2008 R2 database. I know I can have to instances of … | |
Hi I have two tables Employee and Job, Employee's prmary key is EID and in Job there is a EID that is a foreign key to Job. job has another column as the status of the employee. first the employee is added to the database and then the job detils … | |
I am having trouble figuring out how to execut the following SQL query. Say for example I have the following 2 databases. Db1 Col_1 Col_2 1 a 2 b 3 c 4 d 5 e 6 f 7 g 8 j 9 h 10 i Db2 Col_1 Col_2 1 j … | |
Greetings, I want to know what is the pest practice in the following issue. I have a From for releasing decision such as hiring employee, discharging employee etc. The process of releasing a decision takes the following steps 1- You fill the necessary data within the from and then click … | |
Hi, i have a Sql Server 2008 database, with a table that has around of 2.000.000 registers. The schema of the table is the following: idSpecie (PK, int) | Kingdom | Phylum | Class | Order | Family | Genus | Specie The kingdom, phylum, class, order, family, genus and … | |
Greetings. I'm having a problem that is we have a fingerprint devices in the factory, we have 2 work shifts OK so the security guys must switch the devices from "in state" to "out state" so that the [in/out mode] in the database being 0 "means attend state" it changes … | |
Hi, I'm writing a VB.net application that runs off a SQL database. If the application can not connect to the database or the connection has not been set up I'm giving the user the option to create the database on the SQL server instance of their choice I then create … | |
i have two tables with the following columns: departments: departmentID tinyint not null department varchar( 30 ) not null employees: employeeID SMALLINT(5) not null departmentID tinyint not null firstName varchar(30) not null lastName varchar(30) not null how do i create the two tables using SQL with a foreign key linking … | |
I'm new to MSSQL though I have some grounding in MySQL. At the moment, I'm trying to use a variable. Reduced to simpler form, my query to search people with 'and' in their name is: DECLARE @MyVar nchar; SET @MyVar = '%and%'; SELECT name,email FROM db.dbo.users WHERE name LIKE @MyVar; … | |
I need to split my Access 2007 .accdb and place the back-end on SQL Server 2008. I am not able to utilize SSMA due to security reasons. SQL Server resides on a different machine from the Access Database. I tried looking for books or tutorial to no avail to any … | |
I just task with sql related Syntax,using ERP software.How i want to more about sql database? | |
Hey guys. I am trying to move a SQL database from one SQL server to another. One is SQL server 2003 and the destination is running SQL server 2008. Can anyone provide some guidance with this. I have never done this before so any pointers with be greatly appreciated! Thanks! | |
Hi all, I have the following VB.NET code where I am attempting to connect to a SQL Server table, query it to find out if a date in the table is between a derived date called "fileCreateDate" and now/today. Sub getDateModified() Dim fileCreatedDate As DateTime = File.GetCreationTime(strFilePath + "\CPI1.csv") Dim … | |
if i have table in database(sql server) and has 1500 records and i run 2 applications(at same time) that will retrieve 500 records each so how can i do this app1 will retrieve first 500 records app2 will retrieve next 500 records means no over lap SET Transaction Isolation Level … | |
Hi all, I have a table called tblCPI that holds approximately 160,000 records that have to do with Canadian CPI. I have created a process that did the initial data load into it and now I need help figuring out how to update it according to date values. For instance, … | |
Hi, I have a table with date column where the date data is represented by a number. I would like to view this data in a date format (dd-mm-yyyy) after running the sql statement. Appriciate if you could let me what is the code for it. Thanks. Y | |
Hi All, In my table (dbo.partha) i have three fields. the first one is id, 2nd one is CM_Name and the last one is empid the table looks like id name empid 1 Das 5 2 Ram 9 3 Abi 5 1 Wed 5 4 Sat 4 5 Sun 3 … | |
Greetings, I have 3 tables in my database HR_Employee_Personal_Info, HR_Employee_Job_Info and HR_Attend_And_Leave_Of_Staff respectively, I want to get the attendance of each employee based on his work shift. I will mention the columns within each table which will be of interest in order to do the job. Table HR_Employee_Personal_Info: [Employee ID], … | |
Hi All, I am trying to link two database in different servers. Are there any ways I can do this? If this possible, could anyone show me how to do it. I've been googling it a few weeks ago, there are sites that said to use the sp_addlinkedserver but I … | |
Hey everyone, I'm using CTEs to try and get the totals of two different criteria queries that I want to group by Month depending on the associated Inquiry Date. Here is what I have right now; ;With CTE(total, InitDate) as ( SELECT count(Inquiry.ID), Inquiry.Date from Inquiry Inner Join Inquirer on … | |
Hi All, In a table (dbo.UnquotedContacts) I have few columns from where I am trying to extract few columns. But My crcern is as follows IF the field 'Date_ABC_Updated' is NOT empty AND the field 'subscribed_to_Business_XL' = 'SUB', the contact has an ACTIVE BXL subscription IF the field 'Date_ABC_Updated' is … | |
Hi all, Anyone know how to create a data base gives the name of the same parameterized? Example in a store procedure, named 'x', which has a parameter, this will do since the create dabase @variable create procedure creadatabase @db_name varchar (10) as create database @db_name go But this variable … | |
I have created a cube in visual studio, when i want to deploy it i get the following error: Error : The project could not be deployed to the 'USER-PC\SQLEXPRESSR2' server because of the following connectivity problems : A connection cannot be made to redirector. Ensure that 'SQL Browser' service … |
The End.