A
annied
Hi,
Is it possible to use multiple statements in SQL?? (I’ve never used it before)
I have one query that i'm working with, The statements I want to use are as
below, they all work individually, but not together, Access help is as much
use as a chocolate fireguard in this case! any suggestions or explainations
would be gratefully appreciated:
Thank you.
Annie. D.
SELECT DATA_START_DATE, Left([DATA_START_DATE],4) AS DATA_START_DATE_year,
Mid([DATA_START_DATE],5,2) AS DATA_START_DATE_month, Mid([DATA_START_DATE],7,
2) AS DATA_START_DATE_day, DateSerial([DATA_START_DATE_year],
[DATA_START_DATE_month],[DATA_START_DATE_day]) AS DATA_START_DATE_date FROM
5F3_HEORG_IL_RF__20000101_0000_V01
SELECT DATA_END_DATE, Left([DATA_END_DATE],4) AS DATA_END_DATE_year, Mid(
[DATA_END_DATE],5,2) AS DATA_END_DATE_month, Mid([DATA_END_DATE],11,2) AS
DATA_END_DATE_day, DateSerial([DATA_END_DATE_year],[DATA_END_DATE_month],
[DATA_END_DATE_day]) AS DATA_END_DATE_date FROM
5F3_HEORG_IL_RF__20000101_0000_V01
SELECT START_DATE, Left([START_DATE],4) AS START_DATE_year, Mid([START_DATE],
5,2) AS START_DATE_month, Mid([START_DATE],11,2) AS START_DATE_day,
DateSerial([START_DATE_year],[START_DATE_month],[START_DATE_day]) AS
START_DATE_date FROM 5F3_HEORG_IL_RF__20000101_0000_V01
SELECT END_DTTM, Left([END_DTTM],4) AS END_DTTM_year, Mid([END_DTTM],5,2) AS
END_DTTM_month, Mid([END_DTTM],11,2) AS END_DTTM_day, DateSerial(
[END_DTTM_year],[END_DTTM_month],[END_DTTM_day]) AS END_DTTM_date FROM
5F3_HEORG_IL_RF__20000101_0000_V01
SELECT CREATE_DTTM, Left([CREATE_DTTM],4) AS CREATE_DTTM_year, Mid(
[CREATE_DTTM],5,2) AS CREATE_DTTM_month, Mid([CREATE_DTTM],11,2) AS
CREATE_DTTM_day, DateSerial([CREATE_DTTM_year],[CREATE_DTTM_month],
[CREATE_DTTM_day]) AS CREATE_DTTM_date FROM
5F3_HEORG_IL_RF__20000101_0000_V01
SELECT MODIF_DATE, Left([MODIF_DATE],4) AS MODIF_DATE_year, Mid([MODIF_DATE],
5,2) AS MODIF_DATE_month, Mid([MODIF_DATE],11,2) AS MODIF_DATE_day,
DateSerial([MODIF_DATE_year],[MODIF_DATE_month],[MODIF_DATE_day]) AS
MODIF_DATE_date FROM 5F3_HEORG_IL_RF__20000101_0000_V01
Is it possible to use multiple statements in SQL?? (I’ve never used it before)
I have one query that i'm working with, The statements I want to use are as
below, they all work individually, but not together, Access help is as much
use as a chocolate fireguard in this case! any suggestions or explainations
would be gratefully appreciated:
Thank you.
Annie. D.
SELECT DATA_START_DATE, Left([DATA_START_DATE],4) AS DATA_START_DATE_year,
Mid([DATA_START_DATE],5,2) AS DATA_START_DATE_month, Mid([DATA_START_DATE],7,
2) AS DATA_START_DATE_day, DateSerial([DATA_START_DATE_year],
[DATA_START_DATE_month],[DATA_START_DATE_day]) AS DATA_START_DATE_date FROM
5F3_HEORG_IL_RF__20000101_0000_V01
SELECT DATA_END_DATE, Left([DATA_END_DATE],4) AS DATA_END_DATE_year, Mid(
[DATA_END_DATE],5,2) AS DATA_END_DATE_month, Mid([DATA_END_DATE],11,2) AS
DATA_END_DATE_day, DateSerial([DATA_END_DATE_year],[DATA_END_DATE_month],
[DATA_END_DATE_day]) AS DATA_END_DATE_date FROM
5F3_HEORG_IL_RF__20000101_0000_V01
SELECT START_DATE, Left([START_DATE],4) AS START_DATE_year, Mid([START_DATE],
5,2) AS START_DATE_month, Mid([START_DATE],11,2) AS START_DATE_day,
DateSerial([START_DATE_year],[START_DATE_month],[START_DATE_day]) AS
START_DATE_date FROM 5F3_HEORG_IL_RF__20000101_0000_V01
SELECT END_DTTM, Left([END_DTTM],4) AS END_DTTM_year, Mid([END_DTTM],5,2) AS
END_DTTM_month, Mid([END_DTTM],11,2) AS END_DTTM_day, DateSerial(
[END_DTTM_year],[END_DTTM_month],[END_DTTM_day]) AS END_DTTM_date FROM
5F3_HEORG_IL_RF__20000101_0000_V01
SELECT CREATE_DTTM, Left([CREATE_DTTM],4) AS CREATE_DTTM_year, Mid(
[CREATE_DTTM],5,2) AS CREATE_DTTM_month, Mid([CREATE_DTTM],11,2) AS
CREATE_DTTM_day, DateSerial([CREATE_DTTM_year],[CREATE_DTTM_month],
[CREATE_DTTM_day]) AS CREATE_DTTM_date FROM
5F3_HEORG_IL_RF__20000101_0000_V01
SELECT MODIF_DATE, Left([MODIF_DATE],4) AS MODIF_DATE_year, Mid([MODIF_DATE],
5,2) AS MODIF_DATE_month, Mid([MODIF_DATE],11,2) AS MODIF_DATE_day,
DateSerial([MODIF_DATE_year],[MODIF_DATE_month],[MODIF_DATE_day]) AS
MODIF_DATE_date FROM 5F3_HEORG_IL_RF__20000101_0000_V01