Yes, I encounter this problem.
Handled it two ways:
1. Importing through MS Access to DBMS
2. Changing the column deliminator to something else, like |
Change LIKE to SUBSTRING(COLUMN NAME
,STARTING POSITION, ENDING POSITION) this is much faster due to the fact it reduces the amount of characters you actual look at using % compared to SUBSTRING
SELECT * FROM Employees
-- Common Table Expression (CTE) can be thought as an inline view similar to a derived table
SELECT *
FROM (
SELECT EmployeeId AS EmpId, FirstName + ' ' + LastName AS FullName, ReportsTo AS YourBoss
FROM Employees
) AS x
SELECT * FROM x
/*
1) Runs the derived table...
When I do use the following
IF SID = A then
"NA"
ELSE
IF SID = B
then
ToText(DATETIME,'formatstring')
ELSE
IF SID = C
then "-'
??? How do I select 24 hour formatting for Hours and Time?
I need a field to have possible mix results such as when
IF SID = A then "NA"
ELSE
IF SID = B then DATETIME
ELSE
IF SID = C then "-'
Thanks for the help!
How to Find the number of Fridays in a date range (or any other day of the week):
The following formula will allow you to count the number of Fridays in any date range. Your input dates can be database fields, formula fields or parameter fields. The Input Dates goes in place of {StartDate} and...
datevar t:=date({Orders.Ship Date});
if t in
dateadd('d',8 - dayofweek(date(year(t),3,7)),date(year(t),3,7))
to
dateadd('d',8 - dayofweek(date(year(t),11,1)),date(year(t),11,1))
then
dateadd('h',4,{Orders.Ship Date})
else
dateadd('h',5,{Orders.Ship Date})...
You have answered your own question "global temporary table"
When you are using a global temporary table it is deleted when the process ends. Change the table type and use
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[table name]') AND type in (N'U'))
DROP TABLE...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.